AlvisNLP

corpus processing engine

AnchorTuples

Synopsis

Creates tuples with a common argument.

Description

AnchorTuples evaluates anchor as an element list with the corpus as the context element (see alvisnlp.corpus.Expression >). For each anchor, AnchorTuples creates a tuple in the relation named after relation , with the anchor as an argument with role anchorRole and the first annotation in the result of each value of arguments with the role of the corresponding key. arguments values are evaluated as element lists with the anchor as the context element.

Snippet

<anchortuples class="AnchorTuples">
    <anchor></anchor>
    <anchorRole></anchorRole>
    <arguments></arguments>
    <relation></relation>
</anchortuples>

Mandatory parameters

anchor

Mandatory
Type: Expression

First argument of each created tuple.

anchorRole

Mandatory
Type: String

Name of the role for the anchor in the created tuple.

arguments

Mandatory

Role/expression pairs of additional arguments for the created tuples. Expressions are evaluated as element lists with the anchor as the context element.

relation

Mandatory
Type: String

Name of the relation in which tuples must be created.

Optional parameters

constantRelationFeatures

Optional
Type: Mapping

Constant features to add to each relation created by this module

constantTupleFeatures

Optional
Type: Mapping

Constant features to add to each tuple created by this module

documentFilter

Default value: `true`
Type: Expression

Only process document that satisfy this expression.

sectionFilter

Default value: `true`
Type: Expression

Process only sections that satisfy this expression.

Deprecated parameters

relationName

Deprecated
Type: String

Deprecated alias for relation .