Porter stemming algorithm


The help system uses the Porter stemming algorithm to normalize words when building the full-text search index.

The Factor implementation of the algorithm is based on the Common Lisp version, which was hand-translated from ANSI C by Steven M. Haflich. The original ANSI C was written by Martin Porter.

A detailed description of the algorithm, along with implementations in various languages, can be at in http://www.tartarus.org/~martin/PorterStemmer.

The main word of the algorithm takes an English word as input and outputs its stem:
stem ( str -- newstr )


The algorithm consists of a number of steps:
step1a ( str -- newstr )

step1b ( str -- newstr )

step1c ( str -- newstr )

step2 ( str -- newstr )

step3 ( str -- newstr )

step4 ( str -- newstr )

step5 ( str -- newstr )