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)]
On the test_case:
Code fell down with an error:
Code example: