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

language detection doesn't work if the language is english #18

Open
PasaOpasen opened this issue Feb 18, 2021 · 3 comments
Open

language detection doesn't work if the language is english #18

PasaOpasen opened this issue Feb 18, 2021 · 3 comments

Comments

@PasaOpasen
Copy link

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)
@philf5550
Copy link

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)

@ArtanisTheOne
Copy link

I'm having the same issue as well, any way to fix?
@Saravananslb

@PasaOpasen
Copy link
Author

Guuuuuuuuys, let's solve this problem, I've been waiting for a month

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

3 participants