[−][src]Function whatlang::detect
pub fn detect(text: &str) -> Option<Info>
Detect a language and a script by a given text.
Example
use whatlang::{detect, Lang, Script}; let info = detect("Ĉu vi ne volas eklerni Esperanton? Bonvolu!").unwrap(); assert_eq!(info.lang(), Lang::Epo); assert_eq!(info.script(), Script::Latin);