Lancaster stemming algorithm
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.editorconfig
.gitignore
.npmrc
.prettierignore
.travis.yml
cli.js
index.js
license
package.json
readme.md
test.js

readme.md

lancaster-stemmer Build Status Coverage Status

Lancaster stemming algorithm.

API

Install:

npm install lancaster-stemmer

Use:

var lancasterStemmer = require('lancaster-stemmer')

lancasterStemmer('considerations') // => 'consid'
lancasterStemmer('detestable') // => 'detest'
lancasterStemmer('vileness') // => 'vil'
lancasterStemmer('giggling') // => 'giggl'
lancasterStemmer('anxious') // => 'anxy'

// Case insensitive
lancasterStemmer('analytic') === lancasterStemmer('AnAlYtIc') // => true

CLI

Install:

npm install -g lancaster-stemmer

Use:

Usage: lancaster-stemmer [options] <words...>

Lancaster stemming algorithm

Options:

  -h, --help           output usage information
  -v, --version        output version number

Usage:

# output stems
$ lancaster-stemmer considerations
consid

# output stems from stdin
$ echo "detestable vileness" | lancaster-stemmer
detest vil

Related

License

MIT © Titus Wormer