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
Node Configuration
Drag-and-drop the NLP node onto the visual flow builder and double-click it to open the configuration window.
- Select the required Method Name from the drop-down list.
- Enter the message body (for a static message) or type the variable name (for a dynamic message) in the Message field.
- 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 Variable | Description |
---|---|
Message | Contains the message entered by the user |
Global output variables
The following output variables are present for all methods:
Output Variable | Description |
---|---|
InputText | Contains the text provided as an input to the node |
ResponsePayload | Contains the entire response payload from the processing engine |
Timestamp | Contains the timestamp at which the spell check was performed |
Global Node Outcomes
The following node outcomes are present for all methods:
Node Outcome | Description |
---|---|
onInvalidData | the flow exits through this node when the data is invalid |
onError | the flow exits through this node outcome when there is an error in invoking the method |
onInvalidChoice | the flow exits through this node when the choice is invalid |
onTimeout | the flow exits through this node outcome when the method could not be invoked before the timeout duration |
onSuccess | the flow exits through this node when the specified Number Recognition method has been invoked successfully |
onFailure | the 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 Edge | Node 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
Method Name | Description | Output Variables |
---|---|---|
Spell Check | Contains the corrected text after spell check | * CorrectedText – Contains the corrected text after spell check |
Language Detection
Method Name | Descriptions | Output Variables |
---|---|---|
Language Detection | Detects language for the input text | DetectedLanguage – Contains the language detected for input text DetectionConfidence – contains the confidence score for the language detection operation |
Lemmatization
Method | Description | Output Variables |
---|---|---|
Lemmatization | Provides 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
Method | Description | Output Variables |
---|---|---|
Part of Speech Tagging | Parses 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
Method | Description | Output Variables |
---|---|---|
Number Recognition | Parses 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
Method | Description | Output Variables |
---|---|---|
Parse Tree Generation | Generates a grammatical dependency graph or parse tree of a given sentence | * GeneratedParseTree – contains grammatical dependency graph for input text |
Question Detection
Method | Description | Output Variables |
---|---|---|
Question Detection | Determines 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
Method | Description | Output Variables |
---|---|---|
Sentence Tokenization | Converts a paragraph into an array of sentences. | * SentenceTokens – contains an array of sentences present in input text |
Sentiment Analysis
Method | Description | Output Variables |
---|---|---|
Sentiment Analysis | Analyses 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
Method | Description | Output Variables |
---|---|---|
Units Recognition | Detects 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
Method | Description | Output Variables |
---|---|---|
Word Tokenization | Parses a given sentence into an array of individual words (tokens). | WordTokens - contains an array of words present in input text |
Time and Date Recognition
Method | Description | Output Variables |
---|---|---|
Time and Date Recognition | Detects 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
Method | Description | Output Variables |
---|---|---|
Profanity Filter | Provides text after censoring expletives/abusive words present in input text | FilteredText – contains the text returned after censoring abusive words |
Updated 5 months ago