py-googletranslation
py-googletranslation copied to clipboard
language detection doesn't work if the language is english
trans = Translator()
print(trans.detect('Hello boy'))
answer:
Detected(lang=, confidence=0.0)
but it works for Russian (with zero confidence):
print(trans.detect('Привет'))
# Detected(lang=ru, confidence=0.0)
Found same issue running the example from help page.
>>> from pygoogletranslation import Translator
>>> translator = Translator()
>>> print(translator.detect('காலை வணக்கம்,'))
Detected(lang=ta, confidence=0.0)
>>> print (translator.detect('この文章は日本語で書かれました。'))
Detected(lang=, confidence=0.0)
>>> print(translator.detect('This sentence is written in English.'))
Detected(lang=, confidence=0.0)
>>> print(translator.detect('Tiu frazo estas skribita en Esperanto.'))
Detected(lang=, confidence=0.0)
I'm having the same issue as well, any way to fix? @Saravananslb
Guuuuuuuuys, let's solve this problem, I've been waiting for a month