Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jedp/porter-stemmer
Martin Porter's stemmer for node.js
https://github.com/jedp/porter-stemmer
Last synced: 9 days ago
JSON representation
Martin Porter's stemmer for node.js
- Host: GitHub
- URL: https://github.com/jedp/porter-stemmer
- Owner: jedp
- License: mit
- Created: 2011-04-20T03:58:26.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2020-09-30T14:07:33.000Z (about 4 years ago)
- Last Synced: 2024-10-11T04:50:30.732Z (about 1 month ago)
- Language: JavaScript
- Homepage:
- Size: 222 KB
- Stars: 99
- Watchers: 2
- Forks: 15
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-tiny-js - porter-stemmer - <img align="top" height="24" src="./img/porter-stemmer.svg"> (Text Search / Reactive Programming)
README
[![build status](https://secure.travis-ci.org/jedp/porter-stemmer.png)](http://travis-ci.org/jedp/porter-stemmer)
porter.js
=========[Martin Porter's stemmer](http://tartarus.org/~martin/PorterStemmer/) wrapped
in CommonJS for use in node.js.Dr Porter explains the stemmer thus:
> The Porter stemming algorithm (or ‘Porter stemmer’) is a process for removing
> the commoner morphological and inflexional endings from words in English. Its
> main use is as part of a term normalisation process that is usually done when
> setting up Information Retrieval systems.This is merely a wrapping of work done by others. The initial javascript port
was done by "Andargor" with substantial revisions by Christopher McKenzie. More
information is available on Porter's site via the link given above.Installation
------------For node.js, using [npm](http://npmjs.org/):
npm install porter-stemmer
or git clone this repo.
Example
-------> var stemmer = require('porter-stemmer').stemmer
> stemmer('Smurftastic')
'Smurftast'Test Suite
----------I have included Dr Porter's sample input and output text in a test suite.
To verify:
npm test