1 Acknowledgements

porter-stemmer: a packaging of the porter-stemming implementation by Programming Praxis

 (require (planet dyoo/porter-stemmer:1:=2))

This is a simple packaging of the reference implementation of the Porter Stemming Algorithm; it normalizes English terms to their stems. As a quick example:

> (require (planet dyoo/porter-stemmer))
> (stem "racketeer")


> (stem "singing")


This package provides a single function, stem:

(stem a-word)  string
  a-word : string
stem takes in a single word and removes its morphological and inflexional endings.

For example:
> (stem "smiling")


> (stem "frowned")


> (map stem (regexp-split #px"\\s"
                          (string-append "What are the roots that clutch, what branches grow\n"
                                         "Out of this stony rubbish?")))















Caveat: note that the stemmer does not deal with punctuation.

1 Acknowledgements

This package is derived from the Porter Stemming article from Programming Praxis. As with the original code, this is under the Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License.