lemma

Purpose

Using the function lemma(), it is possible to enter a lemma, i.e. the dictionary form of a word, and retrieve all forms of this lemma.

Syntax

lemma([grammatical_value,]term,…​)

Arguments

The first optional argument grammatical_value indicates required part-of-speech and accepts one of the values below:

part-of-speech

synonym

description

examples

noun

matches nouns

event, events, conference, conferences …​

verb

matches verbs

talk, talked, talks, meets …​

adverb

advb

matches adverbs

well, generally, above …​

adjective

adjc

matches adjectives

quick, important, general …​

particle

prcl

matches particles

not, the …​

pronoun

pron

matches pronouns

they, you, she, himself, me, her …​

numeral

nmrl

numerals

one, hundred …​

article

arcl

articles

a, an, the …​

preposition

prep

prepositions

of, to, in, at …​

interjection

intj

interjections

uh, wow …​

conjunction

conj

conjunctions

and, if …​

Optionally, the parameter may specify one or more additional grammatical values such as number, gender, tense, voice, etc. The most frequently-used grammatical values are listed below (full list of supported grammatical values is available on "Info" tab of the Text Tagger node):

grammatical value

synonym

description

examples

singular

sing, sg

matches singular number words

event, conference, he, she, I …​

plural

plur, pl

matches plural number words

events, conferences, they …​

masculine

masc

matches masculine gender words

man, men, John, John’s, he, himself …​

feminine

femn

matches feminine gender words

woman, women, Julia, Julia’s …​

nominative

nomn

matches nominative case words

event, events, Julia, John …​

genitive

gent

matches genitive case words

event’s, Julia’s, John’s …​

accusative

acc

matches accusative case words

me, her …​

animate

anim

matches animate nouns or pronouns

Julia, Julia’s, man, men, John, John’s …​

inanimate

inan

matches inanimate nouns or pronouns

event, conferences, it …​

proper

matches proper nouns

London, Julia, Julia’s, John, John’s …​

comparative

matches comparative adjectives

better, easier …​

superlative

matches superlative adjectives

best, easiest …​

participle

vprt

matches participles

doing, done …​

modal

modl

matches modal verbs

can …​

…​

Grammatical values should be concatenated via underscores:

lemma(noun_animate_singular) matches all animate nouns in singular number only.

Grammatical values can be concatenated in arbitrary order:

lemma(noun_animate_singular) = lemma(noun_singular_animate) = form(singular_noun_animate), etc.

Parameter values can be also combined via "|" operator:

lemma(noun|verb) matches all nouns or verbs.

If the grammatical value is specified, arguments can be omitted. In this case function matches all tokens with a required grammatical value.

Returned Value

Documents matching the query.

Examples

lemma(building) matches "building", "buildings".

lemma(buildings) matches nothing because the argument is not a lemma.

lemma(noun_singular, building) matches "building".

lemma(noun_plural) matches all plural nouns.

lemma(verb) matches all verbs.