lemmatize

Purpose

Converts each word of the argument to its lexical form.

This function is the alias for the tolemma() function.

Syntax

lemmatize($argument)

Arguments

Requires a single argument of a string value (named group).

Returned Value

The lexical form of a word or a phrase, i.e. the form under which it appears in a dictionary, for example:

  • singular form for nouns (ice-creams → ice-cream)

  • infinitive form without to for verbs (ate → eat).

The function is used to normalize both single words and sentences.

Examples

Dataset

XPDL-rule

Result

Children wanted to play.

rule: r1

{

query: {phrase(lemma(noun), lemma(verb), lemma(verb))}:m

result: Match = $m

attribute:Lemma = lemmatize($m)

}

Child want play

Ann’s shoes.

rule: r2

{

query: {phrase(lemma(noun), lemma(noun))}:m

result: Match = $m

attribute:Presence = lemmatize($m)

}

Ann shoe