Skip to content

Commit 85cd855

Browse files
authored
Merge pull request #96819 from diberry/diberry/1121-luis-labeling-from-hazem
[Cogsvcs] LUIS - Hazem's hack PR for labeling
2 parents 4dc119e + 454be72 commit 85cd855

12 files changed

+50
-24
lines changed

articles/cognitive-services/LUIS/label-entity-example-utterance.md

Lines changed: 50 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -8,77 +8,103 @@ manager: nitinme
88
ms.service: cognitive-services
99
ms.subservice: language-understanding
1010
ms.topic: quickstart
11-
ms.date: 11/15/2019
11+
ms.date: 11/21/2019
1212
ms.author: diberry
1313
#Customer intent: As a new user, I want to label a machine-learned entity in an example utterance.
1414
---
1515

1616
# Label machine-learned entity in an example utterance
1717

18-
Labeling an entity in an example utterance shows LUIS has an example of the entity is and where the entity can appear in the utterance.
18+
Labeling an entity in an example utterance gives LUIS an example of what the entity is and where the entity can appear in the utterance.
1919

2020
## Labeling machine-learned entity
2121

2222
Consider the phrase, `hi, please I want a cheese pizza in 20 minutes`.
2323

24-
1. Select the left-most text, then select the right-most text of the entity. The _complete order_ is labeled in the following image.
24+
1. Select the left-most text, then select the right-most text of the entity, then pick the entity you want to label with, in this case Complete Order. The _complete order_ is labeled in the following image.
2525

2626
> [!div class="mx-imgBorder"]
2727
> ![Label complete machine-learned entity](media/label-utterances/example-1-label-machine-learned-entity-complete-order.png)
2828
2929
1. Select the entity from the pop-up window. The labeled complete pizza order entity includes all words (from left to right in English) that are labeled.
3030

31-
> [!TIP]
32-
> The entities available in the pop-up window are relative to the context in which the text appears. For example, if you have a 5-level machine-learned entity, and you are selecting text at the 3rd level (indicated by a labeled entity name under the example utterance), the entities available in the pop-up window are limited to the context of subcomponents of the 3rd level (4th level subcomponents).
33-
3431
## Review labeled text
3532

36-
After labeling, review the example utterance. LUIS applies the current model to the example utterance after labeling. The solid line indicates the text has been labeled.
33+
After labeling, review the example utterance and ensure the selected span of text has been underlined with the chosen entity. The solid line indicates the text has been labeled.
3734

3835
> [!div class="mx-imgBorder"]
3936
> ![Labeled complete machine-learned entity](media/label-utterances/example-1-label-machine-learned-entity-complete-order-labeled.png)
4037
41-
## When to train
42-
43-
If the current model should support your labeled entity, but the example utterance continues to show the text as predicted but not labeled, train your app.
44-
4538
## Confirm predicted entity
4639

47-
If the visual indicator is above the utterance, it indicates the text is predicted but _not labeled yet_. To turn the prediction into a label, select the utterance, then select **Confirm entity predictions**.
40+
If there is a dotted-lined box around the span of text and the entity name is above the utterance, it indicates the text is predicted but _not labeled yet_. To turn the prediction into a label, select the utterance row, then select **Confirm entity predictions**.
4841

4942
> [!div class="mx-imgBorder"]
5043
> ![Predict complete machine-learned entity](media/label-utterances/example-1-label-machine-learned-entity-complete-order-predicted.png)
5144
52-
## Label subcomponent entity by painting with entity palette cursor
45+
Alternatively, you could select the entity name above the text, then select **Confirm Prediction** from the menu that appears.
46+
47+
> [!div class="mx-imgBorder"]
48+
> ![Predict complete machine-learned entity with menu](media/label-utterances/example-1-label-machine-learned-entity-complete-order-predicted-menu.png)
49+
50+
## Label entity by painting with entity palette cursor
5351

54-
1. In order to correct predictions (entities, which appear above the example utterance), open the entity palette.
52+
The entity palette offers an alternative to the previous labeling experience. It allows you to brush over text to instantly label it with an entity.
53+
54+
1. Open the entity palette by selecting on the Highlighter icon at the top right of the utterance table.
5555

5656
> [!div class="mx-imgBorder"]
57-
> ![Entity palette for machine-learned entity](media/label-utterances/pizza-entity-palette-with-pizza-type-selected.png)
57+
> ![Entity palette for machine-learned entity](media/label-utterances/example-1-label-machine-learned-entity-palette.png)
5858
59-
1. Select the entity subcomponent. This action is visually indicated with a new cursor. The cursor follows the mouse as you move in the portal.
59+
2. Select the entity component. This action is visually indicated with a new cursor. The cursor follows the mouse as you move in the portal.
6060

