Classes
- Ai
- CustomEntityDetectionModel
- WingbotModel
- CachedModel
- AiMatching
{AiMatching}
Class responsible for NLP Routing by score
Members
- handlebars :
Handlebars
Constants
- ISO_8601_REGEX :
RegExp
RegExp to test a string for a ISO 8601 Date spec YYYY YYYY-MM YYYY-MM-DD YYYY-MM-DDThh:mmTZD YYYY-MM-DDThh:mm:ssTZD YYYY-MM-DDThh:mm:ss.sTZD
Typedefs
- EntityExpression :
object
- textFilter ⇒
string
Text filter function
- IntentRule :
string
|EntityExpression
- BotPath :
object
- WordDetectorData :
object
- WordEntityDetectorFactory ⇒
Promise.<WordDetectorData>
- DetectedEntity :
object
- EntityDetector ⇒
Array.<DetectedEntity>
|DetectedEntity
|Promise.<DetectedEntity>
|Promise.<Array.<DetectedEntity>>
- ValueExtractor ⇒
*
- Entity :
object
- Intent :
object
- Result :
object
- DetectorOptions :
object
- WordEntityDetector ⇒
Array.<DetectedEntity>
- Phrases :
object
- Entity :
object
- Intent :
object
- Result :
object
- Entity :
object
- Intent :
object
- Result :
object
- EntityMatchingResult :
object
- Compare :
string
- Entity :
object
- Intent :
object
- Comparable :
string
|number
|function
- EntityExpression :
object
- IntentRule :
string
|EntityExpression
- RegexpComparator :
object
- PreprocessorOutput :
object
- AIRequest :
object
- ConfidenceProvider :
object
Ai
Kind: global class
- Ai
- .confidence :
number
- .threshold :
number
- .sttMaxAlternatives :
number
- .sttScoreThreshold :
number
- .logger :
object
- .matcher :
AiMatching
- .DEFAULT_PREFIX :
string
- .getPrefix(defaultModel, req)
- .textFilter(text) :
textFilter
- .detectEntities(text, prefix) ⇒
Promise.<Array.<Entity>>
- .mockIntent([intent], [score]) ⇒
this
- .register(model, prefix, [options]) ⇒
T
- .registerEntityDetector(name, detector, [options]) ⇒
this
- .setWordEntityDetector(wordEntityDetector)
- .configureEntityDetector(name, options) ⇒
this
- .deregister([prefix])
- .getModel(prefix) ⇒
CustomEntityDetectionModel
- .global(path, intents, [title], [meta]) ⇒
object
- .local(path, intents, [title]) ⇒
object
- .match(intent) ⇒
Resolver
- .preloadDetectors() ⇒
Promise
- .preloadAi(req, [res]) ⇒
Promise
- .getPhrases(req) ⇒
Promise.<Phrases>
- ._setResultToReqRes(req, res, result) ⇒
void
- ._preloadIntent(req, [res]) ⇒
Promise
- .shouldDisambiguate(aiActions, [forQuickReplies]) ⇒
boolean
- .confidence :
number
ai.confidence : Upper threshold - for match method and for navigate method
Kind: instance property of Ai
number
ai.threshold : Lower threshold - for disambiguation
Kind: instance property of Ai
number
ai.sttMaxAlternatives : Upper limit for NLP resolving of STT alternatives
Kind: instance property of Ai
number
ai.sttScoreThreshold : Minimal score to consider text as recognized well
Kind: instance property of Ai
object
ai.logger : The logger (console by default)
Kind: instance property of Ai
AiMatching
ai.matcher : AI Score provider
Kind: instance property of Ai
string
ai.DEFAULT_PREFIX : Kind: instance property of Ai
ai.getPrefix(defaultModel, req)
The prefix translator - for request-specific prefixes
Kind: instance method of Ai
Param | Type |
---|---|
defaultModel | string |
req | Request |
textFilter
ai.textFilter(text) : Preprocess text for NLP For example to remove any confidential data
Kind: instance method of Ai
Param | Type |
---|---|
text | string |
Promise.<Array.<Entity>>
ai.detectEntities(text, prefix) ⇒ Kind: instance method of Ai
Param | Type |
---|---|
text | string |
prefix | string | Request |
this
ai.mockIntent([intent], [score]) ⇒ Usefull method for testing AI routes
Kind: instance method of Ai
Param | Type | Default | Description |
---|---|---|---|
[intent] | string | null | intent name |
[score] | number |
| the score of the top intent |
Example
const { Tester, ai, Route } = require('bontaut');const bot = new Route();bot.use(['intentAction', ai.localMatch('intentName')], (req, res) => {res.text('PASSED');});describe('bot', function () {it('should work', function () {ai.mockIntent('intentName');const t = new Tester(bot);return t.text('Any text').then(() => {t.actionPassed('intentAction');t.any().contains('PASSED');})});});
T
ai.register(model, prefix, [options]) ⇒ Registers Wingbot AI model
Kind: instance method of Ai
Param | Type | Default | Description |
---|---|---|---|
model | string | WingbotModel | T | null | wingbot model name or AI plugin |
prefix | string | model prefix | |
[options] | object | {} | |
[options.cacheSize] | number | ||
[options.verbose] | boolean | ||
[options.cachePhrasesTime] | number |
this
ai.registerEntityDetector(name, detector, [options]) ⇒ Kind: instance method of Ai
Param | Type | Description |
---|---|---|
name | string | |
detector | EntityDetector | RegExp | |
[options] | object | |
[options.anonymize] | boolean | if true, value will not be sent to NLP |
[options.extractValue] | function | string | entity extractor |
[options.matchWholeWords] | boolean | match whole words at regular expression |
[options.replaceDiacritics] | boolean | keep diacritics when matching regexp |
[options.caseSensitiveRegex] | boolean | make regex case sensitive |
[options.dependencies] | Array.<string> | array of dependent entities |
[options.clearOverlaps] | boolean | let longer entities from NLP to replace entity |
ai.setWordEntityDetector(wordEntityDetector)
Kind: instance method of Ai
Param | Type |
---|---|
wordEntityDetector | WordEntityDetector | WordEntityDetectorFactory | WordDetectorData |
this
ai.configureEntityDetector(name, options) ⇒ Sets options to entity detector. Useful for disabling anonymization of local system entities.
Kind: instance method of Ai
Param | Type | Description |
---|---|---|
name | string | |
options | object | |
[options.anonymize] | boolean | |
[options.clearOverlaps] | boolean | set true to override entities from NLP |
Example
ai.register('wingbot-model-name').setDetectorOptions('phone', { anonymize: false }).setDetectorOptions('email', { anonymize: false })
ai.deregister([prefix])
Remove registered model
Kind: instance method of Ai
Param | Type |
---|---|
[prefix] | string |
CustomEntityDetectionModel
ai.getModel(prefix) ⇒ Returns registered AI model
Kind: instance method of Ai
Param | Type | Description |
---|---|---|
prefix | string | model prefix |
object
ai.global(path, intents, [title], [meta]) ⇒ Returns matching middleware, that will export the intent to the root router so the intent will be matched in a global context
Kind: instance method of Ai
Returns: object
- - the middleware
Param | Type | Default | Description |
---|---|---|---|
path | string | ||
intents | IntentRule | Array.<IntentRule> | ||
[title] | string | function | null | disambiguation title |
[meta] | object | metadata for multibot environments | |
[meta.targetAppId] | object | target application id | |
[meta.targetAction] | object | target action |
Example
const { Router, ai } = require('wingbot');ai.register('app-model');bot.use(ai.global('route-path', 'intent1'), (req, res) => {console.log(req.intent(true)); // { intent: 'intent1', score: 0.9604 }res.text('Oh, intent 1 :)');});
object
ai.local(path, intents, [title]) ⇒ Returns matching middleware, that will export the intent to the root router so the intent will be matched in a context of local dialogue
Kind: instance method of Ai
Returns: object
- - the middleware
Param | Type | Default | Description |
---|---|---|---|
path | string | ||
intents | IntentRule | Array.<IntentRule> | ||
[title] | string | function | null | disambiguation title |
Example
const { Router, ai } = require('wingbot');ai.register('app-model');bot.use(ai.global('route-path', 'intent1'), (req, res) => {console.log(req.intent(true)); // { intent: 'intent1', score: 0.9604 }res.text('Oh, intent 1 :)');});
Resolver
ai.match(intent) ⇒ Returns matching middleware
supports:
- intents (
'intentName'
) - entities (
'@entity'
) - entities with conditions (
'@entity=PRG,NYC'
) - entities with conditions (
'@entity>=100'
) - complex entities (
{ entity:'entity', op:'range', compare:[null,1000] }
) - optional entities (
{ entity:'entity', optional: true }
) - wildcard keywords (
'#keyword#'
) - phrases (
'#first-phrase|second-phrase'
) - emojis (
'#😄🙃😛'
)
Kind: instance method of Ai
Returns: Resolver
- - the middleware
Param | Type |
---|---|
intent | IntentRule | Array.<IntentRule> |
Example
const { Router, ai } = require('wingbot');ai.register('app-model');bot.use(ai.match('intent1'), (req, res) => {console.log(req.intent(true)); // { intent: 'intent1', score: 0.9604 }res.text('Oh, intent 1 :)');});
Promise
ai.preloadDetectors() ⇒ Kind: instance method of Ai
Promise
ai.preloadAi(req, [res]) ⇒ Kind: instance method of Ai
Param | Type | Default |
---|---|---|
req | Request | |
[res] | Responder |
|
Promise.<Phrases>
ai.getPhrases(req) ⇒ Returns phrases model from AI
Kind: instance method of Ai
Param | Type |
---|---|
req | Request |
void
ai._setResultToReqRes(req, res, result) ⇒ Kind: instance method of Ai
Param | Type |
---|---|
req | Request |
res | Responder |
result | Result |
Promise
ai._preloadIntent(req, [res]) ⇒ Kind: instance method of Ai
Param | Type | Default |
---|---|---|
req | Request | |
[res] | Responder |
|
boolean
ai.shouldDisambiguate(aiActions, [forQuickReplies]) ⇒ Kind: instance method of Ai
Param | Type | Default |
---|---|---|
aiActions | Array.<IntentAction> | |
[forQuickReplies] | boolean | false |
CustomEntityDetectionModel
Kind: global class
- CustomEntityDetectionModel
- new CustomEntityDetectionModel(options, [log])
- .phrasesCacheTime :
number
- .maxWordCount :
number
- .wordEntityDetector :
WordEntityDetector
- ._normalizeResult(entities, entity, text, offset, originalText)
- ._detectAllEntities(entity, text, entities, subWord) ⇒
Promise.<Array.<DetectedEntity>>
- ._detectEntities(entity, text, entities, subWord, detectSubWords) ⇒
Promise.<Array.<DetectedEntity>>
- .nonOverlapping(entities, [expectedEntities], [justDuplicates]) ⇒
Array.<DetectedEntity>
- .getDependentEntities([known]) ⇒
Array.<string>
- .resolveEntities(text, [singleEntity], [expected], [prevEnts], [subWord]) ⇒
Promise.<Array.<DetectedEntity>>
- .resolve(text, [req]) ⇒
Promise.<Result>
- ._extractRegExpDependencies(regexp)
- ._entityByDependency(entities, dependency) ⇒
DetectedEntity
|null
- ._regexpToDetector(regexp, [options])
- .setEntityDetector(name, detector, [options]) ⇒
this
- .setDetectorOptions(name, options) ⇒
this
new CustomEntityDetectionModel(options, [log])
Param | Type |
---|---|
options | object |
[options.prefix] | string |
[options.verbose] | boolean |
[log] | Object |
number
customEntityDetectionModel.phrasesCacheTime : Kind: instance property of CustomEntityDetectionModel
number
customEntityDetectionModel.maxWordCount : Kind: instance property of CustomEntityDetectionModel
WordEntityDetector
customEntityDetectionModel.wordEntityDetector : Kind: instance property of CustomEntityDetectionModel
customEntityDetectionModel._normalizeResult(entities, entity, text, offset, originalText)
Kind: instance method of CustomEntityDetectionModel
Param | Type |
---|---|
entities | Array.<DetectedEntity> |
entity | string |
text | string |
offset | number |
originalText | string |
Promise.<Array.<DetectedEntity>>
customEntityDetectionModel._detectAllEntities(entity, text, entities, subWord) ⇒ Kind: instance method of CustomEntityDetectionModel
Param | Type |
---|---|
entity | string |
text | string |
entities | Array.<DetectedEntity> |
subWord | Array.<DetectedEntity> |
Promise.<Array.<DetectedEntity>>
customEntityDetectionModel._detectEntities(entity, text, entities, subWord, detectSubWords) ⇒ Kind: instance method of CustomEntityDetectionModel
Param | Type |
---|---|
entity | string |
text | string |
entities | Array.<DetectedEntity> |
subWord | Array.<DetectedEntity> |
detectSubWords | boolean |
Array.<DetectedEntity>
customEntityDetectionModel.nonOverlapping(entities, [expectedEntities], [justDuplicates]) ⇒ Return only entities without overlap
Kind: instance method of CustomEntityDetectionModel
Param | Type | Default |
---|---|---|
entities | Array.<DetectedEntity> | |
[expectedEntities] | Array.<string> | |
[justDuplicates] | boolean | false |
Array.<string>
customEntityDetectionModel.getDependentEntities([known]) ⇒ Kind: instance method of CustomEntityDetectionModel
Returns: Array.<string>
- -
Param | Type | Default |
---|---|---|
[known] | boolean |
|
Promise.<Array.<DetectedEntity>>
customEntityDetectionModel.resolveEntities(text, [singleEntity], [expected], [prevEnts], [subWord]) ⇒ Kind: instance method of CustomEntityDetectionModel
Param | Type | Default | Description |
---|---|---|---|
text | string | ||
[singleEntity] | string | null | |
[expected] | Array.<string> | ||
[prevEnts] | Array.<DetectedEntity> | previously detected entities to include | |
[subWord] | Array.<DetectedEntity> | previously detected entities within words |
Promise.<Result>
customEntityDetectionModel.resolve(text, [req]) ⇒ Kind: instance method of CustomEntityDetectionModel
Param | Type | Description |
---|---|---|
text | string | the user input |
[req] | Request |
customEntityDetectionModel._extractRegExpDependencies(regexp)
Kind: instance method of CustomEntityDetectionModel
Param | Type |
---|---|
regexp | RegExp | string |
DetectedEntity
| null
customEntityDetectionModel._entityByDependency(entities, dependency) ⇒ Kind: instance method of CustomEntityDetectionModel
Param | Type |
---|---|
entities | Array.<DetectedEntity> |
dependency | string |
customEntityDetectionModel._regexpToDetector(regexp, [options])
Kind: instance method of CustomEntityDetectionModel
Param | Type | Description |
---|---|---|
regexp | RegExp | |
[options] | object | |
[options.extractValue] | function | string | entity extractor |
[options.matchWholeWords] | boolean | match whole words at regular expression |
[options.replaceDiacritics] | boolean | replace diacritics when matching regexp |
[options.dependencies] | Array.<string> | array of dependent entities |
[options.caseSensitiveRegex] | boolean | make regex case sensitive |
this
customEntityDetectionModel.setEntityDetector(name, detector, [options]) ⇒ Kind: instance method of CustomEntityDetectionModel
Param | Type |
---|---|
name | string |
detector | EntityDetector | RegExp |
[options] | DetectorOptions |
this
customEntityDetectionModel.setDetectorOptions(name, options) ⇒ Sets options to entity detector. Useful for disabling anonymization of local system entities.
Kind: instance method of CustomEntityDetectionModel
Param | Type |
---|---|
name | string |
options | object |
[options.anonymize] | boolean |
[options.clearOverlaps] | boolean |
Example
ai.register('wingbot-model-name').setDetectorOptions('phone', { anonymize: false }).setDetectorOptions('email', { anonymize: false })
WingbotModel
Kind: global class
new WingbotModel(options, [log])
Param | Type |
---|---|
options | object |
[options.prefix] | string |
[options.serviceUrl] | string |
[options.trainingUrl] | string |
options.model | string |
[options.cacheSize] | number |
[options.matches] | number |
[options.verbose] | boolean |
[options.fetch] | function |
[log] | Object |
fetch
wingbotModel._fetch : Kind: instance property of WingbotModel
Promise.<Result>
wingbotModel._queryModel(text, entities) ⇒ Kind: instance method of WingbotModel
Param | Type | Default |
---|---|---|
text | string | |
entities | Array.<Entity> |
|
CachedModel
Kind: global class
- CachedModel
- new CachedModel(options, [log])
- .phrasesCacheTime :
number
- .resolve(text, [req]) ⇒
Promise.<Result>
- ._queryModel(text, entities) ⇒
Promise.<(Array.<Intent>|Result)>
new CachedModel(options, [log])
Param | Type |
---|---|
options | object |
[options.prefix] | string |
[options.cacheSize] | number |
[options.verbose] | boolean |
[options.cachePhrasesTime] | number |
[log] | Object |
number
cachedModel.phrasesCacheTime : Kind: instance property of CachedModel
Promise.<Result>
cachedModel.resolve(text, [req]) ⇒ Kind: instance method of CachedModel
Param | Type | Default | Description |
---|---|---|---|
text | string | the user input | |
[req] | Request |
| the user input |
Promise.<(Array.<Intent>|Result)>
cachedModel._queryModel(text, entities) ⇒ Kind: instance method of CachedModel
Param | Type |
---|---|
text | string |
entities | Array.<Entity> |
AiMatching
{AiMatching}
Class responsible for NLP Routing by score
Kind: global class
- AiMatching
- new AiMatching(ai)
- .optionalHandicap :
number
- .optionalEqualityHandicap :
number
- .redundantEntityHandicap :
number
- .redundantEntityClamp :
number
- .redundantIntentHandicap :
number
- .multiMatchGain :
number
- .stateEntityScore
- .regexpScore
- .getSetStateForEntityRules(rule) ⇒
object
- .parseEntitiesFromIntentRule(intentRule, onlyExpected) ⇒
Array.<string>
- ._parseEntitiesFromIntentRule(intentRules) ⇒
Array.<EntityExpression>
- .preprocessRule(intentRule) ⇒
PreprocessorOutput
- .match(req, rule, [stateless], [reqEntities], [noEntityThreshold]) ⇒
Intent
|null
- ._matchRegexp(req, regexps, noIntentHandicap) ⇒
number
new AiMatching(ai)
Param | Type |
---|---|
ai | ConfidenceProvider |
number
aiMatching.optionalHandicap : When the entity is optional, the final score should be little bit lower (0.002 by default)
Kind: instance property of AiMatching
number
aiMatching.optionalEqualityHandicap : When the entity is equal-optional, the final score should be little bit lower (0.001 by default)
Kind: instance property of AiMatching
number
aiMatching.redundantEntityHandicap : When there are additional entities then required add a handicap for each unmatched entity Also works, when an optional entity was not matched (0.02 by default)
Kind: instance property of AiMatching
number
aiMatching.redundantEntityClamp : Upper threshold for redundant entity handicaps
Kind: instance property of AiMatching
number
aiMatching.redundantIntentHandicap : When there is additional intent, the final score will be lowered by this value (0.02 by default)
Kind: instance property of AiMatching
number
aiMatching.multiMatchGain : When more than one AI features (Intent, Entity, Regex) are matching, enrich the score using the {multiMatchGain} ^ {additionalFeaturesCount} (1.2 by default)
Kind: instance property of AiMatching
aiMatching.stateEntityScore
Score of a context entity within a conversation state (1 by default)
Kind: instance property of AiMatching
aiMatching.regexpScore
Score of matched regexp (1.02 by default)
Kind: instance property of AiMatching
object
aiMatching.getSetStateForEntityRules(rule) ⇒ Kind: instance method of AiMatching
Param | Type |
---|---|
rule | PreprocessorOutput |
Array.<string>
aiMatching.parseEntitiesFromIntentRule(intentRule, onlyExpected) ⇒ Create a rule to be cached inside a routing structure
Kind: instance method of AiMatching
Param | Type | Default |
---|---|---|
intentRule | IntentRule | Array.<IntentRule> | |
onlyExpected | boolean | false |
Array.<EntityExpression>
aiMatching._parseEntitiesFromIntentRule(intentRules) ⇒ Kind: instance method of AiMatching
Param | Type |
---|---|
intentRules | Array.<IntentRule> |
PreprocessorOutput
aiMatching.preprocessRule(intentRule) ⇒ Create a rule to be cached inside a routing structure
Kind: instance method of AiMatching
Param | Type |
---|---|
intentRule | IntentRule | Array.<IntentRule> |
Intent
| null
aiMatching.match(req, rule, [stateless], [reqEntities], [noEntityThreshold]) ⇒ Calculate a matching score of preprocessed rule against the request
Kind: instance method of AiMatching
Param | Type | Default |
---|---|---|
req | AIRequest | |
rule | PreprocessorOutput | |
[stateless] | boolean | false |
[reqEntities] | Array.<Entity> | |
[noEntityThreshold] | boolean | false |
number
aiMatching._matchRegexp(req, regexps, noIntentHandicap) ⇒ Kind: instance method of AiMatching
Param | Type |
---|---|
req | AIRequest |
regexps | Array.<RegexpComparator> |
noIntentHandicap | number |
Handlebars
handlebars : Kind: global variable
enum
COMPARE : Kind: global enum
Properties
Name | Type | Default |
---|---|---|
EQUAL | Compare | eq |
NOT_EQUAL | Compare | ne |
RANGE | Compare | range |
GT | Compare | gt |
GTE | Compare | gte |
LT | Compare | lt |
LTE | Compare | lte |
RegExp
ISO_8601_REGEX : RegExp to test a string for a ISO 8601 Date spec YYYY YYYY-MM YYYY-MM-DD YYYY-MM-DDThh:mmTZD YYYY-MM-DDThh:mm:ssTZD YYYY-MM-DDThh:mm:ss.sTZD
Kind: global constant
See: https://www.w3.org/TR/NOTE-datetime
object
EntityExpression : Kind: global typedef
Properties
Name | Type | Description |
---|---|---|
entity | string | the requested entity |
[optional] | boolean | entity is optional, can be missing in request |
[op] | Compare | comparison operation (eq |
[compare] | Array.<string> | Array.<number> | value to compare with |
string
textFilter ⇒ Text filter function
Kind: global typedef
Returns: string
- - filtered text
Param | Type | Description |
---|---|---|
text | string | input text |
string
| EntityExpression
IntentRule : Kind: global typedef
object
BotPath : Kind: global typedef
Properties
Name | Type |
---|---|
path | string |
object
WordDetectorData : Kind: global typedef
Properties
Name | Type |
---|---|
detector | WordEntityDetector |
[maxWordCount] | number |
Promise.<WordDetectorData>
WordEntityDetectorFactory ⇒ Kind: global typedef
object
DetectedEntity : Kind: global typedef
Properties
Name | Type |
---|---|
[start] | number |
[entity] | string |
[end] | number |
[score] | number |
[value] | string | number | boolean |
[text] | string |
Array.<DetectedEntity>
| DetectedEntity
| Promise.<DetectedEntity>
| Promise.<Array.<DetectedEntity>>
EntityDetector ⇒ Kind: global typedef
Param | Type | Description |
---|---|---|
text | string | part of text |
entities | Array.<DetectedEntity> | dependent entities |
[searchWithinWords] | boolean | optional ability to search within words |
*
ValueExtractor ⇒ Kind: global typedef
Param | Type | Description |
---|---|---|
match | Array.<string> | regexp result |
entities | Array.<DetectedEntity> | dependent entities |
object
Entity : Kind: global typedef
Properties
Name | Type |
---|---|
entity | string |
value | string |
score | number |
object
Intent : Kind: global typedef
Properties
Name | Type |
---|---|
intent | string |
score | number |
[entities] | Array.<Entity> |
object
Result : Kind: global typedef
Properties
Name | Type |
---|---|
[text] | string |
entities | Array.<Entity> |
intents | Array.<Intent> |
object
DetectorOptions : Kind: global typedef
Properties
Name | Type | Description |
---|---|---|
[anonymize] | boolean | if true, value will not be sent to NLP |
[extractValue] | function | string | entity extractor |
[matchWholeWords] | boolean | match whole words at regular expression |
[replaceDiacritics] | boolean | keep diacritics when matching regexp |
[options.caseSensitiveRegex] | boolean | make regex case sensitive |
[dependencies] | Array.<string> | array of dependent entities |
[clearOverlaps] | boolean | let longer entities from NLP to replace entity |
Array.<DetectedEntity>
WordEntityDetector ⇒ Kind: global typedef
Param | Type |
---|---|
text | string |
[entities] | Array.<DetectedEntity> |
[startIndex] | number |
[prefix] | string |
object
Phrases : Kind: global typedef
Properties
Name | Type |
---|---|
phrases | Map.<string, Array.<string>> |
object
Entity : Kind: global typedef
Param | Type |
---|---|
entity | string |
value | string |
score | number |
object
Intent : Kind: global typedef
Param | Type |
---|---|
intent | string |
score | number |
[entities] | Array.<Entity> |
object
Result : Kind: global typedef
Param | Type |
---|---|
entities | Array.<Entity> |
intents | Array.<Intent> |
object
Entity : Kind: global typedef
Properties
Name | Type |
---|---|
entity | string |
value | string |
score | number |
object
Intent : Kind: global typedef
Properties
Name | Type |
---|---|
intent | string |
score | number |
[entities] | Array.<Entity> |
object
Result : Kind: global typedef
Properties
Name | Type |
---|---|
[text] | string |
entities | Array.<Entity> |
intents | Array.<Intent> |
object
EntityMatchingResult : Kind: global typedef
Properties
Name | Type |
---|---|
score | number |
handicap | number |
fromState | number |
minScore | number |
metl | number |
matched | Array.<Entity> |
string
Compare : Kind: global typedef
object
Entity : Kind: global typedef
Param | Type |
---|---|
entity | string |
value | string |
score | number |
object
Intent : Kind: global typedef
Param | Type |
---|---|
[intent] | string |
score | number |
[entities] | Array.<Entity> |
string
| number
| function
Comparable : Kind: global typedef
object
EntityExpression : Kind: global typedef
Properties
Name | Type | Description |
---|---|---|
entity | string | the requested entity |
[optional] | boolean | the match is optional |
[op] | Compare | comparison operation |
[compare] | Array.<Comparable> | value to compare |
string
| EntityExpression
IntentRule : Kind: global typedef
object
RegexpComparator : Kind: global typedef
Properties
Name | Type | Description |
---|---|---|
r | RegExp | regular expression |
t | boolean | use normalized text |
f | boolean | is full match |
object
PreprocessorOutput : Kind: global typedef
Properties
Name | Type |
---|---|
regexps | Array.<RegexpComparator> |
intents | Array.<string> |
entities | Array.<EntityExpression> |
object
AIRequest : Kind: global typedef
Properties
Name | Type |
---|---|
text | function |
intents | Array.<Intent> | null |
entities | Array.<Entity> |
[configuration] | object |
[state] | object |
[actionData] | function |
object
ConfidenceProvider : Kind: global typedef
Properties
Name | Type |
---|---|
confidence | number |