langid-rs 1.1.0

A fast and lightweight language identification library in Rust, inspired by py3langid.
Documentation
  • Coverage
  • 13.33%
    2 out of 15 items documented0 out of 7 items with examples
  • Size
  • Source code size: 7.69 MB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.82 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 18s Average build duration of successful builds.
  • all releases: 16s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • frederik-uni/langid
    0 0 1
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • frederik-uni

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);
}