From eb5847d1714a67656d055f38e9f3bd53cf144d52 Mon Sep 17 00:00:00 2001 From: Vladislav Khorev Date: Tue, 9 Dec 2014 12:38:12 +0000 Subject: [PATCH] Adjective added to web --- rudict/rudict/adjective.cpp | 50 ++++++++++---------- rudict/rudict/grammarCase.cpp | 12 ++--- rudict/rudict/grammarCase.h | 86 +++++++++++++++++------------------ 3 files changed, 74 insertions(+), 74 deletions(-) diff --git a/rudict/rudict/adjective.cpp b/rudict/rudict/adjective.cpp index 2cf10be..a4b7ecf 100644 --- a/rudict/rudict/adjective.cpp +++ b/rudict/rudict/adjective.cpp @@ -1,4 +1,4 @@ -#include "adjective.h" +#include "adjective.h" #include #include //Xperimental -- for debug only @@ -41,28 +41,28 @@ namespace AJ { 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""); + 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; } @@ -257,12 +257,12 @@ namespace AJ if (charIsIFormConsolant(base[base.size() - 1])) { - return{ base + L"", base + L"" }; + return{ base + L"ий", base + L"ой" }; } if (charIsUFormConsolant(base[base.size() - 1])) { - return{ base + L"", base + L"" }; + return{ base + L"ый", base + L"ой" }; } return{}; diff --git a/rudict/rudict/grammarCase.cpp b/rudict/rudict/grammarCase.cpp index e05a0e7..e5208fb 100644 --- a/rudict/rudict/grammarCase.cpp +++ b/rudict/rudict/grammarCase.cpp @@ -1,4 +1,4 @@ -#include "grammarCase.h" +#include "grammarCase.h" #include @@ -83,9 +83,9 @@ NounGrammaticalCase WStringToNounGrammaticalCase(std::wstring str) -bool charIsConsolant(wchar_t c) //except +bool charIsConsolant(wchar_t c) //except י { - std::wstring consolants = L""; + std::wstring consolants = L"צךםדרשחץפגןנכהזקסלעב"; for (wchar_t ic : consolants) { @@ -100,7 +100,7 @@ bool charIsConsolant(wchar_t c) //except bool charIsVowel(wchar_t c) { - std::wstring vovels = L""; + std::wstring vovels = L"אמף‎¸‏טו"; for (wchar_t ic : vovels) { @@ -114,8 +114,8 @@ bool charIsVowel(wchar_t c) } -std::wstring i_form_consolants = L""; -std::wstring u_form_consolants = L""; +std::wstring i_form_consolants = L"דץךזרקש"; +std::wstring u_form_consolants = L"בןהעגפחסםלכנצ"; bool charIsIFormConsolant(wchar_t c) { diff --git a/rudict/rudict/grammarCase.h b/rudict/rudict/grammarCase.h index cbb5294..976a006 100644 --- a/rudict/rudict/grammarCase.h +++ b/rudict/rudict/grammarCase.h @@ -1,58 +1,58 @@ -#ifndef GRAMMAR_CASE_H_INCLUDED +#ifndef GRAMMAR_CASE_H_INCLUDED #define GRAMMAR_CASE_H_INCLUDED - -#include -#include - -enum NounGender -{ - NG_MALE = 0, - NG_FEMALE, - NG_NEUTRAL + +#include +#include + +enum NounGender +{ + NG_MALE = 0, + NG_FEMALE, + NG_NEUTRAL }; -enum NounGrammaticalCase -{ - NGC_P1_NOMINATIVE = 0, - NGC_P2_GENITIVE, - NGC_P3_DATIVE, - NGC_P4_ACCUSATIVE, - NGC_P5_INSTRUMENTAL, - NGC_P6_PREPOSITIONAL, - NGC_SIZE -}; - -enum NounCount -{ - NC_SINGULAR = 0, - NC_PLURAL, - NC_SIZE +enum NounGrammaticalCase +{ + NGC_P1_NOMINATIVE = 0, + NGC_P2_GENITIVE, + NGC_P3_DATIVE, + NGC_P4_ACCUSATIVE, + NGC_P5_INSTRUMENTAL, + NGC_P6_PREPOSITIONAL, + NGC_SIZE +}; + +enum NounCount +{ + NC_SINGULAR = 0, + NC_PLURAL, + NC_SIZE }; -struct GrammaticalTableRecord -{ - NounCount count; - - NounGrammaticalCase grammaticalCase; - - std::set ending; +struct GrammaticalTableRecord +{ + NounCount count; + + NounGrammaticalCase grammaticalCase; + + std::set ending; }; - -std::wstring NounCountToWString(NounCount nounCount); -NounCount WStringToNounCount(std::wstring str); -std::wstring NounGrammaticalCaseToWString(NounGrammaticalCase nounGrammaticalCase); + +std::wstring NounCountToWString(NounCount nounCount); +NounCount WStringToNounCount(std::wstring str); +std::wstring NounGrammaticalCaseToWString(NounGrammaticalCase nounGrammaticalCase); NounGrammaticalCase WStringToNounGrammaticalCase(std::wstring str); -bool charIsConsolant(wchar_t c); //except - -bool charIsVowel(wchar_t c); - -bool charIsIFormConsolant(wchar_t c); -bool charIsUFormConsolant(wchar_t c); +bool charIsConsolant(wchar_t c); //except й + +bool charIsVowel(wchar_t c); + +bool charIsIFormConsolant(wchar_t c); +bool charIsUFormConsolant(wchar_t c); #endif //GRAMMAR_CASE_H_INCLUDED