Snap for 12583183 from 19b4f4109017a0921d84bf62fda956aebbae6aa7 to busytown-mac-infra-release

Change-Id: Ib9d63c1e39856d146372b0069c20b3a75e19f4ea
tree: 6ebba5a27a080841f7a6b8cb7bb997d2b4fa40c1
  1. algorithms/
  2. examples/
  3. src/
  4. Cargo.toml
  5. Cargo.toml.orig
  6. cargo_embargo.json
  7. LICENSE
  8. METADATA
  9. MODULE_LICENSE_BSD
  10. MODULE_LICENSE_MIT
  11. OWNERS
  12. README.md
README.md

Rust Stemmers

This crate implements some stemmer algorithms found in the snowball project which are compiled to rust using the rust-backend of the snowball compiler.

Supported Algorithms

  • Arabic
  • Danish
  • Dutch
  • English
  • French
  • German
  • Greek
  • Hungarian
  • Italian
  • Norwegian
  • Portuguese
  • Romanian
  • Russian
  • Spanish
  • Swedish
  • Tamil
  • Turkish

Usage

extern crate rust_stemmers;
use rust_stemmers::{Algorithm, Stemmer};

// Create a stemmer for the english language
let en_stemmer = Stemmer::create(Algorithm::English);

// Stemm the word "fruitlessly"
// Please be aware that all algorithms expect their input to only contain lowercase characters.
assert_eq!(en_stemmer.stem("fruitlessly"), "fruitless");

Related Projects

  • The stemmer crate provides bindings to the C Snowball implementation.