+ How To Add This Control To Your Project (Click to Expand)
- Load the most recent release of ARC.
- Press the Project tab from the top menu bar in ARC.
- Press Add Control from the button ribbon bar in ARC.
- Choose the Artificial Intelligence category tab.
- Press the Cognitive Sentiment icon to add the control to your project.
Detect the percentage of positive sentiment of the provided phrase by using cognitive machine learning services. The detected sentiment percentage will be displayed in the response window and assigned to a variable $SentimentPercentage. The text/phrase can be sent to the skill via ControlCommand() scripts.
1. Text Field
This field is where you enter the text that you would like this machine learning service to evaluate.
2. Detect Button
This button will send the text you entered to the machine learning service for evaluation.
3. Average Sentiment Face
This face is a visual display of the average sentiment detected in all your text entries. The average positivity/negativity value is displayed above the face.
4. Sentiment Graph
This graph displays a point on the vertical scale for every evaluated entry and draws a line from point to point on the horizontal scale. The vertical scale represents the amount of positivity above zero and negativity below zero. The horizontal scale represents the amount of text field inputs.
5. Status Display
Displays the text entry and the percentage of Sentiment that is detected.
How to use Cognitive Sentiment
1) Add the Cognitive Sentiment skill to your ARC project (Project -> Add Skill -> Aritifial Intelligence -> Cognitive Sentiment).
2) Enter your text into the text field and hit enter or press the Detect button.
3) Read the sentiment percentage in the status display, look at the sentiment face, and observe the change in the Sentiment graph.
Code SamplesYou can send a phrase to this skill using the provided ControlCommand() that is also listed in the Cheat Sheet. For example, you can send the phrase:
ControlCommand("Sentiment", Detect, "I love sunny days")
or use a variable...
ControlCommand("Sentiment", Detect, $MyText)
The response of the detected sentiment percentage is stored in the variable: $SentimentPercentage.
This ARC skill requires an internet connection, which means your EZB will have to be in WiFi client mode, attached via a COM port, or you'll need an extra WiFi adapter.