Stemmer v1.0.0-beta.1 Stemmer.Step0

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

Functions

apply(word)
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"
remove_apostrophe_s(word)

Examples

iex> Stemmer.Step0.remove_apostrophe_s("ok's")
"ok"
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"