Function whatlang::detect_lang
[−]
[src]
pub fn detect_lang(text: &str) -> Option<Lang>
Detect only a language by a given text.
Example
use whatlang::{detect_lang, Lang}; let lang = detect_lang("There is no reason not to learn Esperanto.").unwrap(); assert_eq!(lang, Lang::Eng);