diff --git a/rudict/rudict/noun.cpp b/rudict/rudict/noun.cpp index 2e1d11f..9b77811 100644 --- a/rudict/rudict/noun.cpp +++ b/rudict/rudict/noun.cpp @@ -351,9 +351,9 @@ bool charIsVowel(wchar_t c) } -std::vector> getPossibleNounEndingDivisionArr(std::wstring noun) +std::set> getPossibleNounEndingDivisionSet(std::wstring noun) { - std::vector> result; + std::set> result; auto allNounEndingArr = GetAllNounEndingArr(); @@ -365,7 +365,7 @@ std::vector> 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 RecognizeNoun(std::wstring noun) std::vector result; - auto nounEndingDivisionArr = getPossibleNounEndingDivisionArr(noun); + auto nounEndingDivisionArr = getPossibleNounEndingDivisionSet(noun); for (auto nounEndingDivision : nounEndingDivisionArr) { diff --git a/rudict/rudict/noun.h b/rudict/rudict/noun.h index 238c090..972307f 100644 --- a/rudict/rudict/noun.h +++ b/rudict/rudict/noun.h @@ -121,7 +121,7 @@ struct NounStruct }; -std::vector> getPossibleNounEndingDivisionArr(std::wstring noun); +std::set> getPossibleNounEndingDivisionSet(std::wstring noun); std::vector GetPossibleNounTupleArr(std::wstring nounEnding);