[Home]HomePage

HomePage | RecentChanges | Preferences

Stemmer is a Gem package of (right now) the Porter word stemming algorithm. The code was ported from Perl to Ruby by RayPereda? and packaged as a Gem via RubyForge by MattMower.

Install

gem install stemmer

Import

require 'stemmer'

This will import the default Stemmer. At the moment there is only one, however other stemmers may be included in future. To import a specific stemmer,

require 'stemmer/porter'

Use

By default the Porter stemmer will add the stem method to String. You can also include the Stemmable module in your own classes. The stem method uses self.dup.to_str as the basis for stemming.


HomePage | RecentChanges | Preferences
Edit text of this page | View other revisions
Last edited April 21, 2005 4:51 am by MattMower (diff)
Search: