NlpMatch
type NlpMatch = { intent: NlpIntent; score: number; text: string;};Defined in: engine/engine.types.ts:56
What NlpEngine.classify answers: the intent, wrapped in what is known about how confidently it was arrived at.
Properties
Section titled “Properties”intent
Section titled “intent”intent: NlpIntent;Defined in: engine/engine.types.ts:57
score: number;Defined in: engine/engine.types.ts:65
The classifier’s confidence, 0–1.
An honest number: the engine disables nlp.js’s own thresholding so the score
survives instead of being rewritten. In practice a phrase the corpus covers
scores at or near 1, and one it does not sits around 0.5.
text: string;Defined in: engine/engine.types.ts:67
The phrase as it was given to NlpEngine.classify.