New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

porter-stemmer-js

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

porter-stemmer-js

Very fast Porter Stemmer implementation written in Javascript.

  • 1.1.2
  • latest
  • Source
  • npm
  • Socket score

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

Porter Stemmer

Martin Porter stemmer algorithm written in JavaScript. Reference: https://tartarus.org/martin/PorterStemmer/

Features

  • Follows original procedural implementation with char buffer and index pointers for the best performance.
  • Processes the 23k words test suit in 11ms on mobile i5 in node js.
  • It's just one big function that takes string and returns string, no side effects, classes or module scoped regexes.
  • Both ESM and CJS exports.

How to use

npm i porter-stemmer-js
import { PorterStemmer } from "porter-stemmer-js"

// the word to stem must be lower case with no trailing spaces or symbols

const stemmedWord = PorterStemmer("running");

console.log(stemmedWord) // "run"

License

This project is licensed under the MIT License.

Keywords

FAQs

Package last updated on 30 Apr 2024

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