Martin Porter's stemmer for node.js
Switch branches/tags
Nothing to show
Clone or download
Latest commit bff6d77 Feb 21, 2013
Failed to load latest commit information.
MARTINS_LICENSE.txt added license info May 28, 2011
package.json added travis-ci; moved tests to vows; can npm test Dec 13, 2012

build status porter.js

Martin Porter's stemmer wrapped in CommonJS for use in node.js.

Dr Porter explains the stemmer thus:

The Porter stemming algorithm (or ‘Porter stemmer’) is a process for removing the commoner morphological and inflexional endings from words in English. Its main use is as part of a term normalisation process that is usually done when setting up Information Retrieval systems.

This is merely a wrapping of work done by others. The initial javascript port was done by "Andargor" with substantial revisions by Christopher McKenzie. More information is available on Porter's site via the link given above.


For node.js, using npm:

npm install porter-stemmer

or git clone this repo.


> var stemmer = require('porter-stemmer').stemmer
> stemmer('Smurftastic')

Test Suite

I have included Dr Porter's sample input and output text in a test suite.

To verify:

npm test