Skip to main content

$nlp

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

Includes the following methods:

MethodDescription
conformCoordination of a word with a numeral.
createClassifierUse this function to create a classifier object and use it from the JS script.
fixKeyboardLayoutThe method corrects the text by changing the Latin keyboard to Cyrillic.
inflectDeclines the word to the desired format.
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.
parseMorphPerforms the morphological analysis of a word.
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.