Behavior Control
Help Index

Cognitive Sentiment

How To Add This Control To Your Project

  1. Load the most recent release of EZ-Builder
  2. Press the Project tab from the top menu bar of EZ-Builder
  3. Press Add Control from the button ribbon bar of EZ-Builder
  4. Choose the Artificial Intelligence category tab
  5. 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 will be displayed in the response window and assigned to a variable $SentimentPercentage. The text/phrase can be sent to the control via a ControlCommand(). Check the cheat sheet for more available ControlCommand()'s.

Capture.PNG

Send Phrase via ControlCommand()

You can send a phrase to this control 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)


Variable and Script Response

This control has a configure button, which opens a window to access the EZ-Script configuration. Every time the control is activated to detect a phrase, it will execute the EZ-Script included in the configuration window. The response of the detected sentiment is stored in the variable: $SentimentPercentage.


Requires Internet Connection

This EZ-Builder Control requires an internet connection, which means your EZ-B v4 should be in Client Mode and connected to a router. View the EZ-B v4 WiFi Modes Activity to change the mode.