@@ -2,27 +2,26 @@ The official javascript implementation of the Porter Stemmer.
2
2
3
3
# About
4
4
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 ) .
9
6
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.
11
11
12
12
# Usage
13
13
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.
15
15
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.
18
18
19
19
For instance, ` stemmer("hopefully", true) ` will output ` 1c /^(.*[aeiouy].*)y$/ hopefulli ` , telling us that rule 1c was matched
20
20
by that regular expression and as a result, we got hopefulli.
21
21
22
22
# Status
23
23
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.
26
25
27
26
# Demo
28
27
0 commit comments