Handbook
Glossary
step1b ( str -- newstr )
Porter stemming algorithm
Prev:
step1a ( str -- newstr )
Next:
step1c ( str -- newstr )
Vocabulary
porter-stemmer
Inputs
str
a
string
Outputs
newstr
a new string
Word description
Gets rid of "-ed" and "-ing" suffixes.
Examples
Input
Output
feed
feed
agreed
agree
disabled
disable
matting
mat
mating
mate
meeting
meet
milling
mill
messing
mess
meetings
meet
Definition
USING:
combinators
splitting
;
IN:
porter-stemmer
:
step1b
( str -- newstr )
{
{
[
"eed"
?tail
]
[
-eed
]
}
{
[
{
{
~quotation~ ~quotation~
}
{
~quotation~ ~quotation~
}
[
f
]
}
cond
]
[
-ed/ing
]
}
[
]
}
cond
;