AlvisNLP

corpus processing engine

Action

Synopsis

Applies action expressions on selected elements.

Description

Action evaluates commit as a list of elements, then target as a list of elements on each commit element, then action on each target element.

Action is useful when action is a side-effect expression. The side-effect expressions allowed are controlled by: createDocuments , createSections , createRelations , createTuples , createAnnotations , setArguments , setFeatures and deleteElements . If these parameters are not set to true then Action will refuse to evaluate the corresponding side-effect expressions.

Action commits the changes on the data structure when each commit element is done. When processing very large corpora, set commit to reach documents or sections.

Snippet

<action class="Action">
    <action></action>
    <target></target>
</action>

Mandatory parameters

action

Mandatory
Type: Expression

Action to perform on each result of target .

target

Mandatory
Type: Expression

Elements on which to perform the action. The expression is evaluated as a list of elements with the commit element as the context element.

Optional parameters

constantAnnotationFeatures

Optional
Type: Mapping

Constant features to add to each annotation created by this module.

constantDocumentFeatures

Optional
Type: Mapping

Constant features to add to each document created by this module.

constantRelationFeatures

Optional
Type: Mapping

Constant features to add to each relation created by this module.

constantSectionFeatures

Optional
Type: Mapping

Constant features to add to each section created by this module.

constantTupleFeatures

Optional
Type: Mapping

Constant features to add to each tuple created by this module.

addToLayer

Default value: `false`
Type: Boolean

Allow to add annotations to layers.

commit

Default value: `$`
Type: Expression

Elements after which to commit changes. The expression is evaluated as a list of elements with the corpus as the context element.

createAnnotations

Default value: `false`
Type: Boolean

Allow the creation of annotations.

createDocuments

Default value: `false`
Type: Boolean

Allow the creation of documents.

createRelations

Default value: `false`
Type: Boolean

Allow the creation of relations.

createSections

Default value: `false`
Type: Boolean

Allow the creation of sections.

createTuples

Default value: `false`
Type: Boolean

Allow to create tuples.

deleteElements

Default value: `false`
Type: Boolean

Allow to delete elements.

removeFromLayer

Default value: `false`
Type: Boolean

Allow to remove annotations from layers.

setArguments

Default value: `false`
Type: Boolean

Allow to set tuple arguments.

setFeatures

Default value: `false`
Type: Boolean

Allow to set element features.

Deprecated parameters