You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: In this tutorial, add a composite entity to bundle extracted data of various types into a single containing entity. By bundling the data, the client application can easily extract related data in different data types.
5
-
services: cognitive-services
6
-
author: diberry
7
-
manager: nitinme
8
-
ms.custom: seodec18
9
-
ms.service: cognitive-services
10
-
ms.subservice: language-understanding
11
4
ms.topic: tutorial
12
-
ms.date: 12/17/2019
13
-
ms.author: diberry
5
+
ms.date: 03/31/2020
14
6
---
15
7
16
8
# Tutorial: Group and extract related data
@@ -103,11 +95,11 @@ LUIS provides several prebuilt entities for common data extraction.
103
95
104
96
## Train the app so the changes to the intent can be tested
105
97
106
-
[!INCLUDE [LUIS How to Train steps](../../../includes/cognitive-services-luis-tutorial-how-to-train.md)]
98
+
To train the app, select **Train**. Training applies the changes, such as the new entities and the labeled utterances, to the active model.
107
99
108
-
## Publish the app so the trained model is queryable from the endpoint
100
+
## Publish the app to access it from the HTTP endpoint
109
101
110
-
[!INCLUDE [LUIS How to Publish steps](../../../includes/cognitive-services-luis-tutorial-how-to-publish.md)]
102
+
[!INCLUDE [LUIS How to Publish steps](includes/howto-publish.md)]
111
103
112
104
## Get intent and entity prediction from endpoint
113
105
@@ -181,9 +173,7 @@ LUIS provides several prebuilt entities for common data extraction.
181
173
182
174
This utterance returns a composite entities array. Each entity is given a type and value. To find more precision for each child entity, use the combination of type and value from the composite array item to find the corresponding item in the entities array.
183
175
184
-
## Clean up resources
185
-
186
-
[!INCLUDE [LUIS How to clean up resources](../../../includes/cognitive-services-luis-tutorial-how-to-clean-up-resources.md)]
176
+
[!INCLUDE [LUIS How to clean up resources](includes/quickstart-tutorial-cleanup-resources.md)]
Copy file name to clipboardExpand all lines: articles/cognitive-services/LUIS/tutorial-entity-roles.md
+28-28Lines changed: 28 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,22 +1,14 @@
1
1
---
2
2
title: "Tutorial: Contextual data with roles - LUIS"
3
-
titleSuffix: Azure Cognitive Services
4
3
description: Find related data based on context. For example, an origin and destination locations for a physical move from one building and office to another building and office are related.
5
-
services: cognitive-services
6
-
author: diberry
7
-
manager: nitinme
8
-
ms.custom: seodec18
9
-
ms.service: cognitive-services
10
-
ms.subservice: language-understanding
11
4
ms.topic: tutorial
12
-
ms.date: 12/17/2019
13
-
ms.author: diberry
5
+
ms.date: 03/30/2020
14
6
#Customer intent: As a new user, I want to understand how and why to use roles on an entity.
15
7
---
16
8
17
9
# Tutorial: Extract contextually related data from an utterance
18
10
19
-
In this tutorial, find related pieces of data based on context. For example, an origin and destination locations for a transfer from one city to another. Both pieces of data may be required and they are related to each other.
11
+
In this tutorial, find related pieces of data based on context. For example, origin and destination locations for a transfer from one city to another. Both pieces of data may be required and they are related to each other.
20
12
21
13
A role can be used with any prebuilt or custom entity type, and used in both example utterances and patterns.
22
14
@@ -45,24 +37,26 @@ A role should be used when the entity data to extract:
45
37
46
38
## Create a new app
47
39
48
-
1. Sign in to the preview LUIS portal with the URL of [https://preview.luis.ai](https://preview.luis.ai).
40
+
1. Sign in to the [LUIS **preview** portal](https://preview.luis.ai).
49
41
50
-
1. Select **Create new app**, enter the name `HumanResources` and keep the default culture, **English**. Leave the description empty.
51
-
52
-
1. Select **Done**.
42
+
1. Select **+ New app for conversation**, enter the name `HumanResources` and keep the default culture, **English**. Leave the description and prediction resource empty. Select **Done**.
53
43
54
44
## Create an intent to move employees between cities
55
45
46
+
An intent is used to classify user utterances based on the user's intention, determined from the natural language text.
47
+
48
+
In order to classify an utterance, the intent needs examples of user utterances that should be classified with this intent.
49
+
56
50
1.[!INCLUDE [Start in Build section](../../../includes/cognitive-services-luis-tutorial-build-section.md)]
57
51
58
-
1. Select **Create new intent**.
52
+
1. Select **+ Create**.
59
53
60
54
1. Enter `MoveEmployeeToCity` in the pop-up dialog box then select **Done**.
61
55
62
56
> [!div class="mx-imgBorder"]
63
57
> 
64
58
65
-
1. Add example utterances to the intent.
59
+
1. Add several example utterances to this intent that you expect a user to ask.
66
60
67
61
|Example utterances|
68
62
|--|
@@ -81,24 +75,29 @@ A role should be used when the entity data to extract:
81
75
82
76
## Add prebuilt entity geographyV2
83
77
84
-
The prebuilt entity, geographyV2, extracts location information, including city names. Since the utterances have two city names, relating to each other in context, use roles to extract that context.
78
+
The prebuilt entity, **geographyV2**, extracts location information, including city names. Since the utterances have two city names, relating to each other in context, use roles to extract that context.
85
79
86
80
1. Select **Entities** from the left-side navigation.
87
81
88
-
1. Select **Add prebuilt entity**, then select`geo` in the search bar to filter the prebuilt entities.
82
+
1. Select **+ Add prebuilt entity**, then enter`geo` in the search bar to filter the prebuilt entities.
89
83
90
84
> [!div class="mx-imgBorder"]
91
85
> 
92
86
93
87
1. Select the checkbox and select **Done**.
88
+
89
+
## Add roles to prebuilt entity
90
+
94
91
1. In the **Entities** list, select the **geographyV2** to open the new entity.
95
-
1.Add two roles,`Origin`, and `Destination`.
92
+
1.To add a role, select **+** and add the following two roles:`Origin`, and `Destination`.
96
93
97
94
> [!div class="mx-imgBorder"]
98
95
> 
99
96
97
+
## Label entity roles in example utterances
98
+
100
99
1. Select **Intents** from the left-side navigation, then select the **MoveEmployeeToCity** intent. Notice the city names are labeled with the prebuilt entity **geographyV2**.
101
-
1. In the context toolbar, select the **Entity palette**.
100
+
1. In the context toolbar, select the **Entity palette** with the _pencil icon_.
102
101
103
102
> [!div class="mx-imgBorder"]
104
103
> 
@@ -118,18 +117,21 @@ The prebuilt entity, geographyV2, extracts location information, including city
118
117
119
118
## Train the app so the changes to the intent can be tested
120
119
121
-
[!INCLUDE [LUIS How to Train steps](../../../includes/cognitive-services-luis-tutorial-how-to-train.md)]
120
+
To train the app, select **Train**. Training applies the changes, such as the new entities and the labeled utterances, to the active model.
121
+
122
+
## Publish the app to access it from the HTTP endpoint
122
123
123
-
## Publish the app so the trained model is queryable from the endpoint
124
+
[!INCLUDE [LUIS How to Publish steps](includes/howto-publish.md)]
124
125
125
-
[!INCLUDE [LUIS How to Publish steps](../../../includes/cognitive-services-luis-tutorial-how-to-publish.md)]
126
126
127
127
## Get intent and entity prediction from endpoint
128
128
129
-
1.[!INCLUDE [LUIS How to get endpoint first step](../../../includes/cognitive-services-luis-tutorial-how-to-get-endpoint.md)]
129
+
1.[!INCLUDE [LUIS How to get endpoint first step](includes/howto-get-endpoint.md)]
130
130
131
131
132
-
1. Go to the end of the URL in the address bar and enter `Please move Carl Chamerlin from Tampa to Portland`. The last querystring parameter is `q`, the utterance **query**. This utterance is not the same as any of the labeled utterances so it is a good test and should return the `MoveEmployee` intent with the entity extracted.
132
+
1. Go to the end of the URL in the address bar and replace _YOUR_QUERY_HERE_ with `Please move Carl Chamerlin from Tampa to Portland`.
133
+
134
+
This utterance is not the same as any of the labeled utterances so it is a good test and should return the `MoveEmployee` intent with the entity extracted.
133
135
134
136
```json
135
137
{
@@ -169,9 +171,7 @@ The prebuilt entity, geographyV2, extracts location information, including city
169
171
170
172
The correct intent is predicted and the entities array has both the origin and destination roles in the corresponding **entities** property.
171
173
172
-
## Clean up resources
173
-
174
-
[!INCLUDE [LUIS How to clean up resources](../../../includes/cognitive-services-luis-tutorial-how-to-clean-up-resources.md)]
174
+
[!INCLUDE [LUIS How to clean up resources](includes/quickstart-tutorial-cleanup-resources.md)]
Copy file name to clipboardExpand all lines: articles/cognitive-services/LUIS/tutorial-machine-learned-entity.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
title: "Tutorial: extract structured data with machine-learned entity - LUIS"
3
3
description: Extract structured data from an utterance using the machine-learned entity. To increase the extraction accuracy, add subcomponents with descriptors and constraints.
4
4
ms.topic: tutorial
5
-
ms.date: 03/30/2020
5
+
ms.date: 03/31/2020
6
6
#Customer intent: As a new user, I want to understand how to extract complex data contained in a user utterance.
7
7
---
8
8
@@ -211,7 +211,7 @@ Test the app using the interactive **Test** panel. This process lets you enter a
211
211
212
212
1.[!INCLUDE [LUIS How to get endpoint first step](includes/howto-get-endpoint.md)]
213
213
214
-
1. Go to the end of the URL in the address and enter the same query as you entered in the interactive test panel.
214
+
1. Go to the end of the URL in the address and replace _YOUR_QUERY_HERE_ with the same query as you entered in the interactive test panel.
0 commit comments