Skip to content

Commit 56cf2c7

Browse files
Merge pull request #198978 from hazemelh/patch-18
Update entity-components and images
2 parents 2304889 + d281287 commit 56cf2c7

File tree

7 files changed

+107
-8
lines changed

7 files changed

+107
-8
lines changed

articles/cognitive-services/language-service/conversational-language-understanding/concepts/entity-components.md

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ The learned component uses the entity tags you label your utterances with to tra
3131

3232
The list component represents a fixed, closed set of related words along with their synonyms. The component performs an exact text match against the list of values you provide as synonyms. Each synonym belongs to a "list key", which can be used as the normalized, standard value for the synonym that will return in the output if the list component is matched. List keys are **not** used for matching.
3333

34+
In multilingual projects, you can specify a different set of synonyms for each language. While using the prediction API, you can specify the language in the input request, which will only match the synonyms associated to that language.
35+
3436

3537
:::image type="content" source="../media/list-component.png" alt-text="A screenshot showing an example of list components for entities." lightbox="../media/list-component.png":::
3638

@@ -46,7 +48,7 @@ The prebuilt component allows you to select from a library of common types such
4648

4749
When multiple components are defined for an entity, their predictions may overlap. When an overlap occurs, each entity's final prediction is determined by one of the following options.
4850

49-
### Combine option
51+
### Combine components
5052

5153
Combine components as one entity when they overlap by taking the union of all the components.
5254

@@ -56,34 +58,48 @@ Use this to combine all components when they overlap. When components are combin
5658

5759
Suppose you have an entity called Software that has a list component, which contains “Proseware OS” as an entry. In your utterance data, you have “I want to buy Proseware OS 9” with “Proseware OS 9” tagged as Software:
5860

59-
:::image type="content" source="../media/require-exact-overlap-example-1.svg" alt-text="A screenshot showing an example of exact overlap results for components." lightbox="../media/require-exact-overlap-example-1.svg":::
61+
:::image type="content" source="../media/union-overlap-example-1.svg" alt-text="A screenshot showing a learned and list entity overlapped." lightbox="../media/union-overlap-example-1.svg":::
6062

6163
By using combine components, the entity will return with the full context as “Proseware OS 9” along with the key from the list component:
6264

63-
:::image type="content" source="../media/require-exact-overlap-example-1.svg" alt-text="A screenshot showing an example of exact overlap results for components." lightbox="../media/require-exact-overlap-example-1.svg":::
65+
:::image type="content" source="../media/union-overlap-example-1-part-2.svg" alt-text="A screenshot showing the result of a combined component." lightbox="../media/union-overlap-example-1-part-2.svg":::
6466

6567
Suppose you had the same utterance but only “OS 9” was predicted by the learned component:
6668

67-
:::image type="content" source="../media/require-exact-overlap-example-1.svg" alt-text="A screenshot showing an example of exact overlap results for components." lightbox="../media/require-exact-overlap-example-1.svg":::
69+
:::image type="content" source="../media/union-overlap-example-2.svg" alt-text="A screenshot showing an utterance with O S 9 predicted by the learned component." lightbox="../media/union-overlap-example-2.svg":::
6870

6971
With combine components, the entity will still return as “Proseware OS 9” with the key from the list component:
7072

71-
:::image type="content" source="../media/require-exact-overlap-example-1.svg" alt-text="A screenshot showing an example of exact overlap results for components." lightbox="../media/require-exact-overlap-example-1.svg":::
73+
:::image type="content" source="../media/union-overlap-example-2-part-2.svg" alt-text="A screenshot showing the returned software entity." lightbox="../media/union-overlap-example-2-part-2.svg":::
7274

7375

74-
### Do not combine option
76+
### Do not combine components
7577

7678
Each overlapping component will return as a separate instance of the entity. Apply your own logic after prediction with this option.
7779

7880
#### Example
7981

8082
Suppose you have an entity called Software that has a list component, which contains “Proseware Desktop” as an entry. In your utterance data, you have “I want to buy Proseware Desktop Pro” with “Proseware Desktop Pro” tagged as Software:
8183

82-
:::image type="content" source="../media/require-exact-overlap-example-1.svg" alt-text="A screenshot showing an example of exact overlap results for components." lightbox="../media/require-exact-overlap-example-1.svg":::
84+
:::image type="content" source="../media/separated-overlap-example-1.svg" alt-text="A screenshot showing an example of a learned and list entity overlapped." lightbox="../media/separated-overlap-example-1.svg":::
8385

8486
When you do not combine components, the entity will return twice:
8587

86-
:::image type="content" source="../media/require-exact-overlap-example-1.svg" alt-text="A screenshot showing an example of exact overlap results for components." lightbox="../media/require-exact-overlap-example-1.svg":::
88+
:::image type="content" source="../media/separated-overlap-example-1-part-2.svg" alt-text="A screenshot showing the entity returned twice." lightbox="../media/separated-overlap-example-1-part-2.svg":::
89+
90+
91+
> [!NOTE]
92+
> During public preview of the service, there were 4 available options: **Longest overlap**, **Exact overlap**, **Union overlap**, and **Return all separately**. **Longest overlap** and **exact overlap** are deprecated and will only be supported for projects that previously had those options selected. **Union overlap** has been renamed to **Combine components**, while **Return all separately** has been renamed to **Do not combine components**.
93+
94+
## How to use components and options
95+
96+
Components give you the flexibility to define your entity in more than one way. When you combine components, you make sure that each component is represented and you reduce the number of entities returned in your predictions.
97+
98+
A common practice is to extend a prebuilt component with a list of values that the prebuilt might not support. For example, if you have an **Organization** entity, which has a _General.Organization_ prebuilt component added to it, the entity may not predict all the organizations specific to your domain. You can use a list component to extend the values of the Organization entity and thereby extending the prebuilt with your own organizations.
99+
100+
Other times you may be interested in extracting an entity through context such as a **Product** in a retail project. You would label for the learned component of the product to learn _where_ a product is based on its position within the sentence. You may also have a list of products that you already know before hand that you'd like to always extract. Combining both components in one entity allows you to get both options for the entity.
101+
102+
When you do not combine components, you simply allow every component to act as an independent entity extractor. One way of using this option is to separate the entities extracted from a list to the ones extracted through the learned or prebuilt components to handle and treat them differently.
87103

88104

89105
## Next steps

articles/cognitive-services/language-service/conversational-language-understanding/media/separated-overlap-example-1-part-2.svg

Lines changed: 22 additions & 0 deletions
Loading

articles/cognitive-services/language-service/conversational-language-understanding/media/separated-overlap-example-1.svg

Lines changed: 14 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)