langid-rs

Crates.iolangid-rs
lib.rslangid-rs
version1.1.0
created_at2025-07-18 10:45:37.667099+00
updated_at2025-09-19 11:33:51.08337+00
descriptionA fast and lightweight language identification library in Rust, inspired by py3langid.
homepage
repositoryhttps://github.com/frederik-uni/langid
max_upload_size
id1758853
size7,695,148
(frederik-uni)

documentation

https://docs.rs/langid

README

LangId

This is a rust conversion of the py3langid library.

This is only a deployment of the library. For training use the original library.

use langid_rs::Model;

fn main() {
    let model = Model::load(false).unwrap();
    //model.set_langs(Some(vec![...])).unwrap();

    let text = "This text is in English.";

    let classification = model.classify(text).unwrap();
    println!("{:?}", classification);
}
Commit count: 9

cargo fmt