Adjective added to web
This commit is contained in:
parent
418ceea507
commit
eb5847d171
@ -1,4 +1,4 @@
|
||||
#include "adjective.h"
|
||||
#include "adjective.h"
|
||||
#include <string>
|
||||
|
||||
#include <iostream> //Xperimental -- for debug only
|
||||
@ -41,28 +41,28 @@ namespace AJ
|
||||
{
|
||||
std::vector<std::wstring> 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{};
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include "grammarCase.h"
|
||||
#include "grammarCase.h"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
@ -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)
|
||||
{
|
||||
|
@ -1,58 +1,58 @@
|
||||
#ifndef GRAMMAR_CASE_H_INCLUDED
|
||||
#ifndef GRAMMAR_CASE_H_INCLUDED
|
||||
#define GRAMMAR_CASE_H_INCLUDED
|
||||
|
||||
|
||||
#include <set>
|
||||
#include <string>
|
||||
|
||||
enum NounGender
|
||||
{
|
||||
NG_MALE = 0,
|
||||
NG_FEMALE,
|
||||
NG_NEUTRAL
|
||||
|
||||
#include <set>
|
||||
#include <string>
|
||||
|
||||
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<std::wstring> ending;
|
||||
struct GrammaticalTableRecord
|
||||
{
|
||||
NounCount count;
|
||||
|
||||
NounGrammaticalCase grammaticalCase;
|
||||
|
||||
std::set<std::wstring> 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
|
||||
|
Loading…
Reference in New Issue
Block a user