pemistahl / lingua-go

The most accurate natural language detection library for Go, suitable for short text and mixed-language text
Apache License 2.0
1.19k stars 66 forks source link

Add confidence metric for single language #19

Closed pemistahl closed 2 years ago

pemistahl commented 2 years ago

A new API method shall be implemented that allows to say whether some text is likely written in one specific language.

pemistahl commented 2 years ago

There is now the following new method fulfilling this purpose:

LanguageDetector.ComputeLanguageConfidence(text string, language Language) float64