AlvisNLP

corpus processing engine

MergeSections

Synopsis

Merge several sections into a single one.

Description

MergeSections creates a section named targetSection that is a concatenation of all sections that satisfy sectionFilter . Layers, annotations, relations and tuples of the source sections are copied to the new section. Additionally, MergeSections can select or strip contents from annotations from fragmentLayer .

Snippet

<mergesections class="MergeSections">
    <targetSection></targetSection>
</mergesections>

Mandatory parameters

targetSection

Mandatory
Type: String

Name of the section to create.

Optional parameters

constantAnnotationFeatures

Optional
Type: Mapping

Constant features to add to each annotation 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.

fragmentLayer

Optional
Type: String

Name of the layer that contains annotations to include/exclude in/from the new section contents. If this parameter is not set, then MergeSections concatenates the whole contents of the sections.

sectionsLayer

Optional
Type: String

Name of the layer in the new section that contains annotations that have the span of the contents of the source sections. Each source section is represented by a distinct annotation. This annotations have the same features as the corresponding section (including name ). If this parameter is not set, then MergeSections does not create thses annotations.

documentFilter

Default value: `true`
Type: Expression

Only process document that satisfy this expression.

fragmentSelection

Default value: `exclude`

If this parameter equals include , then MergeSections only concatenates contents that is included in annotations in the layer fragmentLayer . If this parameter equals exclude , then MergeSections only concatenates contents that is not included in annotations in the layer fragmentLayer . If fragmentLayer is not set, then this parameter is ignored.

fragmentSeparator

Default value: ``
Type: String

Text to insert between the contents of concatenated fragments. If fragmentLayer is not set, then this parameter is ignored.

removeSections

Default value: `true`
Type: Boolean

Either to remove the sections that have been concatenated after the new section has been created.

sectionFilter

Default value: `true`
Type: Expression

Process only sections that satisfy this expression.

sectionSeparator

Default value: ``
Type: String

Text to insert between the contents of the concatenated sections.

Deprecated parameters

fragmentLayerName

Deprecated
Type: String

Deprecated alias for fragmentLayer .

sectionsLayerName

Deprecated
Type: String

Deprecated alias for sectionsLayer .

targetSectionName

Deprecated
Type: String

Deprecated alias for targetSection .