From a32b08cbf1a58924d39217067b02a022cda1e7a3 Mon Sep 17 00:00:00 2001 From: Vladislav Khorev Date: Tue, 9 Dec 2014 12:29:52 +0000 Subject: [PATCH] Adjective added to web --- rudict/grammar_case_adjective.csv | 132 +++++++- rudict/grammar_case_adjective.xlsx | Bin 10997 -> 13555 bytes rudict/rudict/adjective.cpp | 425 ++++++++++++++----------- rudict/rudict/adjective.h | 10 + rudict/rudict/grammarCase.cpp | 14 +- rudict/rudict/http/request_handler.cpp | 47 ++- rudict/rudict/linux/makefile | 2 + 7 files changed, 413 insertions(+), 217 deletions(-) diff --git a/rudict/grammar_case_adjective.csv b/rudict/grammar_case_adjective.csv index c5ba587..89e54dc 100644 --- a/rudict/grammar_case_adjective.csv +++ b/rudict/grammar_case_adjective.csv @@ -1,8 +1,8 @@ Склонение;Род;Падеж;Окончание;Пример -IFORM_MALE_INANIMATE;NC_SINGULAR;NGC_P1_NOMINATIVE;ий;рабочий +IFORM_MALE_INANIMATE;NC_SINGULAR;NGC_P1_NOMINATIVE;ий, ой;рабочий ;;NGC_P2_GENITIVE;его;подарок для рабочего ;;NGC_P3_DATIVE;ему;подарок рабочему -;;NGC_P4_ACCUSATIVE;ий;обвиняю рабочий +;;NGC_P4_ACCUSATIVE;ий, ой;обвиняю рабочий ;;NGC_P5_INSTRUMENTAL;им;говорю с рабочим ;;NGC_P6_PREPOSITIONAL;ем;говорю о рабочем ;NC_PLURAL;NGC_P1_NOMINATIVE;ие;рабочие @@ -11,7 +11,7 @@ IFORM_MALE_INANIMATE;NC_SINGULAR;NGC_P1_NOMINATIVE;ий;рабочий ;;NGC_P4_ACCUSATIVE;ие;обвиняю рабочие ;;NGC_P5_INSTRUMENTAL;ими;говорю с рабочими ;;NGC_P6_PREPOSITIONAL;их;говорю о рабочих -IFORM_MALE_ANIMATE;NC_SINGULAR;NGC_P1_NOMINATIVE;ий;рабочий +IFORM_MALE_ANIMATE;NC_SINGULAR;NGC_P1_NOMINATIVE;ий, ой;рабочий ;;NGC_P2_GENITIVE;его;подарок для рабочего ;;NGC_P3_DATIVE;ему;подарок рабочему ;;NGC_P4_ACCUSATIVE;его;обвиняю рабочего @@ -23,7 +23,31 @@ IFORM_MALE_ANIMATE;NC_SINGULAR;NGC_P1_NOMINATIVE;ий;рабочий ;;NGC_P4_ACCUSATIVE;их;обвиняю рабочих ;;NGC_P5_INSTRUMENTAL;ими;говорю с рабочими ;;NGC_P6_PREPOSITIONAL;их;говорю о рабочих -UOFORM_MALE_INANIMATE;NC_SINGULAR;NGC_P1_NOMINATIVE;ой, ый;деловой +UFORM_MALE_INANIMATE;NC_SINGULAR;NGC_P1_NOMINATIVE;ый;меловый +;;NGC_P2_GENITIVE;ого;подарок для мелового +;;NGC_P3_DATIVE;ому;подарок меловому +;;NGC_P4_ACCUSATIVE;ый;обвиняю меловый +;;NGC_P5_INSTRUMENTAL;ым;говорю с меловым +;;NGC_P6_PREPOSITIONAL;ом;говорю о меловом +;NC_PLURAL;NGC_P1_NOMINATIVE;ые;меловые +;;NGC_P2_GENITIVE;ых;подарок для меловых +;;NGC_P3_DATIVE;ым;подарок меловым +;;NGC_P4_ACCUSATIVE;ые;обвиняю меловые +;;NGC_P5_INSTRUMENTAL;ыми;говорю с меловыми +;;NGC_P6_PREPOSITIONAL;ых;говорю о меловых +UFORM_MALE_ANIMATE;NC_SINGULAR;NGC_P1_NOMINATIVE;ый;меловой +;;NGC_P2_GENITIVE;ого;подарок для мелового +;;NGC_P3_DATIVE;ому;подарок меловому +;;NGC_P4_ACCUSATIVE;ого;обвиняю мелового +;;NGC_P5_INSTRUMENTAL;ым;говорю с меловым +;;NGC_P6_PREPOSITIONAL;ом;говорю о меловом +;NC_PLURAL;NGC_P1_NOMINATIVE;ые;меловые +;;NGC_P2_GENITIVE;ых;подарок для меловых +;;NGC_P3_DATIVE;ым;подарок меловым +;;NGC_P4_ACCUSATIVE;ые;обвиняю меловые +;;NGC_P5_INSTRUMENTAL;ыми;говорю с меловыми +;;NGC_P6_PREPOSITIONAL;ых;говорю о меловых +UOFORM_MALE_INANIMATE;NC_SINGULAR;NGC_P1_NOMINATIVE;ой;деловой ;;NGC_P2_GENITIVE;ого;подарок для делового ;;NGC_P3_DATIVE;ому;подарок деловому ;;NGC_P4_ACCUSATIVE;ой;обвиняю деловой @@ -35,7 +59,7 @@ UOFORM_MALE_INANIMATE;NC_SINGULAR;NGC_P1_NOMINATIVE;ой, ый;деловой ;;NGC_P4_ACCUSATIVE;ые;обвиняю деловые ;;NGC_P5_INSTRUMENTAL;ыми;говорю с деловыми ;;NGC_P6_PREPOSITIONAL;ых;говорю о деловых -UOFORM_MALE_ANIMATE;NC_SINGULAR;NGC_P1_NOMINATIVE;ой, ый;деловой +UOFORM_MALE_ANIMATE;NC_SINGULAR;NGC_P1_NOMINATIVE;ой;деловой ;;NGC_P2_GENITIVE;ого;подарок для делового ;;NGC_P3_DATIVE;ому;подарок деловому ;;NGC_P4_ACCUSATIVE;ого;обвиняю делового @@ -47,6 +71,30 @@ UOFORM_MALE_ANIMATE;NC_SINGULAR;NGC_P1_NOMINATIVE;ой, ый;деловой ;;NGC_P4_ACCUSATIVE;ые;обвиняю деловые ;;NGC_P5_INSTRUMENTAL;ыми;говорю с деловыми ;;NGC_P6_PREPOSITIONAL;ых;говорю о деловых +IOFORM_MALE_INANIMATE;NC_SINGULAR;NGC_P1_NOMINATIVE;ой;другой +;;NGC_P2_GENITIVE;ого;подарок для другого +;;NGC_P3_DATIVE;ому;подарок другому +;;NGC_P4_ACCUSATIVE;ой;обвиняю другой +;;NGC_P5_INSTRUMENTAL;им;говорю с другим +;;NGC_P6_PREPOSITIONAL;ом;говорю о другом +;NC_PLURAL;NGC_P1_NOMINATIVE;ие;другие +;;NGC_P2_GENITIVE;их;подарок для других +;;NGC_P3_DATIVE;им;подарок другим +;;NGC_P4_ACCUSATIVE;ие;обвиняю другие +;;NGC_P5_INSTRUMENTAL;ихи;говорю с другими +;;NGC_P6_PREPOSITIONAL;их;говорю о других +IOFORM_MALE_ANIMATE;NC_SINGULAR;NGC_P1_NOMINATIVE;ой;другой +;;NGC_P2_GENITIVE;ого;подарок для другого +;;NGC_P3_DATIVE;ому;подарок другому +;;NGC_P4_ACCUSATIVE;ого;обвиняю другого +;;NGC_P5_INSTRUMENTAL;им;говорю с другим +;;NGC_P6_PREPOSITIONAL;ом;говорю о другом +;NC_PLURAL;NGC_P1_NOMINATIVE;ие;другие +;;NGC_P2_GENITIVE;их;подарок для других +;;NGC_P3_DATIVE;им;подарок другим +;;NGC_P4_ACCUSATIVE;их;обвиняю других +;;NGC_P5_INSTRUMENTAL;ихи;говорю с другими +;;NGC_P6_PREPOSITIONAL;их;говорю о других IFORM_FEMALE_INANIMATE;NC_SINGULAR;NGC_P1_NOMINATIVE;ая;рабочая ;;NGC_P2_GENITIVE;ей;подарок для рабочей ;;NGC_P3_DATIVE;ей;подарок рабочей @@ -71,6 +119,30 @@ IFORM_FEMALE_ANIMATE;NC_SINGULAR;NGC_P1_NOMINATIVE;ая;рабочая ;;NGC_P4_ACCUSATIVE;их;обвиняю рабочих ;;NGC_P5_INSTRUMENTAL;ими;говорю с рабочими ;;NGC_P6_PREPOSITIONAL;их;говорю о рабочих +UFORM_FEMALE_INANIMATE;NC_SINGULAR;NGC_P1_NOMINATIVE;ая;меловая +;;NGC_P2_GENITIVE;ой;подарок для меловой +;;NGC_P3_DATIVE;ой;подарок меловой +;;NGC_P4_ACCUSATIVE;ую;обвиняю меловую +;;NGC_P5_INSTRUMENTAL;ой;говорю с меловой +;;NGC_P6_PREPOSITIONAL;ой;говорю о меловой +;NC_PLURAL;NGC_P1_NOMINATIVE;ые;меловые +;;NGC_P2_GENITIVE;ых;подарок для меловых +;;NGC_P3_DATIVE;ым;подарок меловым +;;NGC_P4_ACCUSATIVE;ые;обвиняю меловые +;;NGC_P5_INSTRUMENTAL;ыми;говорю с меловыми +;;NGC_P6_PREPOSITIONAL;ых;говорю о меловых +UFORM_FEMALE_ANIMATE;NC_SINGULAR;NGC_P1_NOMINATIVE;ая;меловая +;;NGC_P2_GENITIVE;ой;подарок для меловой +;;NGC_P3_DATIVE;ой;подарок меловой +;;NGC_P4_ACCUSATIVE;ую;обвиняю меловую +;;NGC_P5_INSTRUMENTAL;ой;говорю с меловой +;;NGC_P6_PREPOSITIONAL;ой;говорю о меловой +;NC_PLURAL;NGC_P1_NOMINATIVE;ые;меловые +;;NGC_P2_GENITIVE;ых;подарок для меловых +;;NGC_P3_DATIVE;ым;подарок меловым +;;NGC_P4_ACCUSATIVE;ых;обвиняю меловых +;;NGC_P5_INSTRUMENTAL;ыми;говорю с меловыми +;;NGC_P6_PREPOSITIONAL;ых;говорю о меловых UOFORM_FEMALE_INANIMATE;NC_SINGULAR;NGC_P1_NOMINATIVE;ая;деловая ;;NGC_P2_GENITIVE;ой;подарок для деловой ;;NGC_P3_DATIVE;ой;подарок деловой @@ -92,9 +164,33 @@ UOFORM_FEMALE_ANIMATE;NC_SINGULAR;NGC_P1_NOMINATIVE;ая;деловая ;NC_PLURAL;NGC_P1_NOMINATIVE;ые;деловые ;;NGC_P2_GENITIVE;ых;подарок для деловых ;;NGC_P3_DATIVE;ым;подарок деловым -;;NGC_P4_ACCUSATIVE;ые;обвиняю деловые +;;NGC_P4_ACCUSATIVE;ых;обвиняю деловых ;;NGC_P5_INSTRUMENTAL;ыми;говорю с деловыми ;;NGC_P6_PREPOSITIONAL;ых;говорю о деловых +IOFORM_FEMALE_INANIMATE;NC_SINGULAR;NGC_P1_NOMINATIVE;ая;другая +;;NGC_P2_GENITIVE;ой;подарок для другой +;;NGC_P3_DATIVE;ой;подарок другой +;;NGC_P4_ACCUSATIVE;ую;обвиняю другую +;;NGC_P5_INSTRUMENTAL;ой;говорю с другой +;;NGC_P6_PREPOSITIONAL;ой;говорю о другой +;NC_PLURAL;NGC_P1_NOMINATIVE;ие;другие +;;NGC_P2_GENITIVE;их;подарок для других +;;NGC_P3_DATIVE;им;подарок другим +;;NGC_P4_ACCUSATIVE;ие;обвиняю другие +;;NGC_P5_INSTRUMENTAL;ими;говорю с другими +;;NGC_P6_PREPOSITIONAL;их;говорю о других +IOFORM_FEMALE_ANIMATE;NC_SINGULAR;NGC_P1_NOMINATIVE;ая;другая +;;NGC_P2_GENITIVE;ой;подарок для другой +;;NGC_P3_DATIVE;ой;подарок другой +;;NGC_P4_ACCUSATIVE;ую;обвиняю другую +;;NGC_P5_INSTRUMENTAL;ой;говорю с другой +;;NGC_P6_PREPOSITIONAL;ой;говорю о другой +;NC_PLURAL;NGC_P1_NOMINATIVE;ие;другие +;;NGC_P2_GENITIVE;их;подарок для других +;;NGC_P3_DATIVE;им;подарок другим +;;NGC_P4_ACCUSATIVE;ие;обвиняю других +;;NGC_P5_INSTRUMENTAL;ими;говорю с другими +;;NGC_P6_PREPOSITIONAL;их;говорю о других IFORM_NEUTRAL;NC_SINGULAR;NGC_P1_NOMINATIVE;ее;рабочее ;;NGC_P2_GENITIVE;его;подарок для рабочего ;;NGC_P3_DATIVE;ему;подарок рабочему @@ -107,6 +203,18 @@ IFORM_NEUTRAL;NC_SINGULAR;NGC_P1_NOMINATIVE;ее;рабочее ;;NGC_P4_ACCUSATIVE;ие;обвиняю рабочие ;;NGC_P5_INSTRUMENTAL;ими;говорю с рабочими ;;NGC_P6_PREPOSITIONAL;их;говорю о рабочих +UFORM_NEUTRAL;NC_SINGULAR;NGC_P1_NOMINATIVE;ое;меловое +;;NGC_P2_GENITIVE;ого;подарок для мелового +;;NGC_P3_DATIVE;ому;подарок меловому +;;NGC_P4_ACCUSATIVE;ое;обвиняю меловое +;;NGC_P5_INSTRUMENTAL;ым;говорю с меловым +;;NGC_P6_PREPOSITIONAL;ом;говорю о меловом +;NC_PLURAL;NGC_P1_NOMINATIVE;ые;меловые +;;NGC_P2_GENITIVE;ых;подарок для меловых +;;NGC_P3_DATIVE;ым;подарок меловым +;;NGC_P4_ACCUSATIVE;ые;обвиняю меловые +;;NGC_P5_INSTRUMENTAL;ыми;говорю с меловыми +;;NGC_P6_PREPOSITIONAL;ых;говорю о меловых UOFORM_NEUTRAL;NC_SINGULAR;NGC_P1_NOMINATIVE;ое;деловое ;;NGC_P2_GENITIVE;ого;подарок для делового ;;NGC_P3_DATIVE;ому;подарок деловому @@ -119,3 +227,15 @@ UOFORM_NEUTRAL;NC_SINGULAR;NGC_P1_NOMINATIVE;ое;деловое ;;NGC_P4_ACCUSATIVE;ые;обвиняю деловые ;;NGC_P5_INSTRUMENTAL;ыми;говорю с деловыми ;;NGC_P6_PREPOSITIONAL;ых;говорю о деловых +IOFORM_NEUTRAL;NC_SINGULAR;NGC_P1_NOMINATIVE;ое;другое +;;NGC_P2_GENITIVE;ого;подарок для другого +;;NGC_P3_DATIVE;ому;подарок другому +;;NGC_P4_ACCUSATIVE;ое;обвиняю другое +;;NGC_P5_INSTRUMENTAL;им;говорю с другим +;;NGC_P6_PREPOSITIONAL;ом;говорю о другом +;NC_PLURAL;NGC_P1_NOMINATIVE;ие;другие +;;NGC_P2_GENITIVE;их;подарок для других +;;NGC_P3_DATIVE;им;подарок другим +;;NGC_P4_ACCUSATIVE;ие;обвиняю другие +;;NGC_P5_INSTRUMENTAL;ими;говорю с другими +;;NGC_P6_PREPOSITIONAL;их;говорю о других diff --git a/rudict/grammar_case_adjective.xlsx b/rudict/grammar_case_adjective.xlsx index 810a100d6d004fca9f81752ce6b20c1767e24aec..98819a5e93ae5f64569ce22d478c7beb9b64e867 100644 GIT binary patch delta 6593 zcmYjWXEv##Hr`u~Ooa`hT89X|W~!qzE{V_{^hEJbo2*%;uAw zHJLF@B7>se+uqKY&JeTf+Y4G}U0Vo@K+T?#e4Xk4lze!3b*(TdFUa^Z@btVcnWWNW%ms;!!&PcoOq2;?Ufk!S~zcFs^yJQ`vuS`;#*Ywmi5GC3^naZSUC&;H4 zMDmQot-n|#BY8Q2S6LA^3*D1_@*BBuLB*KSit$T1xd-9bI6a9R$&>pjGf%VAQ3=Cs zQrBJ6J!#5Ceopi@&C6e&{S)^90e0RLKYQ&Ilq}?_pS*Y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psoIFzpjuhe4e&ebCXb`zKEr-`0TV0;&HCsZ>it7(KN^p`U#=dZOj!5KD zH|1Bv&q$R;BNyYXt_dDnQnf1#BA9Xkt0u#a$UkAB=X^CO9}0;1W>dCVufK(`b$D3%+UDc)tm{{NsMdbq>`Xq2$jM z(Ti-eVx3{7XIhW=VJDrILZVdZM~~mFB46&Xmz00EzP1!!nnVtm3I8F14Dvr_tH}8Y z!lr_F8Ml-y*y`mk%K*`q#$5`$(Q`~cZ<4~Y3a9+pAF{}W`HI_GhO?7qY#zK%(Q7*k z`w&=>!KytQW=0JAdU1V&P`<`qDesvpp&=p5aM{Cd1M$@HSwK59b!hHJ60@!1L5Vp2raA$(h8J}O11 z^0gmHtM9UcDu^dH1;$~x=U%}j&h(Ux*KJE7*Wz?(-zno{Pq!oiU;fSDe4s{;NPW>- z&zlJEWv2%?m-i-Z7bJ9gP&s|8USrLa%_>HMX2ug%_UVtRaLJy6IxR#`?p%~S$~Yyc zZ^UPUGXdhu%^;u^4X#WMw{a{vw;sxnfG0x2cm7o|SW0q892UtAdk{rgcIs03s1 +#include "adjective.h" +#include #include //Xperimental -- for debug only @@ -7,115 +7,157 @@ #include "boost/regex.hpp" #include "boost/algorithm/string/regex.hpp" - -namespace AJ -{ - - std::vector AdjectiveRecordArr; - + +namespace AJ +{ + + std::vector AdjectiveRecordArr; + std::vector adjectiveDeclencionCaseTable; - - - AdjectiveRecord::AdjectiveRecord() - : standardShortFormAvailable(false) - { - - } - - AdjectiveRecord::AdjectiveRecord(std::wstring line) - { + + + AdjectiveRecord::AdjectiveRecord() + : standardShortFormAvailable(false) + { + + } + + AdjectiveRecord::AdjectiveRecord(std::wstring line) + { std::vector lineArr; boost::split_regex(lineArr, line, boost::wregex(L";")); nominativeMaleForm = lineArr[1]; - standardShortFormAvailable = lineArr[2] == L"1" ? true : false; - + standardShortFormAvailable = lineArr[2] == L"1" ? true : false; + specialShortForm = lineArr[3]; - - } - - - std::vector GetAllAdjectiveEndingArr() - { - std::vector result; - - result.push_back(L""); - result.push_back(L""); - result.push_back(L""); - result.push_back(L""); - result.push_back(L""); - result.push_back(L""); - result.push_back(L""); - result.push_back(L""); - result.push_back(L""); - result.push_back(L""); - result.push_back(L""); - result.push_back(L""); - result.push_back(L""); - result.push_back(L""); - result.push_back(L""); - result.push_back(L""); - result.push_back(L""); - result.push_back(L""); - result.push_back(L""); - result.push_back(L""); - result.push_back(L""); - result.push_back(L""); - - return result; - } - - AdjectiveDeclencion WStringToAdjectiveDeclencion(std::wstring str) + + } + + + std::vector GetAllAdjectiveEndingArr() + { + std::vector result; + + result.push_back(L""); + result.push_back(L""); + result.push_back(L""); + result.push_back(L""); + result.push_back(L""); + result.push_back(L""); + result.push_back(L""); + result.push_back(L""); + result.push_back(L""); + result.push_back(L""); + result.push_back(L""); + result.push_back(L""); + result.push_back(L""); + result.push_back(L""); + result.push_back(L""); + result.push_back(L""); + result.push_back(L""); + result.push_back(L""); + result.push_back(L""); + result.push_back(L""); + result.push_back(L""); + result.push_back(L""); + + return result; + } + + AdjectiveDeclencion WStringToAdjectiveDeclencion(std::wstring str) { if (str == L"IFORM_MALE_INANIMATE") { return IFORM_MALE_INANIMATE; - } + } if (str == L"IFORM_MALE_ANIMATE") { return IFORM_MALE_ANIMATE; - } + } + if (str == L"UFORM_MALE_INANIMATE") + { + return UFORM_MALE_INANIMATE; + } + if (str == L"UFORM_MALE_ANIMATE") + { + return UFORM_MALE_ANIMATE; + } if (str == L"UOFORM_MALE_INANIMATE") { return UOFORM_MALE_INANIMATE; - } + } if (str == L"UOFORM_MALE_ANIMATE") { return UOFORM_MALE_ANIMATE; - } - + } + if (str == L"IOFORM_MALE_INANIMATE") + { + return IOFORM_MALE_INANIMATE; + } + if (str == L"IOFORM_MALE_ANIMATE") + { + return IOFORM_MALE_ANIMATE; + } + if (str == L"IFORM_FEMALE_INANIMATE") { return IFORM_FEMALE_INANIMATE; - } + } if (str == L"IFORM_FEMALE_ANIMATE") { return IFORM_FEMALE_ANIMATE; - } + } + if (str == L"UFORM_FEMALE_INANIMATE") + { + return UFORM_FEMALE_INANIMATE; + } + if (str == L"UFORM_FEMALE_ANIMATE") + { + return UFORM_FEMALE_ANIMATE; + } if (str == L"UOFORM_FEMALE_INANIMATE") { return UOFORM_FEMALE_INANIMATE; - } + } if (str == L"UOFORM_FEMALE_ANIMATE") { return UOFORM_FEMALE_ANIMATE; - } - + } + if (str == L"IOFORM_FEMALE_INANIMATE") + { + return IOFORM_FEMALE_INANIMATE; + } + if (str == L"IOFORM_FEMALE_ANIMATE") + { + return IOFORM_FEMALE_ANIMATE; + } + + + if (str == L"IFORM_NEUTRAL") { return IFORM_NEUTRAL; - } + } + if (str == L"UFORM_NEUTRAL") + { + return UFORM_NEUTRAL; + } if (str == L"UOFORM_NEUTRAL") { return UOFORM_NEUTRAL; - } - - std::cout << "Error in WStringToAdjectiveDeclencion"; - return IFORM_MALE_INANIMATE; - } - + } + if (str == L"IOFORM_NEUTRAL") + { + return IOFORM_NEUTRAL; + } + + std::cout << "Error in WStringToAdjectiveDeclencion"; + return IFORM_MALE_INANIMATE; + } + std::set getPossibleAdjectiveEndingDivisionSet(std::wstring noun) { std::set result; @@ -139,12 +181,12 @@ namespace AJ } return result; - } - - std::vector GetPossibleTupleArr(std::wstring ending) - { - std::vector result; - + } + + std::vector GetPossibleTupleArr(std::wstring ending) + { + std::vector result; + for (auto& adjective : adjectiveDeclencionCaseTable) { for (int i = 0; i < NGC_SIZE * NC_SIZE; i++) @@ -155,11 +197,11 @@ namespace AJ } } - } - - return result; - } - + } + + return result; + } + bool AdjectiveIsInDictionary(std::wstring nominative) { for (auto& adjective : AdjectiveRecordArr) @@ -185,11 +227,11 @@ namespace AJ return{}; } - - - /* - std::set GetAdjectiveNominative(std::wstring base, AdjectiveDeclencion declencion, NounCount nounCount) - { + + + /* + std::set GetAdjectiveNominative(std::wstring base, AdjectiveDeclencion declencion, NounCount nounCount) + { std::set result; AdjectiveDeclencionCaseTableRecord declencionCaseTableRecord = adjectiveDeclencionCaseTable[static_cast(declencion)]; @@ -206,16 +248,16 @@ namespace AJ } } - return result; - }*/ - - std::set GetNominativeMaleSingular(std::wstring base) - { + return result; + }*/ + + std::set GetNominativeMaleSingular(std::wstring base) + { std::wstring result; if (charIsIFormConsolant(base[base.size() - 1])) { - return{ base + L"" }; + return{ base + L"", base + L"" }; } if (charIsUFormConsolant(base[base.size() - 1])) @@ -224,59 +266,71 @@ namespace AJ } return{}; - - } - - bool IsDeclencionAnimated(AdjectiveDeclencion declention) - { - switch (declention) - { - case AJ::IFORM_MALE_ANIMATE: - case AJ::UOFORM_MALE_ANIMATE: - case AJ::IFORM_FEMALE_ANIMATE: - case AJ::UOFORM_FEMALE_ANIMATE: - return true; - break; - default: - return false; - break; - } - } - - - NounGender GetGenderFromDeclencion(AdjectiveDeclencion declention) - { - switch (declention) - { - case AJ::IFORM_MALE_INANIMATE: - case AJ::IFORM_MALE_ANIMATE: - case AJ::UOFORM_MALE_INANIMATE: - case AJ::UOFORM_MALE_ANIMATE: - return NG_MALE; - break; - case AJ::IFORM_FEMALE_INANIMATE: - case AJ::IFORM_FEMALE_ANIMATE: - case AJ::UOFORM_FEMALE_INANIMATE: - case AJ::UOFORM_FEMALE_ANIMATE: - return NG_FEMALE; - break; - default: - return NG_NEUTRAL; - break; - } - } - - - bool IFormTest(const AdjectiveRecord& r) - { - return charIsIFormConsolant(r.nominativeMaleForm[r.nominativeMaleForm.size() - 3]); - } - - bool UOFormTest(const AdjectiveRecord& r) - { - return charIsUFormConsolant(r.nominativeMaleForm[r.nominativeMaleForm.size() - 3]); - } - + + } + + bool IsDeclencionAnimated(AdjectiveDeclencion declention) + { + switch (declention) + { + case AJ::IFORM_MALE_ANIMATE: + case AJ::UFORM_MALE_ANIMATE: + case AJ::UOFORM_MALE_ANIMATE: + case AJ::IOFORM_MALE_ANIMATE: + case AJ::IFORM_FEMALE_ANIMATE: + case AJ::UFORM_FEMALE_ANIMATE: + case AJ::UOFORM_FEMALE_ANIMATE: + case AJ::IOFORM_FEMALE_ANIMATE: + return true; + break; + default: + return false; + break; + } + } + + + NounGender GetGenderFromDeclencion(AdjectiveDeclencion declention) + { + switch (declention) + { + case AJ::IFORM_MALE_INANIMATE: + case AJ::IFORM_MALE_ANIMATE: + case AJ::UFORM_MALE_INANIMATE: + case AJ::UFORM_MALE_ANIMATE: + case AJ::UOFORM_MALE_INANIMATE: + case AJ::UOFORM_MALE_ANIMATE: + case AJ::IOFORM_MALE_INANIMATE: + case AJ::IOFORM_MALE_ANIMATE: + return NG_MALE; + break; + case AJ::IFORM_FEMALE_INANIMATE: + case AJ::IFORM_FEMALE_ANIMATE: + case AJ::UFORM_FEMALE_INANIMATE: + case AJ::UFORM_FEMALE_ANIMATE: + case AJ::UOFORM_FEMALE_INANIMATE: + case AJ::UOFORM_FEMALE_ANIMATE: + case AJ::IOFORM_FEMALE_INANIMATE: + case AJ::IOFORM_FEMALE_ANIMATE: + return NG_FEMALE; + break; + default: + return NG_NEUTRAL; + break; + } + } + + + bool IFormTest(const AdjectiveRecord& r) + { + return charIsIFormConsolant(r.nominativeMaleForm[r.nominativeMaleForm.size() - 3]); + } + + bool UFormTest(const AdjectiveRecord& r) + { + return charIsUFormConsolant(r.nominativeMaleForm[r.nominativeMaleForm.size() - 3]); + } + std::map> DeclentionConditionMap; @@ -285,20 +339,31 @@ namespace AJ DeclentionConditionMap[IFORM_MALE_INANIMATE] = std::bind(IFormTest, std::placeholders::_1); DeclentionConditionMap[IFORM_MALE_ANIMATE] = std::bind(IFormTest, std::placeholders::_1); - DeclentionConditionMap[UOFORM_MALE_INANIMATE] = std::bind(UOFormTest, std::placeholders::_1); - DeclentionConditionMap[UOFORM_MALE_ANIMATE] = std::bind(UOFormTest, std::placeholders::_1); + DeclentionConditionMap[UFORM_MALE_INANIMATE] = std::bind(UFormTest, std::placeholders::_1); + DeclentionConditionMap[UFORM_MALE_ANIMATE] = std::bind(UFormTest, std::placeholders::_1); + DeclentionConditionMap[UOFORM_MALE_INANIMATE] = std::bind(UFormTest, std::placeholders::_1); + DeclentionConditionMap[UOFORM_MALE_ANIMATE] = std::bind(UFormTest, std::placeholders::_1); + DeclentionConditionMap[IOFORM_MALE_INANIMATE] = std::bind(IFormTest, std::placeholders::_1); + DeclentionConditionMap[IOFORM_MALE_ANIMATE] = std::bind(IFormTest, std::placeholders::_1); DeclentionConditionMap[IFORM_FEMALE_INANIMATE] = std::bind(IFormTest, std::placeholders::_1); DeclentionConditionMap[IFORM_FEMALE_ANIMATE] = std::bind(IFormTest, std::placeholders::_1); - DeclentionConditionMap[UOFORM_FEMALE_INANIMATE] = std::bind(UOFormTest, std::placeholders::_1); - DeclentionConditionMap[UOFORM_FEMALE_ANIMATE] = std::bind(UOFormTest, std::placeholders::_1); + DeclentionConditionMap[UFORM_FEMALE_INANIMATE] = std::bind(UFormTest, std::placeholders::_1); + DeclentionConditionMap[UFORM_FEMALE_ANIMATE] = std::bind(UFormTest, std::placeholders::_1); + DeclentionConditionMap[IOFORM_FEMALE_INANIMATE] = std::bind(IFormTest, std::placeholders::_1); + DeclentionConditionMap[IOFORM_FEMALE_ANIMATE] = std::bind(IFormTest, std::placeholders::_1); + DeclentionConditionMap[UOFORM_FEMALE_INANIMATE] = std::bind(UFormTest, std::placeholders::_1); + DeclentionConditionMap[UOFORM_FEMALE_ANIMATE] = std::bind(UFormTest, std::placeholders::_1); + DeclentionConditionMap[IFORM_NEUTRAL] = std::bind(IFormTest, std::placeholders::_1); - DeclentionConditionMap[UOFORM_NEUTRAL] = std::bind(UOFormTest, std::placeholders::_1); + DeclentionConditionMap[UFORM_NEUTRAL] = std::bind(UFormTest, std::placeholders::_1); + DeclentionConditionMap[IOFORM_NEUTRAL] = std::bind(IFormTest, std::placeholders::_1); + DeclentionConditionMap[UOFORM_NEUTRAL] = std::bind(UFormTest, std::placeholders::_1); - } - + } + bool AdjectiveFitsDeclention(AdjectiveRecord record, AdjectiveTuple tuple) { @@ -312,7 +377,7 @@ namespace AJ } return false; - } + } std::map < AdjectiveEndingDivision::DivisionCase, std::function < bool(AdjectiveTuple) >> DivisionCaseAdjectiveTupleFilterMap; @@ -332,16 +397,16 @@ namespace AJ return AdjectiveFitsDeclention(record, tuple); }; - } - - std::set RecognizeAdjective(std::wstring noun) - { + } + + std::set RecognizeAdjective(std::wstring noun) + { std::set result; auto adjectiveEndingDivisionArr = getPossibleAdjectiveEndingDivisionSet(noun); for (auto adjectiveEndingDivision : adjectiveEndingDivisionArr) - { + { std::wstring base = adjectiveEndingDivision.base; std::wstring ending = adjectiveEndingDivision.ending; AdjectiveEndingDivision::DivisionCase dc = adjectiveEndingDivision.divisionCase; @@ -350,11 +415,11 @@ namespace AJ std::wstring modifiedEnding = ending; std::vector possibleTupleArr = GetPossibleTupleArr(modifiedEnding); - + for (AdjectiveTuple tuple : possibleTupleArr) - { + { if (DivisionCaseAdjectiveTupleFilterMap[dc](tuple)) - { + { std::set nominaviteSingularSet = GetNominativeMaleSingular(modifiedBase); for (auto& nn : nominaviteSingularSet) @@ -371,16 +436,16 @@ namespace AJ } } - } - - } - } - - } - - return result; - } - + } + + } + } + + } + + return result; + } + void LoadAdjectiveDeclencionCaseTable() { @@ -461,8 +526,8 @@ namespace AJ } - } - + } + void LoadFrequentAdjectiveSet() { @@ -500,8 +565,8 @@ namespace AJ } - } - - -} //namespace AJ - + } + + +} //namespace AJ + diff --git a/rudict/rudict/adjective.h b/rudict/rudict/adjective.h index 728932b..38a69f1 100644 --- a/rudict/rudict/adjective.h +++ b/rudict/rudict/adjective.h @@ -89,14 +89,24 @@ namespace AJ { IFORM_MALE_INANIMATE = 0, IFORM_MALE_ANIMATE, + UFORM_MALE_INANIMATE, + UFORM_MALE_ANIMATE, UOFORM_MALE_INANIMATE, UOFORM_MALE_ANIMATE, + IOFORM_MALE_INANIMATE, + IOFORM_MALE_ANIMATE, IFORM_FEMALE_INANIMATE, IFORM_FEMALE_ANIMATE, + UFORM_FEMALE_INANIMATE, + UFORM_FEMALE_ANIMATE, UOFORM_FEMALE_INANIMATE, UOFORM_FEMALE_ANIMATE, + IOFORM_FEMALE_INANIMATE, + IOFORM_FEMALE_ANIMATE, IFORM_NEUTRAL, + UFORM_NEUTRAL, UOFORM_NEUTRAL, + IOFORM_NEUTRAL, }; diff --git a/rudict/rudict/grammarCase.cpp b/rudict/rudict/grammarCase.cpp index fcc29a8..e05a0e7 100644 --- a/rudict/rudict/grammarCase.cpp +++ b/rudict/rudict/grammarCase.cpp @@ -1,6 +1,6 @@ -#include "grammarCase.h" - -#include +#include "grammarCase.h" + +#include NounCount WStringToNounCount(std::wstring str) { @@ -78,10 +78,10 @@ NounGrammaticalCase WStringToNounGrammaticalCase(std::wstring str) std::cout << "Error in WStringToNounGrammaticalCase!" << std::endl; return NGC_P1_NOMINATIVE; -} - - - +} + + + bool charIsConsolant(wchar_t c) //except { diff --git a/rudict/rudict/http/request_handler.cpp b/rudict/rudict/http/request_handler.cpp index 79421bd..d87c27e 100644 --- a/rudict/rudict/http/request_handler.cpp +++ b/rudict/rudict/http/request_handler.cpp @@ -152,8 +152,6 @@ namespace http { std::set nounStructArr = NN::RecognizeNoun(request); - std::cout <<"nounstructarr" << nounStructArr.size() << std::endl; - id = 0; boost::property_tree::wptree nounArr; @@ -163,25 +161,26 @@ namespace http { boost::property_tree::wptree nounTree; nounTree.put(L"id", id); - nounTree.put(L"grammaticalCase", NounGrammaticalCaseToWString(nounStruct.nounGrammaticalCase)); - nounTree.put(L"animated", nounStruct.animated); - nounTree.put(L"count", NounCountToWString(nounStruct.nounCount)); - nounTree.put(L"canBeAnimate", nounStruct.nounRecord.canBeAnimate); - nounTree.put(L"canBeInanimate", nounStruct.nounRecord.canBeInanimate); - nounTree.put(L"gender", nounStruct.nounRecord.gender); - nounTree.put(L"haveMultipleForm", nounStruct.nounRecord.haveMultipleForm); - nounTree.put(L"haveSingleForm", nounStruct.nounRecord.haveSingleForm); - nounTree.put(L"haveStandardMultipleForm", nounStruct.nounRecord.haveStandardMultipleForm); - nounTree.put(L"haveStandardMultipleFormWithMissingLastVowel", nounStruct.nounRecord.haveStandardMultipleFormWithMissingLastVowel); - nounTree.put(L"specialMultipleForm", nounStruct.nounRecord.specialMultipleForm); + nounTree.put(L"word", "noun"); + nounTree.put(L"noun.grammaticalCase", NounGrammaticalCaseToWString(nounStruct.nounGrammaticalCase)); + nounTree.put(L"noun.animated", nounStruct.animated); + nounTree.put(L"noun.count", NounCountToWString(nounStruct.nounCount)); + nounTree.put(L"noun.canBeAnimate", nounStruct.nounRecord.canBeAnimate); + nounTree.put(L"noun.canBeInanimate", nounStruct.nounRecord.canBeInanimate); + nounTree.put(L"noun.gender", nounStruct.nounRecord.gender); + nounTree.put(L"noun.haveMultipleForm", nounStruct.nounRecord.haveMultipleForm); + nounTree.put(L"noun.haveSingleForm", nounStruct.nounRecord.haveSingleForm); + nounTree.put(L"noun.haveStandardMultipleForm", nounStruct.nounRecord.haveStandardMultipleForm); + nounTree.put(L"noun.haveStandardMultipleFormWithMissingLastVowel", nounStruct.nounRecord.haveStandardMultipleFormWithMissingLastVowel); + nounTree.put(L"noun.specialMultipleForm", nounStruct.nounRecord.specialMultipleForm); - nounTree.put(L"nominativeSingularForm", nounStruct.nounRecord.nominativeForm); + nounTree.put(L"noun.nominativeSingularForm", nounStruct.nounRecord.nominativeForm); nounArr.push_back(std::make_pair(L"", nounTree)); id++; } - result.put_child(L"nouns", nounArr); + //result.put_child(L"words", nounArr); //Adjective! @@ -189,27 +188,27 @@ namespace http { id = 0; - boost::property_tree::wptree adjectiveArr; for (auto& adjectiveStruct : adjectiveStructArr) { boost::property_tree::wptree adjectivrTree; adjectivrTree.put(L"id", id); - adjectivrTree.put(L"grammaticalCase", NounGrammaticalCaseToWString(adjectiveStruct.grammaticalCase)); - adjectivrTree.put(L"animated", adjectiveStruct.isDeclentionAnimated); - adjectivrTree.put(L"count", NounCountToWString(adjectiveStruct.count)); + adjectivrTree.put(L"word", "adjective"); + adjectivrTree.put(L"adjective.grammaticalCase", NounGrammaticalCaseToWString(adjectiveStruct.grammaticalCase)); + adjectivrTree.put(L"adjective.animated", adjectiveStruct.isDeclentionAnimated); + adjectivrTree.put(L"adjective.count", NounCountToWString(adjectiveStruct.count)); - adjectivrTree.put(L"gender", adjectiveStruct.gender); + adjectivrTree.put(L"adjective.gender", adjectiveStruct.gender); + + adjectivrTree.put(L"adjective.nominativeSingularForm", adjectiveStruct.adjectiveRecord.nominativeMaleForm); - adjectivrTree.put(L"nominativeSingularForm", adjectiveStruct.adjectiveRecord.nominativeMaleForm); - - adjectiveArr.push_back(std::make_pair(L"", adjectivrTree)); + nounArr.push_back(std::make_pair(L"", adjectivrTree)); id++; } - result.put_child(L"adjectives", adjectiveArr); + result.put_child(L"words", nounArr); diff --git a/rudict/rudict/linux/makefile b/rudict/rudict/linux/makefile index db4eebd..93404bd 100644 --- a/rudict/rudict/linux/makefile +++ b/rudict/rudict/linux/makefile @@ -74,6 +74,8 @@ LOCAL_SRC_FILES += ../http/server.cpp LOCAL_SRC_FILES += ../utf8utf16.cpp LOCAL_SRC_FILES += ../noun.cpp +LOCAL_SRC_FILES += ../adjective.cpp +LOCAL_SRC_FILES += ../grammarCase.cpp LOCAL_SRC_FILES += ../main.cpp