Handbook
Glossary
stem ( str -- newstr )
Porter stemming algorithm
Next:
step1a ( str -- newstr )
Vocabulary
porter-stemmer
Inputs
str
a
string
Outputs
newstr
a new string
Word description
Applies the Porter stemming algorithm to the input string.
Definition
USING:
kernel
math
sequences
;
IN:
porter-stemmer
:
stem
( str -- newstr )
dup
length
2
<=
[
step1a
step1b
step1c
step2
step3
step4
step5
""
like
]
unless
;