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
Action to perform on each result of target .
target
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
Constant features to add to each annotation created by this module.
constantDocumentFeatures
Constant features to add to each document created by this module.
constantRelationFeatures
Constant features to add to each relation created by this module.
constantSectionFeatures
Constant features to add to each section created by this module.
constantTupleFeatures
Constant features to add to each tuple created by this module.
addToLayer
Allow to add annotations to layers.
commit
Elements after which to commit changes. The expression is evaluated as a list of elements with the corpus as the context element.
createAnnotations
Allow the creation of annotations.
createDocuments
Allow the creation of documents.
createRelations
Allow the creation of relations.
createSections
Allow the creation of sections.
createTuples
Allow to create tuples.
deleteElements
Allow to delete elements.
removeFromLayer
Allow to remove annotations from layers.
setArguments
Allow to set tuple arguments.
setFeatures
Allow to set element features.