Sentiment analysis

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:

  • Positive

  • Neutral

  • Negative

Sentiment analysis is currently available on request. If you'd like to try it out, get in touch with us.

If you want to enable sentiment analysis for your bot, go to the "NLP settings" menu and active the "Sentiment Analysis" toggle.

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.sentiment variable in the user session.

The internal.nlp.sentiment object consists of two key-value pairs:

  • the type of sentiment - positive / neutral / negative

  • internal.nlp.sentiment.score: the score of the sentiment type, ranging from 0 to 1

You can use these key-value pairs in Go To's to route your flows.

Last updated