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

Returns 3-letter language instead of 2 #8

Open
confact opened this issue Apr 27, 2021 · 1 comment
Open

Returns 3-letter language instead of 2 #8

confact opened this issue Apr 27, 2021 · 1 comment

Comments

@confact
Copy link

confact commented Apr 27, 2021

Hi,

According to the document, it should return a 2-letter language code but is returning a 3-letter code.

That's okay as I found IsoCode3To1 in the code and are using that.

Might go through the document so it is 3-letter and not 2-letter

For reference, this is how I did it:

code = Cadmium::LanguageDetector.new.detect(text)
Cadmium::Language::IsoCode3To1.new.codes[code]
@watzon
Copy link
Member

watzon commented Apr 29, 2021

What is the code that the first line is returning? Or the text you're testing on?

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