normalize

Purpose

Converts the argument to a word’s lexical form.

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

Syntax

normalize($group)

Arguments

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

The function cannot accept a constant as an argument.

Returned Value

The lexical form of a word or 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 single words or noun phrases (these books → this book). It cannot be applied to sentences.

Examples

Dataset

XPDL-rule

Result

I eat ice-cream every day.

rule: r1

{

query: {stem(eat)}:1

result: Match = normalize($1)

}

eat

She eats ice-cream every day.

eat

He ate two ice-creams.

eat