Skip to content

module__NGrams

Robert Bossy edited this page Jul 27, 2017 · 1 revision

#org.bibliome.alvisnlp.modules.NGrams

Synopsis

Computes annotation n-grams.

Description

org.bibliome.alvisnlp.modules.NGrams computes the n-grams of annotations in tokenLayerName and creates an annotation for each n-gram. If sentenceLayerName is set, then no n-gram will cross boundaries of annotations in this layer. If keepAnnotations is set, then org.bibliome.alvisnlp.modules.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.

Parameters

Optional

Type: Integer

Maximum number of tokens in n-grams.

Optional

Type: String

Name of the layer where to add n-gram annotations, recycled annotations will also be added in this layer.

Optional

Type: Mapping

Constant features to add to each annotation created by this module

Default value: true

Type: Expression

Only process document that satisfy this filter.

Default value: ``

Type: String[]]

Name of layers where to search for recycled annotations.

Default value: boolean:and(true, nav:layer:words())

Type: Expression

Process only sections that satisfy this filter.

Default value: sentences

Type: String

Name of the sentence layer.

Default value: words

Type: String

Name of the token layer.

Clone this wiki locally