new StringEntityRecognizer(entityName, priorityopt)
Can recognize strings in a sentence.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
entityName |
string | The name of produced entities. | ||
priority |
number |
<optional> |
0 | Priority given to extracted entities. |
Methods
addMatch(entityId, entityText)
Add a new string to the set.
Parameters:
Name | Type | Description |
---|---|---|
entityId |
string | The string returned ID. |
entityText |
string | The entity string. |
Returns:
true
getEntities(string, outopt) → {Array.<Entity>}
Returns all found entities in a sentence. Returned entities value is string.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
string |
string | The sentence to be checked. | ||
out |
Array.<Entity> |
<optional> |
[] | The array in which the found entities will be added. |
Returns:
The set of found entities.
- Type
- Array.<Entity>
getName() → {string}
Returns the recognizer entity name.
Returns:
The entity name.
- Type
- string