Skip to main content

$nlp

The $nlp built-in service provides methods to manage patterns, word classification, coordination, etc.

Includes the following methods:

MethodDescription
createClassifierUse this function to create a classifier object and use it from the JS script.
matchMatches patterns for the text specified. Returns a NLPResult object that specifies which pattern was triggered in which state and contains a parseTree object.
matchExamplesMatches the text against the specified set of examples.
matchPatternsMatches patterns for the text specified. Returns a NLPResult object that specifies which pattern was triggered and contains a ParseTree object.
setClassYou can use this function to assign any nlp class to a pair of client/bot phrases, and this class will be displayed in the Class field in the dialog history.