Skip to content

Commit a17a8a5

Browse files
committed
Improve acrolinx score
1 parent bd53c50 commit a17a8a5

File tree

1 file changed

+17
-15
lines changed

1 file changed

+17
-15
lines changed

articles/search/cognitive-search-skill-text-translation.md

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,29 @@ author: careyjmac
88
ms.author: chalton
99
ms.service: cognitive-search
1010
ms.topic: reference
11-
ms.date: 09/16/2022
11+
ms.date: 09/19/2022
1212
---
1313

1414
# Text Translation cognitive skill
1515

1616
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.
1717

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.
1919

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.
2121

2222
> [!NOTE]
2323
> 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.
2624
>
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
2729

28-
## @odata.type
2930
Microsoft.Skills.Text.TranslationSkill
3031

3132
## Data limits
33+
3234
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).
3335

3436
## Skill parameters
@@ -37,24 +39,24 @@ Parameters are case-sensitive.
3739

3840
| Inputs | Description |
3941
|---------------------|-------------|
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). |
4345

4446
## Skill inputs
4547

4648
| Input name | Description |
4749
|--------------------|-------------|
4850
| 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). |
5153

5254
## Skill outputs
5355

5456
| Output name | Description |
5557
|--------------------|-------------|
5658
| 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.|
5860
| 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.|
5961

6062
## Sample definition
@@ -139,11 +141,11 @@ Parameters are case-sensitive.
139141
}
140142
```
141143

142-
143144
## 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.
145147
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.
147149

148150
## See also
149151

0 commit comments

Comments
 (0)