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
| Content-Type |**Required request header**.<br/>Specifies the content type of the payload. Possible values are: `application/json`. |
46
-
| Content-Length |**Required request header**.<br/>The length of the request body. |
46
+
| Content-Length |**Optional**.<br/>The length of the request body. |
47
47
| X-ClientTraceId |**Optional**.<br/>A client-generated GUID to uniquely identify the request. You can omit this header if you include the trace ID in the query string using a query parameter named `ClientTraceId`. |
48
48
49
49
## Request body
@@ -99,7 +99,7 @@ An example JSON response is:
99
99
100
100
|Headers|Description|
101
101
|--- |--- |
102
-
|X-RequestId|Value generated by the service to identify the request. It's used for troubleshooting purposes.|
102
+
|X-RequestId|Value generated by the service to identify the request and used for troubleshooting purposes.|
103
103
104
104
## Response status codes
105
105
@@ -110,8 +110,8 @@ The following are the possible HTTP status codes that a request returns.
110
110
|200|Success.|
111
111
|400|One of the query parameters is missing or not valid. Correct request parameters before retrying.|
112
112
|401|The request couldn't be authenticated. Check that credentials are specified and valid.|
113
-
|403|The request isn't authorized. Check the details error message. This response code often indicates that all free translations provided with a trial subscription have been used up.|
114
-
|429|The server rejected the request because the client has exceeded request limits.|
113
+
|403|The request isn't authorized. Check the details error message. This response code often indicates that all free translations provided with a trial subscription are used.|
114
+
|429|The server rejected the request because the client exceeded request limits.|
115
115
|500|An unexpected error occurred. If the error persists, report it with: date and time of the failure, request identifier from response header `X-RequestId`, and client identifier from request header `X-ClientTraceId`.|
116
116
|503|Server temporarily unavailable. Retry the request. If the error persists, report it with: date and time of the failure, request identifier from response header `X-RequestId`, and client identifier from request header `X-ClientTraceId`.|
| Content-Type |*Required request header*.<br>Specifies the content type of the payload. Possible values are: `application/json`. |
45
-
| Content-Length |*Required request header*.<br>The length of the request body. |
46
-
| X-ClientTraceId |*Optional*.<br>A client-generated GUID to uniquely identify the request. You can omit this header if you include the trace ID in the query string using a query parameter named `ClientTraceId`. |
| Content-Type |_Required request header_.<br>Specifies the content type of the payload. Possible values are: `application/json`. |
45
+
| Content-Length |_Optional_.<br>The length of the request body. |
46
+
| X-ClientTraceId |_Optional_.<br>A client-generated GUID to uniquely identify the request. You can omit this header if you include the trace ID in the query string using a query parameter named `ClientTraceId`. |
47
47
48
48
## Request body
49
49
@@ -72,7 +72,7 @@ A successful response is a JSON array with one result for each string in the inp
72
72
73
73
*`isTransliterationSupported`: A boolean value that is true if the detected language is one of the languages supported for transliteration.
74
74
75
-
*`alternatives`: An array of other possible languages. Each element of the array is another object the following properties: `language`, `score`, `isTranslationSupported` and `isTransliterationSupported`.
75
+
*`alternatives`: An array of other possible languages. Each element of the array is another object the following properties: `language`, `score`, `isTranslationSupported`, and `isTransliterationSupported`.
76
76
77
77
An example JSON response is:
78
78
@@ -98,7 +98,7 @@ An example JSON response is:
98
98
99
99
| Headers | Description |
100
100
| --- | --- |
101
-
| X-RequestId | Value generated by the service to identify the request. It's used for troubleshooting purposes. |
101
+
| X-RequestId | Value generated by the service to identify the request and used for troubleshooting purposes. |
102
102
103
103
## Response status codes
104
104
@@ -109,8 +109,8 @@ The following are the possible HTTP status codes that a request returns.
109
109
| 200 | Success. |
110
110
| 400 | One of the query parameters is missing or not valid. Correct request parameters before retrying. |
111
111
| 401 | The request couldn't be authenticated. Check that credentials are specified and valid. |
112
-
| 403 | The request isn't authorized. Check the details error message. This code often indicates that all free translations provided with a trial subscription have been used up. |
113
-
| 429 | The server rejected the request because the client has exceeded request limits. |
112
+
| 403 | The request isn't authorized. Check the details error message. This code often indicates that all free translations provided with a trial subscription are used. |
113
+
| 429 | The server rejected the request because the client exceeded request limits. |
114
114
| 500 | An unexpected error occurred. If the error persists, report it with: date and time of the failure, request identifier from response header `X-RequestId`, and client identifier from request header `X-ClientTraceId`. |
115
115
| 503 | Server temporarily unavailable. Retry the request. If the error persists, report it with: date and time of the failure, request identifier from response header `X-RequestId`, and client identifier from request header `X-ClientTraceId`. |
| Content-Type |**Required request header**.<br>Specifies the content type of the payload. Possible values are: `application/json`. |
46
-
| Content-Length |**Required request header**.<br>The length of the request body. |
46
+
| Content-Length |**Optional**.<br>The length of the request body. |
47
47
| X-ClientTraceId |**Optional**.<br>A client-generated GUID to uniquely identify the request. You can omit this header if you include the trace ID in the query string using a query parameter named `ClientTraceId`. |
48
48
49
49
## Request body
@@ -77,11 +77,11 @@ A successful response is a JSON array with one result for each string in the inp
77
77
78
78
*`examples`: A list of examples for the (source term, target term) pair. Each element of the list is an object with the following properties:
79
79
80
-
*`sourcePrefix`: The string to concatenate _before_ the value of `sourceTerm` to form a complete example. Don't add a space character, since it's already there when it should be. This value may be an empty string.
80
+
*`sourcePrefix`: The string to concatenate _before_ the value of `sourceTerm` to form a complete example. Don't add a space character, since it's already there when it should be. This value can be an empty string.
81
81
82
82
*`sourceTerm`: A string equal to the actual term looked up. The string is added with `sourcePrefix` and `sourceSuffix` to form the complete example. Its value is separated so it can be marked in a user interface, for example, by bolding it.
83
83
84
-
*`sourceSuffix`: The string to concatenate _after_ the value of `sourceTerm` to form a complete example. Don't add a space character, since it's already there when it should be. This value may be an empty string.
84
+
*`sourceSuffix`: The string to concatenate _after_ the value of `sourceTerm` to form a complete example. Don't add a space character, since it's already there when it should be. This value can be an empty string.
85
85
86
86
*`targetPrefix`: A string similar to `sourcePrefix` but for the target.
Copy file name to clipboardExpand all lines: articles/ai-services/translator/reference/v3-0-dictionary-lookup.md
+19-19Lines changed: 19 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,14 +8,14 @@ manager: nitinme
8
8
9
9
ms.service: azure-ai-translator
10
10
ms.topic: reference
11
-
ms.date: 09/19/2023
11
+
ms.date: 06/06/2024
12
12
ms.author: lajanuar
13
13
---
14
14
<!-- markdownlint-disable MD033 -->
15
15
16
16
# Translator 3.0: Dictionary Lookup
17
17
18
-
Provides alternative translations for a word and a few idiomatic phrases. Each translation has a part-of-speech and a list of back-translations. The back-translations enable a user to understand the translation in context. The [Dictionary Example](./v3-0-dictionary-examples.md) operation allows further drill down to see example uses of each translation pair.
18
+
Provides alternative translations for a word and a few idiomatic phrases. Each translation has a part-of-speech and a list of back-translations. The back-translations enable a user to understand the translation in context. The [Dictionary Example](./v3-0-dictionary-examples.md) operation includes example uses of each translation pair.
| Content-Type |**Required request header**.<br>Specifies the content type of the payload. Possible values are: `application/json`. |
47
-
| Content-Length |**Required request header**.<br>The length of the request body. |
47
+
| Content-Length |**Optional**.<br>The length of the request body. |
48
48
| X-ClientTraceId |**Optional**.<br/>A client-generated GUID to uniquely identify the request. You can omit this header if you include the trace ID in the query string using a query parameter named `ClientTraceId`. |
49
49
50
50
## Request body
@@ -80,30 +80,30 @@ A successful response is a JSON array with one result for each string in the inp
80
80
81
81
| Tag name | Description |
82
82
|----------|--------------|
83
-
| ADJ | Adjectives |
84
-
| ADV | Adverbs |
85
-
| CONJ | Conjunctions |
86
-
| DET| Determiners |
87
-
| MODAL | Verbs |
88
-
| NOUN | Nouns |
89
-
| PREP | Prepositions |
90
-
| PRON | Pronouns |
91
-
| VERB | Verbs |
92
-
| OTHER | Other |
83
+
|`ADJ`| Adjectives |
84
+
|`ADV`| Adverbs |
85
+
|`CONJ`| Conjunctions |
86
+
|`DET`| Determiners |
87
+
|`MODAL`| Verbs |
88
+
|`NOUN`| Nouns |
89
+
|`PREP`| Prepositions |
90
+
|`PRON`| Pronouns |
91
+
|`VERB`| Verbs |
92
+
|`OTHER`| Other |
93
93
94
-
As an implementation note, these tags are part-of-speech tagging the English side, and then taking the most frequent tag for each source/target pair. So if people frequently translate a Spanish word to a different part-of-speech tag in English, tags may end up being wrong (with respect to the Spanish word).
94
+
As an implementation note, these tags are part-of-speech tagging the English side, and then taking the most frequent tag for each source/target pair. So if people frequently translate a Spanish word to a different part-of-speech tag in English, tags cab end up being wrong (with respect to the Spanish word).
95
95
96
-
*`confidence`: A value between 0.0 and 1.0 that represents the "confidence" (or more accurately, "probability in the training data") of that translation pair. The sum of confidence scores for one source word may or may not sum to 1.0.
96
+
*`confidence`: A value between 0.0 and 1.0 that represents the "confidence" (or more accurately, "probability in the training data") of that translation pair. The sum of confidence scores for one source word can or can't sum to 1.0.
97
97
98
-
*`prefixWord`: A string giving the word to display as a prefix of the translation. Currently, this property is the gendered determiner of nouns, in languages that have gendered determiners. For example, the prefix of the Spanish word `mosca` is `la`, since `mosca` is a feminine noun in Spanish. This value is only dependent on the translation, and not on the source. If there's no prefix, it's the empty string.
98
+
*`prefixWord`: A string giving the word to display as a prefix of the translation. Currently, this property is the gendered determiner of nouns, in languages that have gender determiners. For example, the prefix of the Spanish word `mosca` is `la`, since `mosca` is a feminine noun in Spanish. This value is only dependent on the translation, and not on the source. If there's no prefix, it's the empty string.
99
99
100
-
*`backTranslations`: A list of "back translations" of the target. For example, source words that the target can translate to. The list is guaranteed to contain the source word that was requested (for example, if the source word being looked up is `fly`, then it's guaranteed that `fly` is in the `backTranslations` list). However, it isn't guaranteed to be in the first position, and often isn't. Each element of the `backTranslations` list is an object described by the following properties:
100
+
*`backTranslations`: A list of "back translations" of the target. For example, source words that the target can translate to. The list is guaranteed to contain the source word that was requested (for example, if the source word being looked up is `fly`, then `fly` is included in the `backTranslations` list). However, it isn't guaranteed to be in the first position, and often isn't. Each element of the `backTranslations` list is an object described by the following properties:
101
101
102
102
*`normalizedText`: A string giving the normalized form of the source term that is a back-translation of the target. This value should be used as input to [lookup examples](./v3-0-dictionary-examples.md).
103
103
104
104
*`displayText`: A string giving the source term that is a back-translation of the target in a form best suited for end-user display.
105
105
106
-
*`numExamples`: An integer representing the number of examples that are available for this translation pair. Actual examples must be retrieved with a separate call to [lookup examples](./v3-0-dictionary-examples.md). The number is mostly intended to facilitate display in a UX. For example, a user interface may add a hyperlink to the back-translation if the number of examples is greater than zero. Then the back-translation is shown as plain text if there are no examples. The actual number of examples returned by a call to [lookup examples](./v3-0-dictionary-examples.md)may be less than `numExamples`, because more filtering may be applied on the fly to remove "bad" examples.
106
+
*`numExamples`: An integer representing the number of examples that are available for this translation pair. Actual examples must be retrieved with a separate call to [lookup examples](./v3-0-dictionary-examples.md). The number is mostly intended to facilitate display in a UX. For example, a user interface can add a hyperlink to the back-translation if the number of examples is greater than zero. Then the back-translation is shown as plain text if there are no examples. The actual number of examples returned by a call to [lookup examples](./v3-0-dictionary-examples.md)can be less than `numExamples`, because more filtering can be applied on the fly to remove "bad" examples.
107
107
108
108
*`frequencyCount`: An integer representing the frequency of this translation pair in the data. The main purpose of this field is to provide a user interface with a means to sort back-translations so the most frequent terms are first.
| Content-Type |_Required request header_. <br>Specifies the content type of the payload. <br>Accepted value is `application/json; charset=UTF-8`. |
62
-
| Content-Length |_Required request header_. <br>The length of the request body. |
62
+
| Content-Length |_Optional_. <br>The length of the request body. |
63
63
| X-ClientTraceId |_Optional_. <br>A client-generated GUID to uniquely identify the request. You can omit this header if you include the trace ID in the query string using a query parameter named `ClientTraceId`. |
0 commit comments