Sentiment analysis service
Danger
This tutorial is out of date. Please check the tutorials overview for our latest tutorials.
In this part of the tutorial you learn about the sentiment analysis service.
This service uses the Hugging Face model to calculate sentiment for messages, and these are then displayed on the web UI.
There are three deployed services here:
- Chat sentiment analysis
- Drafts sentiment analysis
- Twitch sentiment analysis
💡 Key ideas
The key ideas on this page:
- Hugging Face model is used to generate sentiment values
- How to examine message formats
What it does
The sentiment analysis service uses a prebuilt model from Hugging Face to analyze the sentiment of each message flowing through the service.
Draft messages are messages while the user is typing them, before they are sent. These are used to generate sentiment while the user is typing.
Both the messages and draft messages are generated by the web UI.
The sentiment analysis service subscribes to the chat-messages
topic and performs sentiment analysis using the Hugging Face model, publishing a sentiment value to the chat-with-sentiment
topic.
The drafts sentiment analysis service performs sentiment analysis on messages published to the drafts
topic and publishes sentiment values to the drafts_sentiment
topic.
The UI subscribes to these topics, and can then display the sentiment values in the UI.
👩🔬 Lab - Examine messages
There are several ways to view live data. This lab shows one way to do it.
-
Click on
Topics
in the main left-hand navigation. -
Where you see live data for the
chat-messages
topic, click in that area, as shown in the screenshot:You are taken to the live view of the Quix Data Explorer.
-
The
chat-messages
topic is preselected for you. The stream names are the user names that you entered, or are user names from the Twitch service. Select any one and then select thechat-message
parameter. -
Click the
Messages
view, and then click on any real-time message displayed. In the message code view you see something similar to the following: