Alright been doing good with the studies and getting most done. Now I have a stem() to figure out:
std::string stem (const std::string& word)
// Tries to guess the stem form of an English word by
//applying the following rules: (# and % stand for any
//consonant, and @ for any vowel [aeiou].
//
// If word ends in: replace it by: example:
// ies y flies => fly
// ied y carried => carry
// ier y merrier => merry
// iest y merriest => merry
// ##ed # hitted => hit
// ##ing # hitting => hit
// ##er # hitter => hit
// ##est # hottest => hot
// %@#ed %@#e glided => glide
// %@#ing %@#e gliding => glide
// %@#er %@#e glider => glide
// %@#est %@#e palest => pale
// #ed %# barked => bark
// #ing %# barking => bark
// #er %# colder => cold
// #est %# coldest => cold
// #s # things => thing
// If none of the above rules apply, then the word is
//assumed to be already in its stem form. This function
//returns the stem that it guesses. [Note that these really
//are guesses - it isn't hard to find words on which
// these rules fail. E.g., "pies"]
{
return word;
}
std::string stem (const std::string& word)
// Tries to guess the stem form of an English word by
//applying the following rules: (# and % stand for any
//consonant, and @ for any vowel [aeiou].
//
// If word ends in: replace it by: example:
// ies y flies => fly
// ied y carried => carry
// ier y merrier => merry
// iest y merriest => merry
// ##ed # hitted => hit
// ##ing # hitting => hit
// ##er # hitter => hit
// ##est # hottest => hot
// %@#ed %@#e glided => glide
// %@#ing %@#e gliding => glide
// %@#er %@#e glider => glide
// %@#est %@#e palest => pale
// #ed %# barked => bark
// #ing %# barking => bark
// #er %# colder => cold
// #est %# coldest => cold
// #s # things => thing
// If none of the above rules apply, then the word is
//assumed to be already in its stem form. This function
//returns the stem that it guesses. [Note that these really
//are guesses - it isn't hard to find words on which
// these rules fail. E.g., "pies"]
{
return word;
}