utf8 dammit
This commit is contained in:
parent
7cf1a99d98
commit
295bf0d00f
File diff suppressed because it is too large
Load Diff
@ -195,30 +195,6 @@ std::map<NounTuple, StringSet> getNounEndingTable()
|
||||
bool NounIsInDictionary(std::wstring nounNominative)
|
||||
{
|
||||
|
||||
std::cout <<frequentWordSet.size() << std::endl;
|
||||
|
||||
std::cout << "$$" << wstring_to_string(*frequentWordSet.begin()) << std::endl;
|
||||
std::cout << "$$" << wstring_to_string(nounNominative) << std::endl;
|
||||
|
||||
std::cout << "count" << frequentWordSet.count(nounNominative) << std::endl;
|
||||
|
||||
std::wstring huy = *(frequentWordSet.begin());
|
||||
|
||||
std::cout << "sizeof"<< sizeof(wchar_t) << std::endl;
|
||||
|
||||
std::cout <<"h" << (int)huy[0] << std::endl;
|
||||
std::cout << "n" << (int)nounNominative[0] << " " << (int)nounNominative[1] << " " << (int)nounNominative[2] << " " << (int)nounNominative[3] << " " << (int)nounNominative[4] << std::endl;
|
||||
|
||||
if (nounNominative == huy)
|
||||
{
|
||||
std::cout <<"true!" << std::endl;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cout << "false!" << std::endl;
|
||||
}
|
||||
|
||||
if (frequentWordSet.count(nounNominative) != 0)
|
||||
{
|
||||
|
||||
@ -366,17 +342,10 @@ std::wstring RestoreNounByTuple(std::wstring nounBase, NounTuple nounTuple)
|
||||
std::vector<NounStruct> RecognizeNoun(std::wstring noun)
|
||||
{
|
||||
|
||||
std::cout << "!" << wstring_to_string(noun) << std::endl;
|
||||
|
||||
std::cout << "?" << wstring_to_string(*frequentWordSet.begin()) << std::endl;
|
||||
|
||||
|
||||
std::vector<NounStruct> result;
|
||||
|
||||
auto nounEndingDivisionArr = getPossibleNounEndingDivisionArr(noun);
|
||||
|
||||
std::cout << nounEndingDivisionArr.size() << std::endl;
|
||||
|
||||
for (auto nounEndingDivision : nounEndingDivisionArr)
|
||||
{
|
||||
std::wstring nounBase = nounEndingDivision.first;
|
||||
@ -384,27 +353,20 @@ std::cout << nounEndingDivisionArr.size() << std::endl;
|
||||
|
||||
std::vector<NounTuple> possibleTupleArr = GetPossibleNounTupleArr(nounEnding);
|
||||
|
||||
std::cout << "BASE" << wstring_to_string(nounBase) << std::endl;
|
||||
|
||||
|
||||
for (auto nounTuple : possibleTupleArr)
|
||||
{
|
||||
std::wstring nounNominative = RestoreNounByTuple(nounBase, nounTuple);
|
||||
|
||||
std::cout << "Nominative" << wstring_to_string(nounNominative) << std::endl;
|
||||
|
||||
|
||||
auto possibleNounDetectionSet = GetPossibleNounDeclencionSet(nounNominative);
|
||||
|
||||
|
||||
std::cout <<"setsize" << possibleNounDetectionSet.size() << std::endl;
|
||||
|
||||
if (possibleNounDetectionSet.count(std::get<0>(nounTuple)) != 0)
|
||||
{
|
||||
|
||||
std::cout<<"if1" << std::endl;
|
||||
if (NounIsInDictionary(nounNominative))
|
||||
{
|
||||
std::cout <<"result1 go!" << std::endl;
|
||||
result.push_back({ nounTuple, nounNominative });
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user