pub trait LanguageDetector {
// Required methods
fn detect_language(&self, text: &str) -> Result<LanguageDetection>;
fn is_supported(&self, language: &str) -> bool;
}
Expand description
Language detection trait
Required Methods§
Sourcefn detect_language(&self, text: &str) -> Result<LanguageDetection>
fn detect_language(&self, text: &str) -> Result<LanguageDetection>
Detect language of given text
Sourcefn is_supported(&self, language: &str) -> bool
fn is_supported(&self, language: &str) -> bool
Check if language is supported