Skip to content

Stemming and lemmatization

Nenad Ticaric edited this page Sep 5, 2018 · 1 revision

For grammatical reasons, documents are going to use different forms of a word, such as organize, organizes, and organizing. Additionally, there are families of derivationally related words with similar meanings, such as democracy, democratic, and democratization. In many situations, it seems as if it would be useful for a search for one of these words to return documents that contain another word in the set.

The goal of both stemming and lemmatization is to reduce inflectional forms and sometimes derivationally related forms of a word to a common base form. For instance:

  • am, are, is => be
  • car, cars, car's, cars' => car

The result of this mapping of text will be something like:

the boy's cars are different colors => the boy car be differ color

Some examples of stemmed words:

  • caresses => caress
  • ponies => poni
  • cats => cat

By defulat, TNTSearch uses PorterStemmer but can also be extended to use other stemming algorithms

Available built in stemmers are:

  • ArabicStemmer
  • CroatianStemmer
  • GermanStemmer
  • ItalianStemmer
  • NoStemmer
  • PorterStemmer
  • PortugueseStemmer
  • RussianStemmer
  • UkrainianStemmer
Clone this wiki locally