You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "/home/essential/PycharmProjects/pythonProject/test_unnest.py", line 363, in <module>
for lang, sentence in detector.detect_multiple_languages_of(text)
File "/home/essential/PycharmProjects/pythonProject/venv/lib/python3.10/site-packages/lingua/detector.py", line 389, in detect_multiple_languages_of
_merge_adjacent_results(results, mergeable_result_indices)
File "/home/essential/PycharmProjects/pythonProject/venv/lib/python3.10/site-packages/lingua/detector.py", line 114, in _merge_adjacent_results
end_index=results[i + 1].end_index,
IndexError: list index out of range
Code example:
languages = [Language.ENGLISH, Language.RUSSIAN, Language.UKRAINIAN]
detector = LanguageDetectorBuilder.from_languages(*languages).build()
text = ', Ресторан «ТИНАТИН»'
sentences = [(lang, sentence) for lang, sentence in detector.detect_multiple_languages_of(text)]
The text was updated successfully, but these errors were encountered:
On the test_case:
Code fell down with an error:
Code example:
The text was updated successfully, but these errors were encountered: