NLP Node

Understand what a NLP node is and how to configure it

With the advancement in the field of Natural Language Processing (NLP), coupled with enhanced computing power, now NLP can be used to improve customer experience significantly. Instead of providing a list of buttons to choose from, with NLP, you can allow your customers to provide input in a natural language. The platform understands customer requirements and takes necessary actions accordingly. NLP reduces the friction of customer onboarding significantly, thus making your service much more user-friendly. Also, with the machine taking the load of interactions with customers, now you can provide a 24x7 service to your customers round the year.

📘

Version info

NLP node currently has two versions - v2.0 and v2.1.0

All users are advised to use v2.1.0

v2.0 has a limitation where the node returns an error when it's being used in a group or team

NLP Node

NLP Node

Node Configuration

Drag-and-drop the NLP node onto the visual flow builder and double-click it to open the configuration window.

  1. Select the required Method Name from the drop-down list.
2300
  1. Enter the message body (for a static message) or type the variable name (for a dynamic message) in the Message field.

  1. Click Save to complete the configuration.

Input Variables

You can see a list of all the flow variables available for use within this node under the Input Variables pane. You can also search for a variable using the Search field.
You can see the list of variables that you explicitly create and configure for this node under the Custom Variables pane. You can also add a custom variable to the flow using the Add New Custom Variable button. For more information, see Custom Variables.

Methods and Output variables

Here’s a brief description of various methods, and corresponding output variables generated by these methods. These variables are available for use in subsequent nodes. Apart from two variables present for all methods – ‘InputText’ and ‘ResponsePayload’, output variables for the NLP node vary based on the selected method.

Global input variables

The following input variables are present for all methods:

Input VariableDescription
MessageContains the message entered by the user

Global output variables

The following output variables are present for all methods:

Output VariableDescription
InputTextContains the text provided as an input to the node
ResponsePayloadContains the entire response payload from the processing engine
TimestampContains the timestamp at which the spell check was performed

Global Node Outcomes

The following node outcomes are present for all methods:

Node OutcomeDescription
onInvalidDatathe flow exits through this node when the data is invalid
onErrorthe flow exits through this node outcome when there is an error in invoking the method
onInvalidChoicethe flow exits through this node when the choice is invalid
onTimeoutthe flow exits through this node outcome when the method could not be invoked before the timeout duration
onSuccessthe flow exits through this node when the specified Number Recognition method has been invoked successfully
onFailurethe flow exits through this node outcome when there is an error in invoking the method

Node Outcomes

You can see the list of possible node outcomes for this node under this pane. You can customize the node labels using the Edit (pencil) icon. The node exits through one of the node edges corresponding to the outcome of the node.

Node EdgeNode Event/Outcome
Success (green)

Note: You can see this node edge only when you complete the node configuration.
* onSuccess - the flow exits through this node when the input text is processed successfully
Timeout (yellow/amber)* onTimeout - the flow exits through this node outcome when the input is timed out
Error (red) onFailure - the flow exits through this node outcome when the input text is not processed successfully
onError - the flow exits through this node outcome when there is an error
onInvalidData - the flow exits through this node outcome when the input text is invalid data
onInvalidChoice - the flow exits through this node outcome when the input text contains an invalid choice

Available methods

The following methods are available in NLP node

Spell Check

2294
Method NameDescriptionOutput Variables
Spell CheckContains the corrected text after spell check* CorrectedText – Contains the corrected text after spell check

Language Detection

2296
Method NameDescriptionsOutput Variables
Language DetectionDetects language for the input text DetectedLanguage – Contains the language detected for input text
DetectionConfidence – contains the confidence score for the language detection operation

Lemmatization

2300
MethodDescriptionOutput Variables
LemmatizationProvides the lexemes of all words in your text. A lexeme is the base form of a word. For example, the lexeme of running is run.* Lemmas – Contains the lexemes for the words in input text

Part of Speech Tagging

2300
MethodDescriptionOutput Variables
Part of Speech TaggingParses a given sentence and assigns the most appropriate part-of-speech tag to each of the words in the sentence* PartofSpeechTags – contains a list of all parts-of-speech tags for the words within the provided input text

Number Recognition

2300
MethodDescriptionOutput Variables
Number RecognitionParses a given sentence for a mention of a number or a numeric quantity and extracts it in the response.* RecognizedNumbers - contains the identified numbers

Parse Tree Generation

2298
MethodDescriptionOutput Variables
Parse Tree GenerationGenerates a grammatical dependency graph or parse tree of a given sentence* GeneratedParseTree – contains grammatical dependency graph for input text

Question Detection

2300
MethodDescriptionOutput Variables
Question DetectionDetermines whether the input phrase is a question or not. QuestionType – Contains the type of question detected. For example, ‘yes/no’ for input ‘is it time to submit readings yet?’, ‘how’ for ‘how can I submit my readings?’
QuestionMethod – contains additional info about the detected question. For example, ‘auxpass (passive auxillary) starting with WH’ for input ‘what can you do?’

Sentence Tokenization

2296
MethodDescriptionOutput Variables
Sentence TokenizationConverts a paragraph into an array of sentences.* SentenceTokens – contains an array of sentences present in input text

Sentiment Analysis

2294
MethodDescriptionOutput Variables
Sentiment AnalysisAnalyses a given sentence or phrase for the sentiment expressed in it as one of three possibilities: negative, neutral and positive.* DetectedSentiment – contains the sentiment detected for input text: positive, neutral or negative

Units Recognition

2302
MethodDescriptionOutput Variables
Units RecognitionDetects if the provided input contains units like kms, miles, litres, ounces, etc.RecognizedUnits – contains the units from the provided input text in a dictionary format

Word Tokenization

2292
MethodDescriptionOutput Variables
Word TokenizationParses a given sentence into an array of individual words (tokens).WordTokens - contains an array of words present in input text

Time and Date Recognition

2304
MethodDescriptionOutput Variables
Time and Date RecognitionDetects if the provided input is either a date or time. SingleDate – contains date in input text if it contains only one date and time combination. Null if input contains no date or multiple dates
SingleTime - contains time in input text if it contains only one date and time combination. Null if input contains no time or multiple times
DateTimePayload – contains date and time detected provided in a dictionary format. This can be used in conjunction with a data parser node for inputs that contain multiples dates or times.
Timezone – contains the time zone considered when returning the date and time

Profanity Filter

2302
MethodDescriptionOutput Variables
Profanity FilterProvides text after censoring expletives/abusive words present in input textFilteredText – contains the text returned after censoring abusive words