[][src]Trait polystem::Stemmer

pub trait Stemmer {
    fn stem(word: &str) -> String;
}

Required methods

fn stem(word: &str) -> String

Loading content...

Implementors

impl Stemmer for Porter[src]

fn stem(word: &str) -> String[src]

Porter stemming algorithm.

This version was derived from the C version published at tartarus.org/martin/PorterStemmer

Porter, 1980, An algorithm for suffix stripping, Program, Vol. 14, No. 3, pp 130-137

impl Stemmer for S[src]

fn stem(word: &str) -> String[src]

A simple stemmer that strips ies, es and s from terms. Dervied from the s-stemmer in the Atire search engine.

Examples

use polystem::Stemmer;

let term = "flies";
let stem = polystem::S::stem(&term);

assert_eq!("fly", stem);
Loading content...