DeepsetDeepLTextTranslator
Translate text using DeepL Python SDK.
Basic Information
- Type:
deepset_cloud_custom_nodes.converters.deepl_translator.DeepsetDeepLTextTranslator
- Components it can connect with:
- Any component that accepts
string
as input or returnsstring
as its output.
- Any component that accepts
Inputs
Name | Type | Description |
---|---|---|
text | String | The text to be translated. |
Outputs
Name | Type | Description |
---|---|---|
text | String | The translated text. |
meta | Dictionary | The metadata related to the translation, such as the source and target language. |
Overview
DeepsetDeepLTextTranslator
uses the DeepL Python library to translate text into the languages you specify. For a list of supported languages, see DeepL documentation.
Authorization
You must have an active DeepL account and a DeepL API key to use this component. Connect DeepL to deepset AI Platform on the Integrations page. For details, see Add Integrations.
Once deepset is connected, you can use DeepsetDeepLTextTranslator
without passing the API key in the pipeline YAML.
Init Parameters
Parameter | Type | Possible values | Description |
---|---|---|---|
| List of strings | For a list of possible options, see DeepL documentation. | Codes of languages you want to translate your documents into. |
| String | Default: | The language of the documents you want to translate. If |
| Secret | Default: | The DeepL API key. |
| Boolean | Default: | Controls automatic formatting correction. When |
| Literal |
| Controls how the translation engine should split input into sentences before translation. Sets whether the translation engine should first split the input into sentences.
|
| String | Default: | Use this parameter to include additional context that can influence a translation without being translated itself. Providing additional context can potentially improve translation quality, especially for short, low-context source texts such as product names on an e-commerce website, article headlines on a news website, or UI elements. For details, see DeepL API documentation. |
| String |
| Controls whether translations lean toward informal or formal language. This works only for target languages: German (DE), French (FR), Italian (IT), Spanish (ES), Dutch (NL), Polish (PL), Portugese (PT_BR and PT_PT), Japanese (JA), and Russian (RU). Possible values:
|
| Integer | Default: | The maximum number of network retries after a failed HTTP request. |
| Union | Default: | The ID of the glossary to use for translation. Must match specified |
| Literal |
| Type of tags to parse before translation. Only XML and HTML are currently supported. |
| Boolean |
| Set to |
| Union of string and list of strings | Default: | XML tags that should not split a sentence. |
| Union of string and list of strings | Default: | XML tags that should split a sentence. |
| Union of string and list of strings | Default: | XML tags containing text that should not be translated. |
Run Method Parameters
These are the parameters you can configure for the component's run()
method. This means you can pass these parameters at query time through the API, in Playground, or when running a job. For details, see Modify Pipeline Parameters at Query Time.
Run() method parameters take precedence over initialization parameters.
Parameter | Type | Description |
---|---|---|
| String | The text to translate. |
Updated 1 day ago