ExpressionSentenceMatch

ExpressionSentenceMatch

Class representing an ExpressionSentenceMatch

Constructor

new ExpressionSentenceMatch()

Source:

Methods

(static) fromJSON(data) → {ExpressionSentenceMatch}

Source:

Get an instance of ExpressionSentenceMatch from a given JSON

Parameters:
Name Type Description
data ExpressionSentenceMatchJSON

The match data, as returned by CoreNLP API service

Returns:

match - A new ExpressionSentenceMatch instance

Type
ExpressionSentenceMatch

fromJSON(data) → {ExpressionSentenceMatch}

Source:

Update an instance of ExpressionSentenceMatch with data provided by a JSON

Parameters:
Name Type Description
data ExpressionSentenceMatchJSON

The match data, as returned by CoreNLP API service

Returns:

expression - The current match instance

Type
ExpressionSentenceMatch

group(label) → {ExpressionSentenceMatchGroup}

Source:
See:

Nodes in a Macthed expression can be named, we call them groups here, and the labels are the name of the nodes.

Parameters:
Name Type Description
label string

The label name, not prefixed wih $

Returns:

group

Type
ExpressionSentenceMatchGroup

groups() → {Array.<ExpressionSentenceMatchGroup>}

Source:

Returns the main and labeled groups as a list of ExpressionSentenceMatchGroup

Returns:

groups

Type
Array.<ExpressionSentenceMatchGroup>

labels() → {Array.<string>}

Source:

Labels are those aliases you can add to a group match expression, for example, in Semgrex, you can do {ner:/PERSON/=good_guy}, from where "good_guy" would be the label and internally it will come as $good_guy as a member of ExpressionSentenceMatchGroup.

Returns:

labels

Type
Array.<string>