6161
> [!div class="mx-imgBorder"]
62-
> ![Entity palette for machine-learned entity](media/label-utterances/pizza-type-entity-palette-cursor.png)
62+
> ![Entity palette for machine-learned entity](media/label-utterances/example-1-label-machine-learned-entity-palette-menu.png)
6363
64-
1. In the example utterance, _paint_ the entity with the cursor.
64+
3. In the example utterance, _paint_ the entity with the cursor.
6565

6666
> [!div class="mx-imgBorder"]
67-
> ![Entity palette for machine-learned entity](media/label-utterances/paint-subcomponent-with-entity-palette-cursor.png)
67+
> ![Entity palette for machine-learned entity](media/label-utterances/example-1-label-machine-learned-entity-palette-label-action.png)
68+
69+
## Labeling subcomponents of a multiple-level machine learned entity
70+
71+
Subcomponents in entities are labeled exactly the same way as top level entities. When selecting text, the entities available in the pop-up window are relative to the context in which the text appears. For example, if you have a 5-level machine-learned entity, and you are selecting text that has been labeled with the 1st and 2nd levels (indicated by a labeled entity name under the example utterance), the entities available in the pop-up window are limited to the context of components of the 3rd level. To label the text with other entities, select **Label as another entity** option.
72+
73+
> [!div class="mx-imgBorder"]
74+
> ![Entity palette for machine-learned entity](media/label-utterances/example-1-label-machine-learned-entity-subcomponent.png)
75+
76+
Subcomponents can be labeled only if the parent is also labeled.
77+
78+
## Unlabel entities
79+
80+
To unlabel an entity, select the entity name underneath the text and select **Unlabel**. If the entity you are trying to unlabel has labeled subcomponents, then the subcomponents must be unlabeled first.
81+
82+
## Editing labels using the entity palette
83+
84+
If you make a mistake while labeling, the entity palette is an easy tool that allows for quick edits. For example, if an entity label spans an extra word by mistake, and it already has labeled subcomponents, then you can use the entity palette to brush over the required shorter span of words.
85+
86+
For example:
87+
88+
1. Pizza Type subcomponent spans "cheese pizza with" which includes an extra incorrect word -- "with"
89+
> [!div class="mx-imgBorder"]
90+
> ![Entity palette for machine-learned entity](media/label-utterances/edit-label-with-palette-1.png)
91+
92+
2. Use the entity palette to pick Pizza Type and brush over "cheese pizza". The outcome is that only cheese pizza is labeled as Pizza Type now.
93+
> [!div class="mx-imgBorder"]
94+
> ![Entity palette for machine-learned entity](media/label-utterances/edit-label-with-palette-2.png)
6895
69-
## Labeling matching-text entities to a machine-learned entity
7096

71-
Matching-text entities include prebuilt entities, regular expression entities, and list entities. You add these to a machine-learned entity, as constraints to a subcomponent, when you create or edit the machine-learned entity.
97+
## Labels for matching-text entities
7298

73-
**Once these constraints are added, you do not need to label the matching text in the example utterance.**
99+
Matching-text entities include prebuilt entities, regular expression entities, list entities, and pattern.any entities. These are automatically labeled by LUIS so they are not required to be manually labeled by users.
74100

75101
## Entity prediction errors
76102

77-
Entity prediction errors show a caution indicator. This indicates the predicted entity doesn't match the labeled entity.
103+
Entity prediction errors indicate the predicted entity doesn't match the labeled entity. This is visualized with a caution indicator next to the utterance.
78104

79105
> [!div class="mx-imgBorder"]
80106
> ![Entity palette for machine-learned entity](media/label-utterances/example-utterance-indicates-prediction-error.png)
81107
82108
## Next steps
83109

84-
Use the [dashboard](luis-how-to-use-dashboard.md) and [review endpoint utterances](luis-how-to-review-endpoint-utterances.md) to improve the prediction quality of your app.
110+
Use the [dashboard](luis-how-to-use-dashboard.md) and [review endpoint utterances](luis-how-to-review-endpoint-utterances.md) to improve the prediction quality of your app.
4.51 KB
Loading
14.7 KB
Loading
Loading
Loading
Loading
Loading
11.4 KB
Loading
11.2 KB
Loading
19.2 KB
Loading

0 commit comments

Comments
 (0)