Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added step 4

  • Loading branch information...
commit 5aeb0011562e2e332a50c3c68b0eb738d595c221 1 parent 89dd3e9
@weavejester authored
Showing with 9 additions and 1 deletion.
  1. +9 −1 src/stemmer/snowball/english.clj
View
10 src/stemmer/snowball/english.clj
@@ -118,6 +118,13 @@
#"(ful|ness)$" ""
#"ative$" #(if (in-r2? word #"ative$") "" %)))
+(defn step-4 [word]
+ (replace-longest-if in-r2? word
+ #"(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ism|ate|iti|out|ive|ize)$"
+ ""
+ #"(?<=[st])ion"
+ ""))
+
(defn stem [word]
(-> word
(str/replace #"^'" "")
@@ -127,4 +134,5 @@
step-1b
step-1c
step-2
- step-3))
+ step-3
+ step-4))
Please sign in to comment.
Something went wrong with that request. Please try again.