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

Output in case of mixed languages #12

Closed
vipulvkp opened this issue Oct 28, 2016 · 1 comment
Closed

Output in case of mixed languages #12

vipulvkp opened this issue Oct 28, 2016 · 1 comment

Comments

@vipulvkp
Copy link

Hi,
I am giving a big string to the cld to detect the language as below
CLD.detect_language(" ... a big string ...")

Now the interesting part is that "a big string " contains some french , some chinese and some english.
So what is the underlying logic that the gem uses to decide the language of that ".. big string .."

Regards

@grosser
Copy link
Collaborator

grosser commented Oct 28, 2016

I think it checks for common characters and then picks the one with the highest confidence ... so 10% german + 90% chinese = chinese

@grosser grosser closed this as completed Oct 28, 2016
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

2 participants