Constructor
new Pipeline(properties, languageopt, connectoropt)
- Source:
Create a Pipeline
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
properties |
Properties | |||
language |
string |
<optional> |
Unspecified
|
in CamelCase (i.e. English, Spanish) |
connector |
ConnectorServer | ConnectorCli |
<optional> |
null
|
Methods
(async) annotate(annotable) → {Promise.<Annotable>}
- Source:
Execute the pipeline against the annotable object, adding annotations to it. Calls the service and loads the associated response metadata into the Annotable model
Parameters:
Name | Type | Description |
---|---|---|
annotable |
Annotable | the document or sentence to be annotated |
Returns:
annotated document / sentence
- Type
- Promise.<Annotable>
(async) annotateSemgrex(expression, annotateExpressionopt) → {Expression}
- Source:
Annotates the given Expression instance with matching groups and/or Tokens
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
expression |
Expression | An annotable expression containing a Semgrex pattern |
|
annotateExpression |
boolean |
<optional> |
Whether to hydrate the annotations with tokens or not.
IMPORTANT: The optional parameter |
Returns:
expression - The current expression instance
- Type
- Expression
(async) annotateTokensRegex(expression, annotateExpressionopt) → {Expression}
- Source:
Annotates the given Expression instance with matching groups and/or Tokens
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
expression |
Expression | An annotable expression containing a TokensRegex pattern |
|
annotateExpression |
boolean |
<optional> |
Whether to hydrate the annotations with tokens or not.
IMPORTANT: The optional parameter |
Returns:
expression - The current expression instance
- Type
- Expression
(async) annotateTregex(expression, annotateExpressionopt) → {Expression}
- Source:
Annotates the given Expression instance with matching groups and/or Tokens
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
expression |
Expression | An annotable expression containing a Tregex pattern |
|
annotateExpression |
boolean |
<optional> |
Whether to hydrate the annotations with tokens or not.
IMPORTANT: The optional parameter |
Returns:
expression - The current expression instance
- Type
- Expression
assert(requiredAnnotators)
- Source:
Parameters:
Name | Type | Description |
---|---|---|
requiredAnnotators |
Array.<Annotator> |
getService(service)
- Source:
Retrieves the current Service used by the pipeline
Parameters:
Name | Type | Description |
---|---|---|
service |
Service |