Mimino666 / langdetect

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

detect confidence of a single language #41

Open negfrequency opened 7 years ago

negfrequency commented 7 years ago

e.g. If I solely want the confidence of english detect(text,'en') is this possible?. May just fork and add this feature. I realize it is a non-deterministic, possibly softmax output but still extremely useful.

Thanks, Will

eduamf commented 4 years ago

Excellent! Probably this path can solve the problem in my issue. Portuguese and Spanish share a lot of words, but langdetect prefers Spanish and it`s common to receive "es" instead of "es" and "pt". Sending the desired language, it can evaluate the dictionary/model and turn back the true information. There is an registered issue #71 not equal, but that could use this idea.