DocumentTranslationInput Class
Input for translation. This requires that you have your source document or documents in an Azure Blob Storage container. Provide a URL to the source file or source container containing the documents for translation. The source document(s) are translated and written to the location provided by the TranslationTargets.
- Inheritance
-
builtins.objectDocumentTranslationInput
Constructor
DocumentTranslationInput(source_url: str, targets: List[azure.ai.translation.document._models.TranslationTarget], *, source_language_code: Optional[str] = None, storage_type: Optional[Union[str, azure.ai.translation.document._generated.models._batch_document_translation_client_enums.StorageInputType]] = None, storage_source: Optional[str] = None, prefix: Optional[str] = None, suffix: Optional[str] = None)
Parameters
- source_url
- str
Required. Location of the folder / container or single file with your documents. This can be a SAS URL (see the service documentation for the supported SAS permissions for accessing source storage containers/blobs: https://aka.ms/azsdk/documenttranslation/sas-permissions) or a managed identity can be created and used to access documents in your storage account (see https://aka.ms/azsdk/documenttranslation/managed-identity).
- targets
- list[TranslationTarget]
Required. Location of the destination for the output. This is a list of TranslationTargets. Note that a TranslationTarget is required for each language code specified.
- source_language_code
- str
Language code for the source documents. If none is specified, the source language will be auto-detected for each document.
- prefix
- str
A case-sensitive prefix string to filter documents in the source path for translation. For example, when using a Azure storage blob Uri, use the prefix to restrict sub folders for translation.
- suffix
- str
A case-sensitive suffix string to filter documents in the source path for translation. This is most often use for file extensions.
- storage_type
- str or StorageInputType
Storage type of the input documents source string. Possible values include: "Folder", "File".
- storage_source
- str
Storage Source. Default value: "AzureBlob". Currently only "AzureBlob" is supported.
Variables
- source_url
- str
Required. Location of the folder / container or single file with your documents. This can be a SAS URL (see the service documentation for the supported SAS permissions for accessing source storage containers/blobs: https://aka.ms/azsdk/documenttranslation/sas-permissions) or a managed identity can be created and used to access documents in your storage account (see https://aka.ms/azsdk/documenttranslation/managed-identity).
- targets
- list[TranslationTarget]
Required. Location of the destination for the output. This is a list of TranslationTargets. Note that a TranslationTarget is required for each language code specified.
- source_language_code
- str
Language code for the source documents. If none is specified, the source language will be auto-detected for each document.
- prefix
- str
A case-sensitive prefix string to filter documents in the source path for translation. For example, when using a Azure storage blob Uri, use the prefix to restrict sub folders for translation.
- suffix
- str
A case-sensitive suffix string to filter documents in the source path for translation. This is most often use for file extensions.
- storage_type
- str or StorageInputType
Storage type of the input documents source string. Possible values include: "Folder", "File".
- storage_source
- str
Storage Source. Default value: "AzureBlob". Currently only "AzureBlob" is supported.
Feedback
Submit and view feedback for