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/search/cognitive-search-skill-text-translation.md
+17-15Lines changed: 17 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,27 +8,29 @@ author: careyjmac
8
8
ms.author: chalton
9
9
ms.service: cognitive-search
10
10
ms.topic: reference
11
-
ms.date: 09/16/2022
11
+
ms.date: 09/19/2022
12
12
---
13
13
14
14
# Text Translation cognitive skill
15
15
16
16
The **Text Translation** skill evaluates text and, for each record, returns the text translated to the specified target language. This skill uses the [Translator Text API v3.0](../cognitive-services/translator/reference/v3-0-translate.md) available in Cognitive Services.
17
17
18
-
This capability is useful if you expect that your documents may not all be in one language, in which case you can normalize the text to a single language before indexing for search by translating it. It is also useful for localization use cases, where you may want to have copies of the same text available in multiple languages.
18
+
This capability is useful if you expect that your documents may not all be in one language, in which case you can normalize the text to a single language before indexing for search by translating it. It's also useful for localization use cases, where you may want to have copies of the same text available in multiple languages.
19
19
20
-
The [Translator Text API v3.0](../cognitive-services/translator/reference/v3-0-reference.md) is a non-regional Cognitive Service, meaning that your data is not guaranteed to stay in the same region as your Azure Cognitive Search or attached Cognitive Services resource.
20
+
The [Translator Text API v3.0](../cognitive-services/translator/reference/v3-0-reference.md) is a non-regional Cognitive Service, meaning that your data isn't guaranteed to stay in the same region as your Azure Cognitive Search or attached Cognitive Services resource.
21
21
22
22
> [!NOTE]
23
23
> This skill is bound to Cognitive Services and requires [a billable resource](cognitive-search-attach-cognitive-services.md) for transactions that exceed 20 documents per indexer per day. Execution of built-in skills is charged at the existing [Cognitive Services pay-as-you go price](https://azure.microsoft.com/pricing/details/cognitive-services/).
24
-
>
25
-
> When using this skill, take into consideration that all documents in the source will be processed for translation, even if the source document language is the same as the required target language. This is useful for multi-language support within the same document. However, keep this in mind when planning for your source location data, to avoid unexpected billing charges from documents that didn't need to be processed for translation.
26
24
>
25
+
> When using this skill, all documents in the source are processed and billed for translation, even if the source and target languages are the same. This behavior is useful for multi-language support within the same document, but it can result in unnecessary processing. To avoid unexpected billing charges from documents that don't need processing, move them out of the data source container prior to running the skill.
26
+
>
27
+
28
+
## @odata.type
27
29
28
-
## @odata.type
29
30
Microsoft.Skills.Text.TranslationSkill
30
31
31
32
## Data limits
33
+
32
34
The maximum size of a record should be 50,000 characters as measured by [`String.Length`](/dotnet/api/system.string.length). If you need to break up your data before sending it to the text translation skill, consider using the [Text Split skill](cognitive-search-skill-textsplit.md).
33
35
34
36
## Skill parameters
@@ -37,24 +39,24 @@ Parameters are case-sensitive.
37
39
38
40
| Inputs | Description |
39
41
|---------------------|-------------|
40
-
| defaultToLanguageCode | (Required) The language code to translate documents into for documents that don't specify the to language explicitly. <br/> See the [full list of supported languages](../cognitive-services/translator/language-support.md). |
41
-
| defaultFromLanguageCode | (Optional) The language code to translate documents from for documents that don't specify the from language explicitly. If the defaultFromLanguageCode is not specified, the automatic language detection provided by the Translator Text API will be used to determine the from language. <br/> See the [full list of supported languages](../cognitive-services/translator/language-support.md). |
42
-
| suggestedFrom | (Optional) The language code to translate documents from when neither the fromLanguageCode input nor the defaultFromLanguageCode parameter are provided, and the automatic language detection is unsuccessful. If the suggestedFrom language is not specified, English (en) will be used as the suggestedFrom language. <br/> See the [full list of supported languages](../cognitive-services/translator/language-support.md). |
42
+
| defaultToLanguageCode | (Required) The language code to translate documents into for documents that don't specify the "to" language explicitly. <br/> See the [full list of supported languages](../cognitive-services/translator/language-support.md). |
43
+
| defaultFromLanguageCode | (Optional) The language code to translate documents from for documents that don't specify the "from" language explicitly. If the defaultFromLanguageCode isn't specified, the automatic language detection provided by the Translator Text API will be used to determine the "from" language. <br/> See the [full list of supported languages](../cognitive-services/translator/language-support.md). |
44
+
| suggestedFrom | (Optional) The language code to translate documents from if `fromLanguageCode` or `defaultFromLanguageCode`are unspecified, and the automatic language detection is unsuccessful. If the suggestedFrom language isn't specified, English (en) will be used as the suggestedFrom language. <br/> See the [full list of supported languages](../cognitive-services/translator/language-support.md). |
43
45
44
46
## Skill inputs
45
47
46
48
| Input name | Description |
47
49
|--------------------|-------------|
48
50
| text | The text to be translated.|
49
-
| toLanguageCode | A string indicating the language the text should be translated to. If this input is not specified, the defaultToLanguageCode will be used to translate the text. <br/>See the [full list of supported languages](../cognitive-services/translator/language-support.md). |
50
-
| fromLanguageCode | A string indicating the current language of the text. If this parameter is not specified, the defaultFromLanguageCode (or automatic language detection if the defaultFromLanguageCode is not provided) will be used to translate the text. <br/>See the [full list of supported languages](../cognitive-services/translator/language-support.md). |
51
+
| toLanguageCode | A string indicating the language the text should be translated to. If this input isn't specified, the defaultToLanguageCode will be used to translate the text. <br/>See the [full list of supported languages](../cognitive-services/translator/language-support.md). |
52
+
| fromLanguageCode | A string indicating the current language of the text. If this parameter isn't specified, the defaultFromLanguageCode (or automatic language detection if the defaultFromLanguageCode isn't provided) will be used to translate the text. <br/>See the [full list of supported languages](../cognitive-services/translator/language-support.md). |
51
53
52
54
## Skill outputs
53
55
54
56
| Output name | Description |
55
57
|--------------------|-------------|
56
58
| translatedText | The string result of the text translation from the translatedFromLanguageCode to the translatedToLanguageCode.|
57
-
| translatedToLanguageCode | A string indicating the language code the text was translated to. Useful if you are translating to multiple languages and want to be able to keep track of which text is which language.|
59
+
| translatedToLanguageCode | A string indicating the language code the text was translated to. Useful if you're translating to multiple languages and want to be able to keep track of which text is which language.|
58
60
| translatedFromLanguageCode | A string indicating the language code the text was translated from. Useful if you opted for the automatic language detection option as this output will give you the result of that detection.|
59
61
60
62
## Sample definition
@@ -139,11 +141,11 @@ Parameters are case-sensitive.
139
141
}
140
142
```
141
143
142
-
143
144
## Errors and warnings
144
-
If you provide an unsupported language code for either the from or the to language, an error is generated and text is not translated.
145
+
146
+
If you provide an unsupported language code for either the "to" or "from" language, an error is generated, and text isn't translated.
145
147
If your text is empty, a warning will be produced.
146
-
If your text is larger than 50,000 characters, only the first 50,000 characters will be translated and a warning will be issued.
148
+
If your text is larger than 50,000 characters, only the first 50,000 characters will be translated, and a warning will be issued.
0 commit comments