Stemmer.Step0 (Stemmer v1.2.0)

Summary

Functions

Some of the algorithms begin with a step which puts letters which are normally classed as vowels into upper case to indicate that they are are to be treated as consonants (the assumption being that the words are presented to the stemmers in lower case). Upper case therefore acts as a flag indicating a consonant.

Examples

iex> Stemmer.Step0.remove_apostrophe_s("ok's")
"ok"

Examples

iex> Stemmer.Step0.trim_apostrophes("'ok")
"ok"

iex> Stemmer.Step0.trim_apostrophes("o'k")
"o'k"

iex> Stemmer.Step0.trim_apostrophes("'o'k'")
"o'k"

Functions

Link to this function

mark_consonant_y(word)

Some of the algorithms begin with a step which puts letters which are normally classed as vowels into upper case to indicate that they are are to be treated as consonants (the assumption being that the words are presented to the stemmers in lower case). Upper case therefore acts as a flag indicating a consonant.

Set initial y, or y after a vowel, to Y.

Examples

iex> Stemmer.Step0.mark_consonant_y("youth")
"Youth"

iex> Stemmer.Step0.mark_consonant_y("boy")
"boY"

iex> Stemmer.Step0.mark_consonant_y("boyish")
"boYish"

iex> Stemmer.Step0.mark_consonant_y("fly")
"fly"

iex> Stemmer.Step0.mark_consonant_y("flying")
"flying"

iex> Stemmer.Step0.mark_consonant_y("syzygy")
"syzygy"
Link to this function

remove_apostrophe_s(word)

Examples

iex> Stemmer.Step0.remove_apostrophe_s("ok's")
"ok"
Link to this function

trim_apostrophes(word)

Examples

iex> Stemmer.Step0.trim_apostrophes("'ok")
"ok"

iex> Stemmer.Step0.trim_apostrophes("o'k")
"o'k"

iex> Stemmer.Step0.trim_apostrophes("'o'k'")
"o'k"