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 Rewrite module (without API changes) Oct 16, 2016
.gitignore Add `yarn.lock` to `.gitignore` Aug 29, 2018
.npmrc Add `.npmrc` Aug 29, 2018
.prettierignore Refactor code-style Aug 29, 2018
.travis.yml Update Node in Travis Aug 29, 2018
cli.js Refactor code-style Aug 29, 2018
index.js Refactor code-style Aug 29, 2018
license
package.json 1.0.3 Aug 29, 2018
readme.md Refactor code-style Aug 29, 2018
test.js Refactor code-style Aug 29, 2018

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