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.0.6
  • 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

browser support

See Browser Support for more information (a.k.a. don’t worry about those grey icons above).


retext implementation of the Porter stemming algorithm.

Installation

NPM:

$ npm install retext-porter-stemmer

Component.js:

$ component install wooorm/retext-porter-stemmer

Usage

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

var root = new Retext()
    .use(visit)
    .use(stemmer)
    .parse('A simple english sentence.');

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

This example also uses retext-visit.

API

None, the plugin automatically stems each word when its created or changed, and stores the stem in wordNode.data.stem.

Browser Support

Pretty much every browser (available through browserstack) runs all retext-porter-stemmer unit tests.

License

MIT

Keywords

FAQs

Package last updated on 19 Jun 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