Stemmer v1.0.0-beta.1 Stemmer.Step1a
Summary
Functions
Do nothing
Delete if the preceding word part contains a vowel not immediately before
the s
(so gas
and this
retain the s
, gaps
and kiwis
lose it)
Replace by i
if preceded by more than one letter, otherwise by ie
(so
ties
→ tie
, cries
→ cri
)
Replace by ss
## Examples
Functions
Delete if the preceding word part contains a vowel not immediately before
the s
(so gas
and this
retain the s
, gaps
and kiwis
lose it).
Examples
iex> Stemmer.Step1a.remove_s("gas")
{:next, "gas"}
iex> Stemmer.Step1a.remove_s("this")
{:next, "this"}
iex> Stemmer.Step1a.remove_s("gaps")
{:found, "gap"}
iex> Stemmer.Step1a.remove_s("kiwis")
{:found, "kiwi"}
Replace by i
if preceded by more than one letter, otherwise by ie
(so
ties
→ tie
, cries
→ cri
).
Examples
iex> Stemmer.Step1a.replace_ied_ies("tied")
{:found, "tie"}
iex> Stemmer.Step1a.replace_ied_ies("ties")
{:found, "tie"}
iex> Stemmer.Step1a.replace_ied_ies("cries")
{:found, "cri"}
Replace by ss
.
Examples
iex> Stemmer.Step1a.replace_sses("actresses")
{:found, "actress"}