string/language_detect_utils library
Heuristic n-gram language detector (lite, best-effort) — roadmap #428.
Classes
- LanguageGuess
- Result of a language detection: the language code and a score.
Functions
-
detectLanguage(
String text) → LanguageGuess? -
Detects the dominant language of
text; returns null when too short. -
languageTrigrams(
String text) → List< String> -
Extracts ranked trigrams from
text, most frequent first.