Porter's stemmer for rust
-
Add the dependency to your Cargo.toml
[dependencies.stem] git = "https://github.com/minhnhdo/rust-stem"
-
Usage
let word = "pencils" let s = stem::get(word); match s { Ok(stemmed) => println!("{} => {}", word, stemmed), Err(e) => println!("could not stem! reason: {}", e), }
-
Compile / Run
$ cargo run