langdetect icon indicating copy to clipboard operation
langdetect copied to clipboard

detect("Hello world") say nl!

Open cseshahriar opened this issue 2 years ago • 4 comments

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

cseshahriar avatar Feb 19 '23 08:02 cseshahriar

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

This problem exists in most words.!!

SardarDelha avatar Apr 16 '23 12:04 SardarDelha

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

SardarDelha avatar Apr 16 '23 21:04 SardarDelha

import pprint from langdetect import detect_langs

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

[no:0.6405345342314349, fi:0.3594654657685652]

vsmelov avatar Jun 28 '23 09:06 vsmelov

Interesting

huelsgp27 avatar Jul 14 '23 02:07 huelsgp27