Natural language understanding
Natural language understanding (NLU) is essential part of the intelligent dialog systems. The goal of NLU is to extract the intentions and entities from voice or text messages. Using this information dialog system may understand what people say and decide what to do.
For each Dasha application, you create intents and entities and provide examples of phrases to make the dialog system understand people. To train the classification model, you don't need to write any code. Model is training in the cloud Dasha Platform. Then, you can use created intents and entities in the conversation script to handle users’ messages using DashaScript.
Intents and entities are reusable within the application. It means that you can use it in different steps of the conversational script. You don't need to define individual ones for different transitions. Except for that cases when it's necessary for your script.
Intent classification
When the user says something, you want to catch the meaning of that phrase. Intents are meanings of phrases. Intent classification is aimed to categorize phrases by their meanings (intention). You can use system intents in your application or create custom for specific purposes. For example, intents could be greeting
, agreement
, disagreement
, transfer money
, taxi order
and any other you need.
The model may categorize each phrase with single or multiple intents or none of them. For example, the classifier can detect intents greeting
and what_you_can_do
. So, the algorithm will classify the phrase "Hello" as greeting
; "Hello, what you can do?" as greeting
and what_you_can_do
; from "What is your name? " will extract none of the intents. To make this work, you should add such examples to the training dataset for several intents.
To create your own intent you need to provide sample phrases in the dataset - includes and excludes. Includes are examples of phrases that do have that meaning. Excludes are the examples of phrases that don't have.
Read here how to create your intents.
Named entity recognition
If you don’t only want to extract the meaning of what users say, but also specific data, you need named entities for that. Named entity recognition is used to extract data information from users` messages. The goal is to locate words and classify them as entities. Further, you could use entity information in conversation. The most common entity types are names, addresses, dates, numbers, organizations, and others.
Read here how to create your entities.
Sentence type
When we are talking we understand sentence type and react according to it. In dialog systems we need to understand it too. Commonly intents are aimed to understand the message meaning and make action. But there are cases when we need to know sentence type additionally to be human-like. Dasha classify sentence type automatically out-of-the-box with connected custom intents and entities. Then, you could use it to make your conversation app more human-like. Read here more about sentence types.
NOTE: Available only for EN-us language
Handling NLU in DashaScript
For each phrase that the user says applies NLU algorithms. To handle intent or named entity output on condition use NLU control functions.