Skip to main content

infer_user_reply_language

Function infer_user_reply_language 

Source
pub fn infer_user_reply_language(text: &str) -> Option<&'static str>
Expand description

Infer a BCP-47 reply-language tag from user-authored text.

Uses script counts only (no NLP). Returns None when the sample is too short or script evidence is inconclusive, so hosts can keep the previous pin or the soft “match the user” rule.