Annotable

CoreNLP/simple. Annotable

Class representing an Annotable

Constructor

new Annotable(text)

Source:

Create an Annotable

Parameters:
Name Type Description
text string

Methods

addAnnotator(annotator)

Source:

Marks an annotator as a met dependency

Parameters:
Name Type Description
annotator Annotator | function

addAnnotators(annotators)

Source:

Marks multiple annotators as a met dependencies

Parameters:
Name Type Description
annotators Array.<(Annotator|function())>

getLanguageISO() → {string}

Source:

Retrieves the language ISO (in lowercase ISO2 format)

Returns:

iso

Type
string

hasAnnotator(annotator) → {boolean}

Source:

Tells you if an annotator is a met dependency

Parameters:
Name Type Description
annotator Annotator | function
Returns:

hasAnnotator

Type
boolean

hasAnyAnnotator(annotators) → {boolean}

Source:

Tells you if at least on of a list of annotators is a met dependency

Parameters:
Name Type Description
annotators Array.<(Annotator|function())>
Returns:

hasAnyAnnotator

Type
boolean

removeAnnotator(annotator)

Source:

Unmarks an annotator as a met dependency

Parameters:
Name Type Description
annotator Annotator | function

setLanguageISO() → {string}

Source:

Sets the language ISO (given by the pipeline during the annotation process) This is solely to keep track of the language chosen for further analysis The language string should be passed in lowercase ISO2 format

Returns:

text

Type
string

text() → {string}

Source:

Get a string representation of the raw text

Returns:

text

Type
string