NGrams
Synopsis
Computes annotation n-grams.
Description
NGrams computes the n-grams of annotations in tokenLayer and creates an annotation for each n-gram. If sentenceLayer is set, then no n-gram will cross boundaries of annotations in this layer. If keepAnnotations is set, then NGrams will search for annotations with n-gram boundaries in these layers, if one annotation is found then it is recycled instead of creating a new annotation.
Snippet
<ngrams class="NGrams">
<maxNGramSize></maxNGramSize>
<targetLayer></targetLayer>
</ngrams>
Mandatory parameters
maxNGramSize
Maximum number of tokens in n-grams.
targetLayer
Name of the layer where to add n-gram annotations, recycled annotations will also be added in this layer.
Optional parameters
constantAnnotationFeatures
Constant features to add to each annotation created by this module.
documentFilter
Only process document that satisfy this expression.
keepAnnotations
Name of layers where to search for recycled annotations.
sectionFilter
Process only sections that satisfy this expression.
sentenceLayer
Name of the sentence layer.
tokenLayer
Name of the token layer.
Deprecated parameters
sentenceLayerName
Deprecated alias for sentenceLayer .
targetLayerName
Deprecated alias for targetLayer .
tokenLayerName
Deprecated alias for tokenLayer .