Mimino666 / langdetect

Port of Google's language-detection library to Python.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

detect("Hello world") say nl!

cseshahriar opened this issue · comments

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

commented

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

This problem exists in most words.!!

commented

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

import pprint
from langdetect import detect_langs

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

[no:0.6405345342314349, fi:0.3594654657685652]

Interesting