Skip to content

Commit 0e1fcfe

Browse files
committed
Split off of Porter2 and Porter1980
1 parent 811855b commit 0e1fcfe

File tree

6 files changed

+9
-30774
lines changed

6 files changed

+9
-30774
lines changed

PorterStemmer2.js

-285
This file was deleted.

PorterStemmer2.min.js

-7
This file was deleted.

README.md

+9-10
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,26 @@ The official javascript implementation of the Porter Stemmer.
22

33
# About
44

5-
There are two reference implementation here, corresponding to two different stemmers by Martin Porter, one being
6-
the [original Porter Stemmer from 1980](http://tartarus.org/martin/PorterStemmer/def.txt), covered by PorterStemmer1980.js,
7-
and the second corresponding to the [Porter2 stemming algorithm](http://snowball.tartarus.org/algorithms/english/stemmer.html),
8-
(rev. July 2005) covered by PorterStemmer2.js.
5+
This is the reference javascript implementation for the [original Porter Stemmer from 1980](http://tartarus.org/martin/PorterStemmer/def.txt).
96

10-
These files have also been included in the spec directory for referencing.
7+
There is a second project which covers the [Porter2 stemming algorithm](http://snowball.tartarus.org/algorithms/english/stemmer.html),
8+
(rev. July 2005): you can find that at the following url: https://github.com/kristopolous/Porter2-Stemmer.
9+
10+
The reference has also been included in the spec directory.
1111

1212
# Usage
1313

14-
Both implementations are invoked the same way, `stemmer(<word to stem>)`, returning the stemmed word.
14+
Include the js file, then run `stemmer(<word to stem>)` to return the stemmed word.
1515

16-
In both implementations, you can get a trace as to what is going on, corresponding to the steps outlined in the papers, by
17-
provding a second argument of "true" and using one of the browser debug consoles.
16+
You can get a trace as to what is going on, corresponding to the steps outlined in the papers, by provding a second argument of "true"
17+
and using one of the browser debug consoles.
1818

1919
For instance, `stemmer("hopefully", true)` will output `1c /^(.*[aeiouy].*)y$/ hopefulli`, telling us that rule 1c was matched
2020
by that regular expression and as a result, we got hopefulli.
2121

2222
# Status
2323

24-
As of Sept 6, 2012, PorterStemmer1980 is 100% compliant and PorterStemmer2 is 95.21%. 100% complaince of PorterStemmer2 is slated
25-
for completion by October 7th, 2012.
24+
As of Sept 6, 2012, PorterStemmer1980 is 100% compliant.
2625

2726
# Demo
2827

0 commit comments

Comments
 (0)