Mimino666 / langdetect

Port of Google's language-detection library to Python.
Other
1.71k stars 196 forks source link

detect("Hello world") say nl! #108

Open cseshahriar opened 1 year ago

cseshahriar commented 1 year ago

from langdetect import detect detect("Hello world") 'nl'

SardarDelha commented 1 year ago

I have the same problem. from langdetect import detect_langs detect_langs("Buy iPhone") [vi:0.9999983729464899]

This problem exists in most words.!!

SardarDelha commented 1 year ago

@cseshahriar I suggest you use the lingua library, it is much more accurate. I tested and was satisfied. https://github.com/pemistahl/lingua-py

vsmelov commented 1 year ago

import pprint from langdetect import detect_langs

langdetect_ranks = detect_langs("Hello") pprint.pprint(langdetect_ranks)

[no:0.6405345342314349, fi:0.3594654657685652]

huelsgp27 commented 1 year ago

Interesting