fixing bug

This commit is contained in:
Vladislav Khorev 2014-11-29 00:52:15 +00:00
parent 55f4f56b35
commit ac5ea38c9f
2 changed files with 5 additions and 5 deletions

View File

@ -351,9 +351,9 @@ bool charIsVowel(wchar_t c)
}
std::vector<std::pair<std::wstring, std::wstring>> getPossibleNounEndingDivisionArr(std::wstring noun)
std::set<std::pair<std::wstring, std::wstring>> getPossibleNounEndingDivisionSet(std::wstring noun)
{
std::vector<std::pair<std::wstring, std::wstring>> result;
std::set<std::pair<std::wstring, std::wstring>> result;
auto allNounEndingArr = GetAllNounEndingArr();
@ -365,7 +365,7 @@ std::vector<std::pair<std::wstring, std::wstring>> getPossibleNounEndingDivision
if (charIsConsolant(nounBase[nounBase.size() - 1]) || nounBase[nounBase.size() - 1] == L'ь' || nounBase[nounBase.size() - 1] == L'ъ')
{
result.push_back({ nounBase, ending});
result.insert({ nounBase, ending});
}
}
}
@ -790,7 +790,7 @@ std::vector<NounStruct> RecognizeNoun(std::wstring noun)
std::vector<NounStruct> result;
auto nounEndingDivisionArr = getPossibleNounEndingDivisionArr(noun);
auto nounEndingDivisionArr = getPossibleNounEndingDivisionSet(noun);
for (auto nounEndingDivision : nounEndingDivisionArr)
{

View File

@ -121,7 +121,7 @@ struct NounStruct
};
std::vector<std::pair<std::wstring, std::wstring>> getPossibleNounEndingDivisionArr(std::wstring noun);
std::set<std::pair<std::wstring, std::wstring>> getPossibleNounEndingDivisionSet(std::wstring noun);
std::vector<NounTuple> GetPossibleNounTupleArr(std::wstring nounEnding);