Methods
(static) fromJSON(data) → {ExpressionSentenceMatch}
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
fromJSON(data) → {ExpressionSentenceMatch}
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
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
groups() → {Array.<ExpressionSentenceMatchGroup>}
Returns the main and labeled groups as a list of ExpressionSentenceMatchGroup
Returns:
groups
- Type
- Array.<ExpressionSentenceMatchGroup>
labels() → {Array.<string>}
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>