AlvisNLP

corpus processing engine

RemoveOverlaps

Synopsis

Removes overlapping annotations from a given layer.

Description

RemoveOverlaps removes overlapping annotations in the layer layer .

RemoveOverlaps scans each specified layer and finds clusters of overlapping annotations. RemoveOverlaps distinguishes three overlapping situations:

  1. equal : two annotations have exactly the same span;
  2. included : one annotation includes the other completely;
  3. overlapping : one annotation overlaps with the head or the tail of the other annotation.

removeEqual , removeIncluded and removeOverlapping specify the behavior for each situation. If the parameter is true , then RemoveOverlaps will remove one of the annotations.

annotationComparator controls which annotation is removed.

By default RemoveOverlaps removes all kinds of annotations, keeping the longest one.

Snippet

<removeoverlaps class="RemoveOverlaps">
    <layer></layer>
</removeoverlaps>

Mandatory parameters

layer

Mandatory
Type: String

Name of the layer to clear.

Optional parameters

annotationComparator

Default value: `length`

Comparator to use in order to choose between overlapping annotations.

documentFilter

Default value: `true`
Type: Expression

Only process document that satisfy this expression.

removeEqual

Default value: `true`
Type: Boolean

Either to remove annotations with equal spans.

removeIncluded

Default value: `true`
Type: Boolean

Either to remove annotations fully included in another annotation.

removeOverlapping

Default value: `true`
Type: Boolean

Either to remove strictly overlapping annotations.

sectionFilter

Default value: `true`
Type: Expression

Process only sections that satisfy this expression.

Deprecated parameters

layerName

Deprecated
Type: String

Deprecated alias for layer .