partofspeech

Purpose

The function finds documents that contain occurrences of arguments with a particular part-of-speech and optional grammatical values.

Syntax

partofspeech(pos, term,…​)

Arguments

The first argument pos indicates a 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, …​

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 …​

The parameter may also 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):

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:

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

Grammatical values can be concatenated in arbitrary order:

partofspeech(noun_animate_singular) = partofspeech(noun_singular_animate) = partofspeech(singular_noun_animate), etc.

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

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

Returned Value

Documents matching the query.

Examples

partofspeech(noun) matches all nouns.

partofspeech(noun_singular) = partofspeech(noun_sg) matches all singular nouns.

partofspeech(pronoun_singular) matches all singular pronouns.

partofspeech(noun_proper|pronoun) matches all proper nouns and pronouns.

partofspeech(noun, building) matches "building" in "apartment buildings" but not in "building a website".

partofspeech(noun_singular, building) matches "building" in "apartment building" but not in "apartment buildings".