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/Translator/document-translation/how-to-guides/create-use-glossary-dictionary.md
+31-8Lines changed: 31 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,22 +5,34 @@ ms.topic: how-to
5
5
manager: nitinme
6
6
ms.author: lajanuar
7
7
author: laujan
8
-
ms.date: 03/13/2023
8
+
ms.date: 03/14/2023
9
9
---
10
10
11
11
# Create and use a glossary with Document Translation
12
12
13
-
A glossary is a custom dictionary that you create for the Document Translation service to use during the translation process. Common use cases for glossaries include:
13
+
A glossary is a custom dictionary that you create for the Document Translation service to use during the translation process. Currently, the glossary feature supports one-to-one source-to-target (not one-to-many language) language translations. Common use cases for glossaries include:
14
14
15
-
***Domain-specific terminology**. Designate specific meanings for your unique context.
15
+
***Domain-specific terminology**. Create a glossary that designates specific meanings for your unique context.
16
16
17
17
***Name brand preservation**. Restrict Document Translation from translating product name brands by using a glossary with the same source and target text.
18
18
19
-
***Specify translation for words with several meanings**. Choose a specific translation for polysemantic words.
19
+
***Specify translation for words with several meanings**. Choose a specific translation for poly​semantic words.
20
+
21
+
## Case sensitivity
22
+
23
+
By default, Azure Cognitive Services Translator service API is **case-sensitive**, meaning that it matches terms in the source text based on case.
24
+
25
+
#### Partial sentence application
26
+
27
+
When your glossary is applied to **part of a sentence**, the Document Translation API checks whether the glossary term matches the case in the source text. If the casing doesn't match, the glossary isn't applied.
28
+
29
+
#### Complete sentence application
30
+
31
+
When your glossary is applied to a **complete sentence**, the service becomes **case-insensitive**. It matches the glossary term regardless of its casing in the source text. This provision applies the correct results for use cases involving idioms and quotes.
20
32
21
33
## Create, upload, and use a glossary file
22
34
23
-
1. Create a file in a supported format that contains all the terms and phrases you want to use in your translation. You can check to see if your format is supported using the [Get supported glossary formats](../reference/get-supported-glossary-formats.md). The following is a sample REST API call using PowerShell. Update `your-document-translation-key` and `your-document-translation-endpoint` with values from the Azure portal. Only one key is necessary to make an API call.:
35
+
1.**Create your glossary file.** Create a file in a supported format that contains all the terms and phrases you want to use in your translation. You can check to see if your format is supported using the [Get supported glossary formats](../reference/get-supported-glossary-formats.md). To follow, is a sample REST API call using PowerShell. Update `your-document-translation-key` and `your-document-translation-endpoint` with values from the Azure portal. Only one key is necessary to make an API call.
24
36
25
37
:::image type="content" source="../media/key-endpoint.png" alt-text="Screenshot showing the key and endpoint fields in the Azure portal.":::
26
38
@@ -40,8 +52,19 @@ A glossary is a custom dictionary that you create for the Document Translation s
40
52
41
53
:::image type="content" source="../media/tsv-file.png" alt-text="Example of a TSV formatted glossary file formatted":::
42
54
43
-
In this English-source glossary, the words can have different meanings depending upon the context in which they are used. The glossary provides translations for each word in the file to help ensure accurate translations.
55
+
In this English-source glossary, the words can have different meanings depending upon the context in which they're used. The glossary provides translations for each word in the file to help ensure accurate translations.
56
+
57
+
For instance, when the word `Bank` appears in a financial document, it would be translated as `Banque` to reflect its financial meaning. If the word `Bank` appears in a geography document, it might be translated as `land beside a river` to reflect its topographical meaning. Similarly, the word `Crane` can refer to either a `bird` or a `machine`.
58
+
59
+
1. **Upload your glossary to the Azure storage**. To complete this step, you need an [Azure Blob Storage account](https://ms.portal.azure.com/#create/Microsoft.StorageAccount) with [containers](/azure/storage/blobs/storage-quickstart-blobs-portal?branch=main#create-a-container) to store and organize your blob data within your storage account.
60
+
61
+
1. **Specify your glossary in the translation request.** Include the glossary URL, format, and version in your **`POST`** request:
For instance, if the word "Bank" appears in a financial document, it would be translated as "Banque" to reflect its financial meaning. If the word "Bank" appears in a geography document, it might be translated as "land beside a river" to reflect its geographic meaning. Similarly, the word "Crane" can refer to either a bird or a machine.
67
+
Try the Document Translation how-to guide to asynchronously translate whole documents using a programming language of your choice:
46
68
47
-
1. Next, Upload your glossary: upload your glossary to your Azure Blob Storage account.
0 commit comments