Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

langdetect returns IndexError rather than LangDetectException #102

Open
MaxAwan opened this issue Jun 6, 2022 · 0 comments
Open

langdetect returns IndexError rather than LangDetectException #102

MaxAwan opened this issue Jun 6, 2022 · 0 comments

Comments

@MaxAwan
Copy link

MaxAwan commented Jun 6, 2022

scores = langdetect.detect_langs(text)

File "../venv/lib/python3.7/site-packages/langdetect/detector_factory.py", line 116, in detect_langs
detector.append(text)
File "../venv/lib/python3.7/site-packages/langdetect/detector.py", line 106, in append
text = NGram.normalize_vi(text)
File "../venv/lib/python3.7/site-packages/langdetect/utils/ngram.py", line 108, in normalize_vi
return cls.ALPHABET_WITH_DMARK.sub(repl, text)
File "../venv/lib/python3.7/site-packages/langdetect/utils/ngram.py", line 107, in repl
return cls.NORMALIZED_VI_CHARS[dmark][alphabet]
IndexError: list index out of range

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant