Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

retext-porter-stemmer

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

retext-porter-stemmer

Retext implementation of the Porter Stemmer

  • 0.2.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-75%
Maintainers
1
Weekly downloads
 
Created
Source

retext-porter-stemmer Build Status Coverage Status

retext implementation of the Porter stemming algorithm.

Installation

npm:

$ npm install retext-porter-stemmer

Component:

$ component install wooorm/retext-porter-stemmer

Bower:

$ bower install retext-porter-stemmer

Usage

var Retext = require('retext'),
    visit = require('retext-visit'),
    porterStemmer = require('retext-porter-stemmer'),
    retext;

retext = new Retext()
    .use(visit)
    .use(porterStemmer)

retext.parse('A simple english sentence.', function (err, tree) {
    tree.visitType(root.WORD_NODE, function (node) {
        console.log(node.toString(), node.data.stem);
    });
    /**
     * 'A', 'A'
     * 'simple', 'simpl'
     * 'english', 'english'
     * 'sentence', 'sentenc'
     */
});

The above example uses retext 0.2.0, which is currently in beta. For an example with the stable retext, see retext-porter-stemmer@0.1.0.

API

None, the plugin automatically stems each word (using wooorm/stemmer) when it’s created or changed, and stores the stem in wordNode.data.stem.

  • retext-lancaster-stemmer — Same workings, but uses the Lancaster (Paice/Husk) stemming algorithm.

License

MIT © Titus Wormer

Keywords

FAQs

Package last updated on 21 Oct 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc