mod compat;
mod detector;
mod error;
mod factory;
mod random;
mod tables;
pub mod text;
pub use compat::{Compat, SumMode, UnicodeVersion};
pub use detector::{Detector, Language};
pub use error::{Error, ErrorCode};
pub use factory::{DetectOptions, DetectorFactory, LangProfile};
pub use random::Seed;
pub fn detect(text: &str) -> Result<String, Error> {
DetectorFactory::builtin().detect(text)
}
pub fn detect_langs(text: &str) -> Result<Vec<Language>, Error> {
DetectorFactory::builtin().detect_langs(text)
}
#[cfg(test)]
mod tests {
fn assert_send_sync<T: Send + Sync>() {}
#[test]
fn factory_is_send_and_sync() {
assert_send_sync::<crate::DetectorFactory>();
}
}