Crates.io | lingo |
lib.rs | lingo |
version | 0.2.0 |
source | src |
created_at | 2021-04-09 20:01:44.669961 |
updated_at | 2022-01-05 23:38:21.053806 |
description | Simple library to detect text languages |
homepage | |
repository | https://github.com/crodas/lingo-rs |
max_upload_size | |
id | 381466 |
size | 3,509,665 |
N-Gram-Based natural language detection library.
use lingo::Lingo;
fn main() {
let textcat = Lingo::new();
let text = "Hi there, this is a simple text written in what language?";
let language = textcat.get_language(text).unwrap();
println!("\"{}\" is written in \"{}\"", text, language);
}
Lingo provides stopwords and stemmers for some languages by wrapping third party libraries.
The usage is quite simple.
use lingo::Language;
fn main() {
let stopwords = Language::English.stopwords()?;
let stemmer = Language::English.stemmer()?;
}