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 issues #9

Open
dom1nga opened this issue Sep 11, 2017 · 2 comments
Open

language detection issues #9

dom1nga opened this issue Sep 11, 2017 · 2 comments

Comments

@dom1nga
Copy link

dom1nga commented Sep 11, 2017

"i hate you".language # => "norwegian"
"i hate you so much".language # => "english"
"i love you".language # => "czech"
"kiss me".language # => "finnish"
"talk to me".language # => "italian"
@Laykou
Copy link

Laykou commented Jul 6, 2020

@hashwin How would you suggest to address these issues please?

@hashwin
Copy link
Owner

hashwin commented Jul 7, 2020

@Laykou @dom1nga this library is based on textcat which uses n-grams to detect a language, not any particular language's dictionary. It can get confused when the input is very short and is as such unreliable in those cases.

My suggestion would be to only trust the result if the input text is at least 5 words long, 10 to be on the safe side.

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