quickwit-oss / whichlang

A blazingly fast and lightweight language detection library for Rust
MIT License
357 stars 13 forks source link

make detect_language return Option<Lang> #16

Open gengjun opened 10 months ago

gengjun commented 10 months ago

Currently, this function can only return one of 16 supported languages. what if the input text is not one of them ?

pub fn detect_language(text: &str) -> Lang;