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
Copy file name to clipboardExpand all lines: articles/cognitive-services/LUIS/developer-reference-resource.md
+30-3Lines changed: 30 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,12 +2,12 @@
2
2
title: Developer resources - Language Understanding
3
3
description: SDKs, REST APIs, CLI, help you develop Language Understanding (LUIS) apps in your programming language. Manage your Azure resources and LUIS predictions.
4
4
ms.topic: reference
5
-
ms.date: 02/09/2020
5
+
ms.date: 02/11/2020
6
6
---
7
7
8
8
# SDK, REST, and CLI developer resources for Language Understanding (LUIS)
9
9
10
-
SDKs, REST APIs, CLI, help you develop Language Understanding (LUIS) apps in your programming language. Manage your Azure resources and LUIS predictions.
10
+
SDKs, REST APIs, CLI, help you develop Language Understanding (LUIS) apps in your programming language. Manage your Azure resources and LUIS predictions.
11
11
12
12
## Azure resource management
13
13
@@ -31,6 +31,10 @@ Learn about the [V3 prediction endpoint](luis-migration-api-v3.md).
31
31
32
32
Use [Cognitive Services sample code](https://github.com/Azure-Samples/cognitive-services-quickstart-code) to learn and use the most common tasks.
33
33
34
+
### REST specifications
35
+
36
+
The [LUIS REST specifications](https://github.com/Azure/azure-rest-api-specs/tree/master/specification/cognitiveservices/data-plane/LUIS), along with all [Azure REST specifications](https://github.com/Azure/azure-rest-api-specs), are publicly available on GitHub.
37
+
34
38
### REST APIs
35
39
36
40
Both authoring and prediction endpoint APIS are available from REST APIs:
@@ -40,6 +44,29 @@ Both authoring and prediction endpoint APIS are available from REST APIs:
|Authoring on training endpoint|`https://{your-resource-name}.api.cognitive.microsoft.com/luis/api/v2.0/apps/{appID}/`|
57
+
|V2 Runtime - all predictions on runtime endpoint|`https://{your-resource-name}.api.cognitive.microsoft.com/luis/v2.0/apps/{appId}?q={q}[&timezoneOffset][&verbose][&spellCheck][&staging][&bing-spell-check-subscription-key][&log]`|
58
+
|V3 Runtime - versions prediction on runtime endpoint|`https://{your-resource-name}.api.cognitive.microsoft.com/luis/prediction/v3.0/apps/{appId}/versions/{versionId}/predict?query={query}[&verbose][&log][&show-all-intents]`|
59
+
|V3 Runtime - slot prediction on runtime endpoint|`https://{your-resource-name}.api.cognitive.microsoft.com/luis/prediction/v3.0/apps/{appId}/slots/{slotName}/predict?query={query}[&verbose][&log][&show-all-intents]`|
60
+
61
+
The following table explains the parameters, denoted with curly braces `{}`, in the previous table.
62
+
63
+
|Parameter|Purpose|
64
+
|--|--|
65
+
|`your-resource-name`|Azure resource name|
66
+
|`q` or `query`|utterance text sent from client application such as chat bot|
*[Dispatch](https://github.com/microsoft/botbuilder-tools/blob/master/packages/Dispatch)- manage parent and child apps
73
100
*[LUISGen](https://github.com/microsoft/botbuilder-tools/blob/master/packages/LUISGen) - Auto generate backing C#/Typescript classes for your LUIS intents and entities.
74
101
*[Bot Framework emulator](https://github.com/Microsoft/BotFramework-Emulator/releases) - a desktop application that allows bot developers to test and debug bots built using the Bot Framework SDK
75
-
102
+
*[Bot Framework Composer](https://github.com/microsoft/BotFramework-Composer/blob/stable/README.md) - an integrated development tool for developers and multi-disciplinary teams to build bots and conversational experiences with the Microsoft Bot Framework
Copy file name to clipboardExpand all lines: articles/cognitive-services/LUIS/luis-concept-data-alteration.md
+15-24Lines changed: 15 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,34 +1,25 @@
1
1
---
2
2
title: Data alteration - LUIS
3
-
titleSuffix: Azure Cognitive Services
4
3
description: Learn how data can be changed before predictions in Language Understanding (LUIS)
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: conceptual
12
-
ms.date: 11/19/2019
13
-
ms.author: diberry
5
+
ms.date: 02/11/2020
14
6
---
15
7
16
8
# Alter utterance data before or during prediction
17
-
LUIS provides ways to manipulate the utterance before or during the prediction. These include [fixing spelling](luis-tutorial-bing-spellcheck.md), and fixing timezone issues for prebuilt [datetimeV2](luis-reference-prebuilt-datetimev2.md).
9
+
LUIS provides ways to manipulate the utterance before or during the prediction. These include [fixing spelling](luis-tutorial-bing-spellcheck.md), and fixing timezone issues for prebuilt [datetimeV2](luis-reference-prebuilt-datetimev2.md).
18
10
19
11
## Correct spelling errors in utterance
20
12
21
-
[!INCLUDE [Not supported in V3 API prediction endpoint](./includes/v2-support-only.md)]
22
13
14
+
### V3 runtime
23
15
24
-
LUIS uses [Bing Spell Check API V7](../Bing-Spell-Check/overview.md) to correct spelling errors in the utterance. LUIS needs the key associated with that service. Create the key, then add the key as a querystring parameter at the [endpoint](https://go.microsoft.com/fwlink/?linkid=2092356).
16
+
Preprocess text for spelling corrections before you send the utterance to LUIS. Use example utterances with the correct spelling to ensure you get the correct predictions.
25
17
26
-
<!--
27
-
You can also correct spelling errors in the **Test** panel by [entering the key](luis-interactive-test.md#view-bing-spell-check-corrections-in-test-panel). The key is kept as a session variable in the browser for the Test panel. Add the key to the Test panel in each browser session you want spelling corrected.
18
+
Use [Bing Spell Check](../bing-spell-check/overview.md) to correct text before sending it to LUIS.
28
19
29
-
Usage of the key in the test panel and at the endpoint count toward the [key usage](https://azure.microsoft.com/pricing/details/cognitive-services/spellcheck-api/) quota. LUIS implements Bing Spell Check limits for text length.
20
+
### Prior to V3 runtime
30
21
31
-
-->
22
+
LUIS uses [Bing Spell Check API V7](../Bing-Spell-Check/overview.md) to correct spelling errors in the utterance. LUIS needs the key associated with that service. Create the key, then add the key as a querystring parameter at the [endpoint](https://go.microsoft.com/fwlink/?linkid=2092356).
32
23
33
24
The endpoint requires two params for spelling corrections to work:
34
25
@@ -54,7 +45,7 @@ When [Bing Spell Check API V7](https://azure.microsoft.com/services/cognitive-se
54
45
```
55
46
56
47
#### [V3 prediction endpoint response](#tab/V3)
57
-
48
+
58
49
```JSON
59
50
{
60
51
"query": "Book a flite to London?",
@@ -71,16 +62,16 @@ When [Bing Spell Check API V7](https://azure.microsoft.com/services/cognitive-se
71
62
}
72
63
```
73
64
74
-
* * *
65
+
* * *
75
66
76
67
### List of allowed words
77
68
The Bing spell check API used in LUIS does not support a list of words to ignore during the spell check alterations. If you need to allow a list of words or acronyms, process the utterance in the client application before sending the utterance to LUIS for intent prediction.
78
69
79
70
## Change time zone of prebuilt datetimeV2 entity
80
-
When a LUIS app uses the prebuilt [datetimeV2](luis-reference-prebuilt-datetimev2.md) entity, a datetime value can be returned in the prediction response. The timezone of the request is used to determine the correct datetime to return. If the request is coming from a bot or another centralized application before getting to LUIS, correct the timezone LUIS uses.
71
+
When a LUIS app uses the prebuilt [datetimeV2](luis-reference-prebuilt-datetimev2.md) entity, a datetime value can be returned in the prediction response. The timezone of the request is used to determine the correct datetime to return. If the request is coming from a bot or another centralized application before getting to LUIS, correct the timezone LUIS uses.
81
72
82
73
### Endpoint querystring parameter
83
-
The timezone is corrected by adding the user's timezone to the [endpoint](https://go.microsoft.com/fwlink/?linkid=2092356) using the `timezoneOffset` param. The value of `timezoneOffset` should be the positive or negative number, in minutes, to alter the time.
74
+
The timezone is corrected by adding the user's timezone to the [endpoint](https://go.microsoft.com/fwlink/?linkid=2092356) using the `timezoneOffset` param. The value of `timezoneOffset` should be the positive or negative number, in minutes, to alter the time.
84
75
85
76
|Param|Value|
86
77
|--|--|
@@ -91,11 +82,11 @@ If you need the returned prebuilt datetimeV2 to adjust for daylight savings time
91
82
92
83
#### [V2 prediction endpoint request](#tab/V2)
93
84
94
-
Add 60 minutes:
85
+
Add 60 minutes:
95
86
96
87
https://{region}.api.cognitive.microsoft.com/luis/v2.0/apps/{appId}?q=Turn the lights on?**timezoneOffset=60**&verbose={boolean}&spellCheck={boolean}&staging={boolean}&bing-spell-check-subscription-key={string}&log={boolean}
97
88
98
-
Remove 60 minutes:
89
+
Remove 60 minutes:
99
90
100
91
https://{region}.api.cognitive.microsoft.com/luis/v2.0/apps/{appId}?q=Turn the lights on?**timezoneOffset=-60**&verbose={boolean}&spellCheck={boolean}&staging={boolean}&bing-spell-check-subscription-key={string}&log={boolean}
101
92
@@ -105,13 +96,13 @@ Add 60 minutes:
105
96
106
97
https://{region}.api.cognitive.microsoft.com/luis/v3.0-preview/apps/{appId}/slots/production/predict?query=Turn the lights on?**timezoneOffset=60**&spellCheck={boolean}&bing-spell-check-subscription-key={string}&log={boolean}
107
98
108
-
Remove 60 minutes:
99
+
Remove 60 minutes:
109
100
110
101
https://{region}.api.cognitive.microsoft.com/luis/v3.0-preview/apps/{appId}/slots/production/predict?query=Turn the lights on?**timezoneOffset=-60**&spellCheck={boolean}&bing-spell-check-subscription-key={string}&log={boolean}
111
102
112
103
Learn more about the [V3 prediction endpoint](luis-migration-api-v3.md).
113
104
114
-
* * *
105
+
* * *
115
106
116
107
## C# code determines correct value of timezoneOffset
117
108
The following C# code uses the [TimeZoneInfo](https://docs.microsoft.com/dotnet/api/system.timezoneinfo) class's [FindSystemTimeZoneById](https://docs.microsoft.com/dotnet/api/system.timezoneinfo.findsystemtimezonebyid#examples) method to determine the correct `timezoneOffset` based on system time:
description: Use Language Understanding (LUIS) to continuously work on your application to refine it and improve its language understanding.
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: conceptual
12
5
ms.date: 11/19/2019
13
-
ms.author: diberry
14
6
---
15
7
16
8
# Test your LUIS app in the LUIS portal
17
9
18
-
[Testing](luis-concept-test.md) an app is an iterative process. After training your LUIS app, test it with sample utterances to see if the intents and entities are recognized correctly. If they're not, make updates to the LUIS app, train, and test again.
10
+
[Testing](luis-concept-test.md) an app is an iterative process. After training your LUIS app, test it with sample utterances to see if the intents and entities are recognized correctly. If they're not, make updates to the LUIS app, train, and test again.
In order to test against the most recent version of the active app, select **Train** from the top menu, before testing.
22
+
In order to test against the most recent version of the active app, select **Train** from the top menu, before testing.
31
23
32
24
## Test an utterance
33
25
34
-
The test utterance should not be exactly the same as any example utterances in the app. The test utterance should include word choice, phrase length, and entity usage you expect for a user.
26
+
The test utterance should not be exactly the same as any example utterances in the app. The test utterance should include word choice, phrase length, and entity usage you expect for a user.
35
27
36
-
1. Access your app by selecting its name on the **My Apps** page.
28
+
1. Access your app by selecting its name on the **My Apps** page.
37
29
38
30
1. To access the **Test** slide-out panel, select **Test** in your application's top panel.
39
31
@@ -48,9 +40,9 @@ The test utterance should not be exactly the same as any example utterances in t
48
40
49
41
## Inspect score
50
42
51
-
You inspect details of the test result in the **Inspect** panel.
52
-
53
-
1. With the **Test** slide-out panel open, select **Inspect** for an utterance you want to compare.
43
+
You inspect details of the test result in the **Inspect** panel.
44
+
45
+
1. With the **Test** slide-out panel open, select **Inspect** for an utterance you want to compare.
54
46
55
47

56
48
@@ -68,7 +60,7 @@ You inspect details of the test result in the **Inspect** panel.
68
60
69
61
## View sentiment results
70
62
71
-
If **Sentiment analysis** is configured on the **[Publish](luis-how-to-publish-app.md#enable-sentiment-analysis)** page, the test results include the sentiment found in the utterance.
63
+
If **Sentiment analysis** is configured on the **[Publish](luis-how-to-publish-app.md#enable-sentiment-analysis)** page, the test results include the sentiment found in the utterance.
72
64
73
65

74
66
@@ -78,7 +70,7 @@ If you are using [Patterns](luis-concept-patterns.md) and the utterance matched
78
70
79
71
## Compare with published version
80
72
81
-
You can test the active version of your app with the published [endpoint](luis-glossary.md#endpoint) version. In the **Inspect** panel, select **Compare with published**. Any testing against the published model is deducted from your Azure subscription quota balance.
73
+
You can test the active version of your app with the published [endpoint](luis-glossary.md#endpoint) version. In the **Inspect** panel, select **Compare with published**. Any testing against the published model is deducted from your Azure subscription quota balance.
82
74
83
75

84
76
@@ -87,55 +79,22 @@ You can view the endpoint JSON returned for the comparison by selecting the **Sh
<!--Service name is 'Bing Spell Check v7 API' in the portal-->
91
82
## Additional settings in test panel
92
83
93
84
### LUIS endpoint
94
85
95
-
If you have several LUIS endpoints, use the **Additional Settings** link on the Test's Published pane to change the endpoint used for testing. If you are not sure which endpoint to use, select the default **Starter_Key**.
86
+
If you have several LUIS endpoints, use the **Additional Settings** link on the Test's Published pane to change the endpoint used for testing. If you are not sure which endpoint to use, select the default **Starter_Key**.
96
87
97
88
> [!div class="mx-imgBorder"]
98
89
> 
99
90
100
-
<!--
101
-
### View Bing Spell Check corrections in test panel
102
-
103
-
Requirements to view the spelling corrections:
104
-
105
-
* Published app
106
-
* Bing Spell Check [service key](https://azure.microsoft.com/try/cognitive-services/?api=spellcheck-api). The service key is not stored and needs to be reset for each browser session.
107
-
108
-
Use the following procedure to include the [Bing Spell Check v7](https://azure.microsoft.com/services/cognitive-services/spell-check/) service in the Test pane results.
109
-
110
-
1. In the **Test** pane, enter an utterance. When the utterance is predicted, select **[Inspect](#inspect-score)** underneath the utterance you entered.
111
-
112
-
1. When the **Inspect** panel opens, select **[Compare with Published](#compare-with-published-version)**.
113
-
114
-
1. When the **Published** panel opens, select **[Additional Settings](#additional-settings-in-test-panel)**.
115
-
116
-
1. In the pop-up dialog, check **Enable Bing Spell Check** and enter the key, then select **Done**.
117
-

118
-
119
-
1. Enter a query with an incorrect spelling such as `book flite to seattle` and select enter. The incorrect spelling of the word `flite` is replaced in the query sent to LUIS and the resulting JSON shows both the original query, as `query`, and the corrected spelling in the query, as `alteredQuery`.
See batch testing [concepts](luis-concept-batch-test.md) and learn [how to](luis-how-to-batch-test.md) test a batch of utterances.
135
94
136
95
## Next steps
137
96
138
-
If testing indicates that your LUIS app doesn't recognize the correct intents and entities, you can work to improve your LUIS app's accuracy by labeling more utterances or adding features.
97
+
If testing indicates that your LUIS app doesn't recognize the correct intents and entities, you can work to improve your LUIS app's accuracy by labeling more utterances or adding features.
139
98
140
-
*[Label suggested utterances with LUIS](luis-how-to-review-endpoint-utterances.md)
141
-
*[Use features to improve your LUIS app's performance](luis-how-to-add-features.md)
99
+
*[Label suggested utterances with LUIS](luis-how-to-review-endpoint-utterances.md)
100
+
*[Use features to improve your LUIS app's performance](luis-how-to-add-features.md)
0 commit comments