Global

Type Definitions

ContextManagerResultByContext

Describes a match from a specific context. See Bravey.ContextManager.testByContext
Type:
  • Object
Properties:
Name Type Description
result NlpResult The result of a query.
context string The matched context tag. undefined if no domain matched.
Source:

ContextManagerResultBySessionId

Describes a match from a specific session ID. See Bravey.ContextManager.testBySessionId
Type:
  • Object
Properties:
Name Type Description
result NlpResult The result of a query.
context string The matched context tag. undefined if no domain matched.
sessionId string The session ID used for matching.
sessionContext string The session context tags used for matching. undefined if no domain matched.
sessionData Object The session data for the requested sessionId. undefined if no domain matched.
Source:

DocumentClassification

Describes a document classification.
Type:
  • Object
Properties:
Name Type Description
scores Array.<number> The related scores for each known document label.
winner.score number The score of the winning label.
winner.label string The name of the winning label.
Source:

Entity

Defines an entity.
Type:
  • Object
Properties:
Name Type Description
entity string The entity type.
string string The raw text representing the entity.
position number The entity position in a sentence.
value any The entity logic value.
priority number The entity relative priority.
Source:

IntentEntity

Describes an entity to be matched in an intent.
Type:
  • Object
Properties:
Name Type Description
entity string The entity type to be found.
id string The entity ID to be assigned when found.
Source:

IntentEntity

Describes an entity to be matched in an intent.
Type:
  • Object
Properties:
Name Type Description
entity string The entity type to be found.
id string The entity ID to be assigned when found.
Source:

NlpResult

Describes a sentence classification and entities.
Type:
  • Object
Properties:
Name Type Description
entities Array.<Entity> The ordered list of found entities.
entitiesIndex Array.<number> An map version of entities, with key as entity ID and value as entity value.
intent string The matched intent.
score number The score of the matched sentence intent.
Source:

NlpResult

Describes a sentence classification and entities.
Type:
  • Object
Properties:
Name Type Description
entities Array.<Entity> The ordered list of found entities.
entitiesIndex Array.<number> An map version of entities, with key as entity ID and value as entity value.
intent string The matched intent.
score number The score of the matched sentence intent.
Source:

regexEntityRecognizerCallback(match) → {Entity|undefined}

Called when RegexEntityRecognizer matches a regular expression.
Parameters:
Name Type Description
match Array.<string> The matched values.
Source:
Returns:
  • The processed entity.
    Type
    Entity
  • When the match found is not a valid entity.
    Type
    undefined