This is a
playground to test code. It runs a full
Node.js environment and already has all of
npm’s 400,000 packages pre-installed, including
wink-porter2-stemmer with all
npm packages installed. Try it out:
This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.
Implementation of Porter Stemmer Algorithm V2 by Dr Martin F Porter
Stem an inflected word into its base form using
Use npm to install:
npm install wink-porter2-stemmer --save
// Load porter stemmer V2 var stem = require( 'wink-porter2-stemmer' ); console.log( stem( 'properly' ) ); // -> proper console.log( stem( 'borrowed' ) ); // -> borrow console.log( stem( 'stemming' ) ); // -> stem
Stems an inflected
word using Porter2 stemming algorithm.
wordstring — word to be stemmed.
stem( 'consisting' ); // -> consist
Returns string — the stemmed word.
If you spot a bug and the same has not yet been reported, raise a new issue or consider fixing it and sending a pull request.
Wink is a family of open source packages for Statistical Analysis, Natural Language Processing and Machine Learning in NodeJS. The code is thoroughly documented for easy human comprehension and has a test coverage of ~100% for reliability to build production grade solutions.
wink-porter2-stemmer is copyright 2017-18 GRAYPE Systems Private Limited.
It is licensed under the terms of the MIT License.