Bug: 330901042

Clone this repo:
  1. 7e7449c Remove Android.bp. by James Farrell · 3 months ago main
  2. c7b322d Make LICENSE file match crate archive contents. by James Farrell · 4 months ago
  3. be87f45 Update Android.bp by running cargo_embargo by James Farrell · 4 months ago
  4. 7a89518 Merge "Remove rust test targets that cannot be run on Android." into main am: 6f4c4826f3 by Treehugger Robot · 6 months ago android15-tests-dev android15-tests-release android-cts-15.0_r2 android-vts-15.0_r2
  5. 6f4c482 Merge "Remove rust test targets that cannot be run on Android." into main by Treehugger Robot · 6 months ago simpleperf-release platform-tools-35.0.2

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.