Skip to content

Commit 3a8c77f

Browse files
authored
Merge pull request #49914 from diberry/0823-authoring-qs-csharp
qs - change model -cs
2 parents 6eb6939 + d7521b5 commit 3a8c77f

9 files changed

+288
-229
lines changed

articles/cognitive-services/LUIS/luis-get-started-cs-add-utterance.md

Lines changed: 53 additions & 227 deletions
Large diffs are not rendered by default.
17.7 KB
Loading

articles/cognitive-services/LUIS/toc.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,9 +290,9 @@
290290
href: https://aka.ms/azure-powershell-cognitiveservices
291291
- name: SDKs
292292
items:
293-
- name: .Net Authoring
293+
- name: .NET Authoring
294294
href: https://aka.ms/luis-sdk-dotnet-authoring
295-
- name: .Net Runtime
295+
- name: .NET Runtime
296296
href: https://aka.ms/luis-sdk-dotnet-runtime
297297
- name: Android
298298
href: https://github.com/Microsoft/Cognitive-LUIS-Android
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
title: include file
3+
description: include file
4+
services: cognitive-services
5+
author: diberry
6+
manager: cjgronlund
7+
ms.service: cognitive-services
8+
ms.component: luis
9+
ms.topic: include
10+
ms.custom: include file
11+
ms.date: 08/16/2018
12+
ms.author: diberry
13+
---
14+
15+
In this quickstart, add example utterances to a Home Automation app and train the app. Example utterances are conversational user text mapped to an intent. By providing example utterances for intents, you teach LUIS what kinds of user-supplied text belongs to which intent.
16+
17+
18+
For more information, see the technical documentation for the [add example utterance to intent](https://westus.dev.cognitive.microsoft.com/docs/services/5890b47c39e2bb17b84a55ff/operations/5890b47c39e2bb052c5b9c08), [train](https://westus.dev.cognitive.microsoft.com/docs/services/5890b47c39e2bb17b84a55ff/operations/5890b47c39e2bb052c5b9c45), and [training status](https://westus.dev.cognitive.microsoft.com/docs/services/5890b47c39e2bb17b84a55ff/operations/5890b47c39e2bb052c5b9c46) APIs.
19+
20+
For this article, you need a free [LUIS](http://www.luis.ai) account.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
title: include file
3+
description: include file
4+
services: cognitive-services
5+
author: diberry
6+
manager: cjgronlund
7+
ms.service: cognitive-services
8+
ms.component: luis
9+
ms.topic: include
10+
ms.custom: include file
11+
ms.date: 08/16/2018
12+
ms.author: diberry
13+
---
14+
The example utterances file, **utterances.json**, follows a specific format.
15+
16+
The `text` field contains the text of the example utterance. The `intentName` field must correspond to the name of an existing intent in the LUIS app. The `entityLabels` field is required. If you don't want to label any entities, provide an empty array.
17+
18+
If the entityLabels array is not empty, the `startCharIndex` and `endCharIndex` need to mark the entity referred to in the `entityName` field. The index is zero-based, meaning 6 in the top example refers to the "S" of Seattle and not the space before the capital S. If you begin or end the label at a space in the text, the API call to add the utterances fails.
19+
20+
```JSON
21+
[
22+
{
23+
"text": "go to Seattle today",
24+
"intentName": "BookFlight",
25+
"entityLabels": [
26+
{
27+
"entityName": "Location::LocationTo",
28+
"startCharIndex": 6,
29+
"endCharIndex": 12
30+
}
31+
]
32+
},
33+
{
34+
"text": "purple dogs are difficult to work with",
35+
"intentName": "BookFlight",
36+
"entityLabels": []
37+
}
38+
]
39+
```
Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
---
2+
title: include file
3+
description: include file
4+
services: cognitive-services
5+
author: diberry
6+
manager: cjgronlund
7+
ms.service: cognitive-services
8+
ms.component: luis
9+
ms.topic: include
10+
ms.custom: include file
11+
ms.date: 08/16/2018
12+
ms.author: diberry
13+
---
14+
The `response` array for adding the example utterances indicates success or failure for each example utterance with the `hasError` property. The following JSON response shows both utterances were added successfully.
15+
16+
```json
17+
"response": [
18+
{
19+
"value": {
20+
"UtteranceText": "go to seattle today",
21+
"ExampleId": -5123383
22+
},
23+
"hasError": false
24+
},
25+
{
26+
"value": {
27+
"UtteranceText": "book a flight",
28+
"ExampleId": -169157
29+
},
30+
"hasError": false
31+
}
32+
]
33+
```
34+
35+
The following JSON shows the result of a successful request to train:
36+
37+
```json
38+
{
39+
"request": null,
40+
"response": {
41+
"statusId": 9,
42+
"status": "Queued"
43+
}
44+
}
45+
```
46+
47+
The following JSON shows the result of a successful request for training status. Each modelID is an intent. Each intent has to be trained on all the utterances to correctly identify utterances to do belong to the intent as well as utterances that do not belong to the intent.
48+
49+
```JSON
50+
[
51+
{
52+
"modelId": "0c694cf9-8c32-44b8-9ea0-3d30a7d901ca",
53+
"details": {
54+
"statusId": 3,
55+
"status": "InProgress",
56+
"exampleCount": 48
57+
}
58+
},
59+
{
60+
"modelId": "10e53836-ade4-494e-9531-3bd6a944c510",
61+
"details": {
62+
"statusId": 3,
63+
"status": "InProgress",
64+
"exampleCount": 48
65+
}
66+
},
67+
{
68+
"modelId": "21e48732-a512-4c33-b5ed-8ea629465269",
69+
"details": {
70+
"statusId": 3,
71+
"status": "InProgress",
72+
"exampleCount": 48
73+
}
74+
},
75+
{
76+
"modelId": "edee15b1-9999-45c2-bbab-591d3a643033",
77+
"details": {
78+
"statusId": 3,
79+
"status": "InProgress",
80+
"exampleCount": 48
81+
}
82+
},
83+
{
84+
"modelId": "aa78e06e-df81-4bb2-b2d9-a2fbb2f81c54",
85+
"details": {
86+
"statusId": 3,
87+
"status": "InProgress",
88+
"exampleCount": 48
89+
}
90+
},
91+
{
92+
"modelId": "e39bb7bd-b417-41a9-a24f-caf4c47fc62c",
93+
"details": {
94+
"statusId": 3,
95+
"status": "InProgress",
96+
"exampleCount": 48
97+
}
98+
},
99+
{
100+
"modelId": "3782eac7-db84-4d66-ba00-0598dffb48ee",
101+
"details": {
102+
"statusId": 3,
103+
"status": "InProgress",
104+
"exampleCount": 48
105+
}
106+
},
107+
{
108+
"modelId": "a941d926-cb0f-47a8-ab7e-deba4378b96f",
109+
"details": {
110+
"statusId": 3,
111+
"status": "InProgress",
112+
"exampleCount": 48
113+
}
114+
},
115+
{
116+
"modelId": "8137f40e-ce6d-40a5-881f-dfd46a05f7e0",
117+
"details": {
118+
"statusId": 3,
119+
"status": "InProgress",
120+
"exampleCount": 48
121+
}
122+
},
123+
{
124+
"modelId": "dc08f95a-58b4-4064-a210-03fe34f75a3c",
125+
"details": {
126+
"statusId": 3,
127+
"status": "InProgress",
128+
"exampleCount": 48
129+
}
130+
},
131+
{
132+
"modelId": "4fabdbed-5697-4562-8c7d-36e174efff2e",
133+
"details": {
134+
"statusId": 3,
135+
"status": "InProgress",
136+
"exampleCount": 48
137+
}
138+
}
139+
]
140+
```
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
title: include file
3+
description: include file
4+
services: cognitive-services
5+
author: diberry
6+
manager: cjgronlund
7+
ms.service: cognitive-services
8+
ms.component: luis
9+
ms.topic: include
10+
ms.custom: include file
11+
ms.date: 08/16/2018
12+
ms.author: diberry
13+
---
14+
15+
> [!NOTE]
16+
> The complete solution including an example `utterances.json` file are available from the [**LUIS-Samples** Github repository](https://github.com/Microsoft/LUIS-Samples/blob/master/documentation-samples/quickstarts/change-model/).
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
title: include file
3+
description: include file
4+
services: cognitive-services
5+
author: diberry
6+
manager: cjgronlund
7+
ms.service: cognitive-services
8+
ms.component: luis
9+
ms.topic: include
10+
ms.custom: include file
11+
ms.date: 08/16/2018
12+
ms.author: diberry
13+
---
14+
* Your LUIS **[authoring key](../articles/cognitive-services/luis/luis-concept-keys.md#authoring-key)**.
15+
* Import the [TravelAgent app](https://github.com/Microsoft/LUIS-Samples/blob/master/documentation-samples/quickstarts/change-model/TravelAgent.json) from the LUIS-Samples GitHub repository.
16+
* The LUIS [**application ID**](../articles/cognitive-services/luis/luis-get-started-create-app.md) for the imported TravelAgent app. The application ID is shown in the application dashboard.
17+
* The **[utterances.json](https://github.com/Microsoft/LUIS-Samples/blob/master/documentation-samples/quickstarts/change-model/utterances.json)** file containing the example utterances to import.
18+
* The **version ID** within the application that receives the utterances. The default ID is "0.1".

0 commit comments

Comments
 (0)