UNIT is Baidu's NLP offering. It is specifically used for Simplified Chinese. This documentation focuses on how to integrate DialogFlow with Stackchat. To best understand how to use UNIT itself, visit the Help Center.
UNIT has many features, but Stackchat's integration with UNIT takes advantage of the following features only: - intent detection - entity extraction - sentiment analysis
In order to connect UNIT to Stackchat, you will first need to create a UNIT account and then a new UNIT skill.
Create your UNIT account, navigate to 我的技能 (My Skills) in the top navigation and click 新建技能 (New Skills) to create your first skill.
This will create a modal, and you will want to select the first option, 对话技能 (Dialogue Skills).
Give your skill a name that matches your Stackchat bot's name for ease of understanding. You can also add an optional description. Finally click 创建技能 (Create Skills).
Once your bot has been created, you can connect your Dialogflow agent to Stackchat using your API Key, Secret Key and Skill ID.
To create the Secret Key and API Key, you will need to add an application in your Baidu Cloud Console. You will only need to create one application regardless of how many UNIT skills you create.
Click 创建应用 (Create an App). Now give your app a name, select its purpose (工具应用, Tool Application, is a good choice for a Stackchat bot), and list of Baidu services to use (UNIT is automatically selected, and you will not need others).
Fill in a description of your use for the app you are creating, and click 立即创建 (Create Now).
You can now return to the app list and copy and paste your API and Secret Keys.
To find the Skill ID, simply open the skill you created earlier. The Skill ID will be under the name of the skill at the upper left.
Select the bot you wish to add the Cloud Configuration to and select Integrations. Click Add Integration at the upper right and select UNIT from the modal.
In the dialogue on the right, enter a name for your UNIT configuration, copy and paste the API and Secret Keys from Baidu Cloud Console, and enter your Skill ID from your UNIT Skills page and click Add Integration.
Your bot is now linked to a UNIT NLP Skill. These steps will need to be repeated for each UNIT skill you wish to use in your bots.
You can now add UNIT intents & entities to your bot.
Sentiment Analysis in UNIT
If you're using our Adobe Analytics Cloud Configuration, you may wish to use sentiment analysis in UNIT so that you can report on your audience's sentiment.
Sentiment analysis allows Natural Language Processing to attempt to determine the user's attitude during interaction with your chatbot, and it is automatically enabled in UNIT. Sentiment analysis data will be able to flow into Adobe Analytics and will appear in your Adobe Analytics Report Suite as Prop 11 (Sentiment Score), Prop 12 (Sentiment Magnitude), and Prop 24 (Sentiment Score Range).