Handbook
Glossary
step1c ( str -- newstr )
Porter stemming algorithm
Prev:
step1b ( str -- newstr )
Next:
step2 ( str -- newstr )
Vocabulary
porter-stemmer
Inputs
str
a
string
Outputs
newstr
a new string
Word description
Turns a terminal y to i when there is another vowel in the stem.
Definition
USING:
kernel
sequences
splitting
;
IN:
porter-stemmer
:
step1c
( str -- newstr )
dup
but-last-slice
stem-vowel?
[
"y"
?tail
[
"i"
append
]
when
]
when
;