Handbook
Glossary
step3 ( str -- newstr )
Porter stemming algorithm
Prev:
step2 ( str -- newstr )
Next:
step4 ( str -- newstr )
Vocabulary
porter-stemmer
Inputs
str
a
string
Outputs
newstr
a new string
Word description
Deals with -c-, -full, -ness, etc. Similar strategy to
step2
.
Definition
USING:
combinators
splitting
;
IN:
porter-stemmer
:
step3
( str -- newstr )
{
{
[
"icate"
?tail
]
[
"icate"
"ic"
r
]
}
{
[
"ative"
?tail
]
[
"ative"
""
r
]
}
{
[
"alize"
?tail
]
[
"alize"
"al"
r
]
}
{
[
"iciti"
?tail
]
[
"iciti"
"ic"
r
]
}
{
[
"ical"
?tail
]
[
"ical"
"ic"
r
]
}
{
[
"ful"
?tail
]
[
"ful"
""
r
]
}
{
[
"ness"
?tail
]
[
"ness"
""
r
]
}
[
]
}
cond
;