toproperty
Purpose

Returns the specified property of the argument.

Syntax

toproperty(prop_param, argument)

Arguments

The function accepts single argument which is a named group.

The first required parameter prop_param specifies the argument property and takes one of the following values:

Value

Comment

pos

Returns part of speech.

category

Returns token category (alpha, alnum…​).

case

Returns token’s case.

sentcase

Returns sentence case.

deplabel

Returns dependency parser tag.

constituencylabel

Returns constituency parser tag.

negate

Determines whether the argument is in a negative construction (negate/direct).

chunk

Returns chunk’s type.

junk

Determines whether the argument is a junk token (junk/nojunk).

number

Returns grammatical number.

person

Returns grammatical person.

gender

Returns grammatical gender.

short

Determines whether the argument is in short form (shortyes/shortno).

degree

Returns grammatical degree of an adjective or an adverb.

animate

Determines whether the argument is an animate noun (animateyes/animateno).

gcase

Returns grammatical case.

tense

Returns verb tense.

verbform

Returns verb form.

mood

Returns verb mood.

transitivity

Returns verb transitivity.

aspect

Returns verb aspect.

voice

Returns verb voice.

  • If the argument consists of several tokens, then the properties of each token are indicated through a comma.

  • If it is necessary to specify several parameters, they can be listed separated by the underscore, for example, toproperty(pos_number, $group).

  • In the output, the properties of one word are combined through the underscore "_".

  • If the argument does not have a specified property, "novalue" will be outputted.

Returned Value

Documents matching the query.

Examples

Dataset

XPDL-rule

Result

The Report doesn’t provide COMPANY shares.

rule: r1

{ query: {word()}:m

result: Match = $m

attribute: Case = toproperty(case, $m)

attribute: Category = toproperty(category, $m)

attribute: POS = toproperty(pos, $m)

attribute: Negate = toproperty(negate, $m)

attribute: Deplabel = toproperty(deplabel, $m) }

Case = title

Category = alpha

POS = noun

Negate = direct

Deplabel = SBJ

The Report doesn’t PROVIDE company shares.

rule: r1

{ query: {word()}:m

result: Match = $m

attribute: Case = toproperty(case, $m)

attribute: Category = toproperty(category, $m)

attribute: POS = toproperty(pos, $m)

attribute: Negate = toproperty(negate, $m)

attribute: Deplabel = toproperty(deplabel, $m) }

Case = upper

Category = alpha

POS = verb

Negate = negate

Deplabel = VC.

The girl sleeps.

rule: r1

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

result: Match = $m

attribute: Combined qualities = toproperty(number_pos_gender, $m) }

Составное свойство = Singular_Noun_Feminine, Singular_Verb_novalue