Small fix

This commit is contained in:
Nikolay Degterinsky 2022-01-19 10:31:04 +00:00
parent 8d03099c91
commit 8c1c3f0ce8
3 changed files with 7 additions and 1 deletions

View File

@ -182,7 +182,7 @@ public:
for (size_t j = 0; j < top_N; ++j)
{
if (pc[j] == 0 && j != 0)
if (pc[j] == 0)
break;
auto res_str = FunctionDetectLanguageImpl::codeISO(LanguageCode(result_lang_top3[j]));

View File

@ -3,7 +3,10 @@ en
fr
ja
zh
un
{'ja':0.62,'fr':0.36}
{'ko':0.98}
{}
ISO-8859-1
en
0.465

View File

@ -8,7 +8,10 @@ SELECT detectLanguage('Sweet are the uses of adversity which, like the toad, ugl
SELECT detectLanguage('A vaincre sans peril, on triomphe sans gloire.');
SELECT detectLanguage('二兎を追う者は一兎をも得ず');
SELECT detectLanguage('有情饮水饱,无情食饭饥。');
SELECT detectLanguage('*****///// _____ ,,,,,,,, .....');
SELECT detectLanguageMixed('二兎を追う者は一兎をも得ず二兎を追う者は一兎をも得ず A vaincre sans peril, on triomphe sans gloire.');
SELECT detectLanguageMixed('어디든 가치가 있는 곳으로 가려면 지름길은 없다');
SELECT detectLanguageMixed('*****///// _____ ,,,,,,,, .....');
SELECT detectCharset('Plain English');
SELECT detectLanguageUnknown('Plain English');