Annotator

CoreNLP/simple. Annotator

Class representing an Annotatror

Constructor

new Annotator(name, optionsopt, dependenciesopt)

Source:

Create an Annotator

Parameters:
Name Type Attributes Description
name string
options Object <optional>

a key-value map of options, without the annotator prefix

dependencies Array.<Annotator> <optional>

Extends

  • Annotator

Methods

dependencies() → {Array.<Annotator>}

Source:

Get a list of annotators dependencies

Returns:

dependencies

Type
Array.<Annotator>

equalsTo(annotator) → {boolean}

Source:

Defines whether a given annotator is the same as current, using shallow compare. This is useful for a Document or Sentence to validate if the minimum of annotators required were already applied to them. Allows at the same time the users to instantiate new annotators and configure them as needed.

Parameters:
Name Type Description
annotator Annotator
Returns:
Type
boolean

option(key, valueopt) → {string}

Source:

Get/Set an option value

Parameters:
Name Type Attributes Default Description
key string
value string | boolean <optional>
null
Returns:

value

Type
string

options() → {Object}

Source:

Get an Object key-value representation of the annotor's options (excluding prefix)

Returns:

options

Type
Object

pipeline() → {Array.<string>}

Source:

Get a list of annotators dependencies, following by this annotator, all this as a list of strings This is useful to fulfill the annotators param in CoreNLP API properties.

Returns:

pipeline

Type
Array.<string>

pipelineOptions() → {Array.<string>}

Source:

Get an object of all the Annotator options including the current and all its dependencies, prefixed by the annotator names This is useful to fulfill the options params in CoreNLP API properties.

Returns:

pipelineOptions

Type
Array.<string>

toString() → {string}

Source:

Get a string representation

Returns:

annotator

Type
string