Comment on page
The Chatlayer NLP engine allows you to analyse the sentiment in the message of a user. You can use this sentiment to customise the flow of your bot.
If you want to try out sentiment analysis, go the the "Test" menu under "NLP" and try out a few expressions.
Chatlayer returns 3 different types of sentiments:
If you want to enable sentiment analysis for your bot, go to the "NLP settings" menu and active the "Sentiment Analysis" toggle.
Sentiment analysis settings in NLP settings
As soon as you activate Sentiment analysis, all user messages will be analyzed for sentiment. You can find the result of that analysis in the
internal.nlp.sentimentvariable in the user session.
internal.nlp.sentimentobject consists of two key-value pairs:
internal.nlp.sentiment.name: the type of sentiment - positive / neutral / negative
internal.nlp.sentiment.score: the score of the sentiment type, ranging from 0 to 1