Lemmatisation
From Wikipedia, the free encyclopedia
Lemmatisation is the process of grouping together the different inflected forms of a word so they can be analysed as a single item (cf. Collins English Dictionary, entry for "lemmatise").
In computing, lemmatisation is the algorithmic process of determining the lemma for a given word. Since the process may involve complex tasks such as understanding context and determining the part of speech of a word in a sentence (requiring, for example, knowledge of the grammar of a language) it can be a hard task to implement a lemmatiser for a new language.
In many languages, words appear in several inflected forms. For example, in English, the verb 'to walk' may appear as 'walk', 'walked', 'walks', 'walking'. The base form, 'walk', that one might look up in a dictionary, is called the lemma for the word. The combination of the base form with the part of speech is often called the lexeme of the word.
Lemmatisation is closely related to stemming. The difference is that a stemmer operates on a single word without knowledge of the context, and therefore cannot discriminate between words which have different meanings depending on part of speech. However, stemmers are typically easier to implement and run faster, and the reduced accuracy may not matter for some applications.
For instance:
- The word "better" has "good" as its lemma, but this is missed in the stemming.
- The word "walk" is the base form for word "walking", and hence this is matched in both stemming and lemmatization.
Analysers like Lucene Snowball store the base stemmed format of the word without the knowledge of meaning, but taking into account the semantics of the word formation only. The stemmed word itself might not be valid. (see lazi below)
The following is an example of lemmatisation and stemming. Given the following sentence:
[The] [quick] [brown] [fox] [jumped] [over] [the] [lazy] [dogs]
org.apache.lucene.analysis.snowball.SnowballAnalyzer gives the following stems:
[quick] [brown] [fox] [jump] [over] [lazi] [dog]
the lemmas from the words in the sentence would be as follows:
[the] [quick] [brown] [fox] [jump] [over] [the] [lazy] [dog]