ExpressionSentence

ExpressionSentence

Class representing an ExpressionSentence

Constructor

new ExpressionSentence(matches)

Source:

Create an ExpressionSentence

Parameters:
Name Type Description
matches Array.<ExpressionSentenceMatch>

Methods

(static) fromJSON(data) → {ExpressionSentence}

Source:

Get an instance of ExpressionSentence from a given JSON of sentence matches

Parameters:
Name Type Description
data ExpressionSentenceJSON

The sentence data, as returned by CoreNLP API service

Returns:

sentence - A new ExpressionSentence instance

Type
ExpressionSentence

fromJSON(data) → {ExpressionSentenceJSON}

Source:

Update an instance of ExpressionSentence with data provided by a JSON

Parameters:
Name Type Description
data ExpressionSentenceJSON

The expression data, as returned by CoreNLP API service

Returns:

sentence - The current sentence instance

Type
ExpressionSentenceJSON

match(index) → {ExpressionSentenceMatch}

Source:

Retrieves a ExpressionSentenceMatch at the index specified

Parameters:
Name Type Description
index number
Returns:

match

Type
ExpressionSentenceMatch

matches() → {Array.<ExpressionSentenceMatch>}

Source:

Retrieves all the contained ExpressionSentenceMatch instances

Returns:

matches

Type
Array.<ExpressionSentenceMatch>

mergeTokensFromSentence() → {ExpressionSentence}

Source:

The Expression / ExpressionSentence objects comes from outside the standard CoreNLP pipelines. This mean that neither TokensRegex, Semgrex nor Tregex will tag the nodes with POS, lemma, NER or any otehr annotation data. This is sometimes a usful resource to count with, if you can apart of getting the matching groups, get the annotated tokens for each word in the match group.

Returns:

instance = The current instance

Type
ExpressionSentence