abadojack / whatlanggo

Natural language detection library for Go
MIT License
637 stars 64 forks source link

Language detection issue #21

Open jyothisjose opened 4 years ago

jyothisjose commented 4 years ago

While using "Detect" function Arabic and English in not detecting properly.

We are expecting language as "english" for "hi" and "hello".

But for "hi" getting below response Language: Zulu Script: Latin Confidence: 0.005592493630771142

and for "hello" getting response as Language: Somali Script: Latin Confidence: 0.010694234025487925

How can we provide 2 default languages like "arabic" and "english"? If "arabic" is not detected should provide language as "english" with confidence.

If we try to detect a string with 2 languages "الأجهزة تحت testing type" not getting either english nor arabic.

Language: Uyghur Script: Latin Confidence: 0.06648113790970933

Any idea to handle this.