Erstellen Sie plattformübergreifende Datenwissenschafts-, KI- und Automatisierungslösungen in Python basierend auf der GroupDocs.Translation-API. Konzentrieren Sie sich auf die Geschäftslogik und nicht auf die technischen Details.
Kostenlos testenGroupDocs.Translation offers real-time machine translation for texts, documents, images and resources. Powerful machine learning algorithms and sophisticated neural networks provide a quality close to that of a professional human translator, but much faster and more cost-effective. Running on a high-performance cloud server hosted by GroupDocs, it can translate PDF, Microsoft Office and OpenOffice documents, Markdown files, and .NET resources into 46 European, Middle East and Asian languages (across 128 language pairs). The API not only translates text, but also accurately preserves metadata, structure, styles, and layout of documents.
This SDK greatly simplifies the interaction with GroupDocs.Translation Cloud services from Python code, allowing you to focus on business logic rather than the technical details. It handles all the routine operations such as establishing connections, sending API requests, and parsing responses, wrapping all these tasks into a few simple methods that can be used in any Python application or workbook. The Python SDK, demo applications, documentation, and examples are open source distributed under the MIT license. You can use them for any purpose and change any part of the code.
Das GroupDocs.Translation Cloud SDK für Python wird mit detaillierten Entwicklerhandbüchern und Live-Codebeispielen geliefert, damit Sie im Handumdrehen mit der Arbeit mit API-Funktionen beginnen können. Erstellen Sie einfach ein kostenloses Konto bei GroupDocs Cloud, erhalten Sie APP-SID- und Schlüsselinformationen, um mit der GroupDocs Cloud-API zu kommunizieren, und schon können Sie eine API erstellen und das SDK verwenden.
GroupDocs.Translation Cloud ist eine REST-API, die einfach in jede Sprache oder Plattform integriert werden kann und in der Lage ist, HTTP-Anfragen und -Antworten zu verwalten. Es unterstützt alle gängigen Cloud-Speicherdienste wie Google Cloud, Drive, DropBox und Amazon S3, um ohne Abhängigkeiten zu interagieren.
//Get your App SID, App Key and Storage Name at https://dashboard.groupdocs.cloud (free registration is required).
import time
import groupdocs_translation_cloud
from groupdocs_translation_cloud import TextRequest, PdfFileRequest, Format
api = groupdocs_translation_cloud.api.TranslationApi()
file_api = groupdocs_translation_cloud.api.FileApi()
api.api_client.configuration.client_id = "YOU_CLIENT_ID"
api.api_client.configuration.client_secret = "YOU_CLIENT_SECRET"
text_request = TextRequest(source_language="en",
target_languages=["es", "fr", "ru"],
texts=["Hello World!", "This is a test text"],
origin="your_application_name",
contains_markdown=False)
response = api.text_post(text_request)
if response.status == 202:
while True:
status_response = api.text_request_id_get(response.id)
if status_response.status == 200:
for lang in status_response.translations:
print(lang + ": " + status_response.translations[lang][0])
break
time.sleep(2)
Die GroupDocs.Translation Cloud-API ist SSL-gesichert und die Authentifizierungsanfragen erfordern eine Signatur und AppSID-Abfrageparameter oder einen OAuth 2.0-Autorisierungsheader.