Translate English to Russian Text with Deep Learning AI in Python

Cloudmersive
2 min readJan 19, 2022

In our last post we covered how you can leverage the Cloudmersive NLP API v2 for Russian-to-English translation services in Python. Now it’s time to flip the script — using the nlp-v2/translate/language/eng/to/rus API iteration, you can empower your application to translate text from English to Russian with advanced Deep Learning and Neural NLP.

To get set up in Python, you should first install the Python SDK:

pip install cloudmersive-nlp-api-clientfrom __future__ import print_function
import time
import cloudmersive_nlp_api_client
from cloudmersive_nlp_api_client.rest import ApiException
from pprint import pprint

Next, copy & paste your Cloudmersive API Key into the API key authorization code snippet below:

# Configure API key authorization: Apikey
configuration = cloudmersive_nlp_api_client.Configuration()
configuration.api_key['Apikey'] = 'YOUR_API_KEY'

Quick note for the above snippet: you’ll get an API key valid for 800 API calls per month by creating a free account on the Cloudmersive website. Once this step is finished, you can add in the rest of the callback function:

# create an instance of the API class
api_instance = cloudmersive_nlp_api_client.LanguageTranslationApi(cloudmersive_nlp_api_client.ApiClient(configuration))
input = cloudmersive_nlp_api_client.LanguageTranslationRequest() # LanguageTranslationRequest | Input translation request
try:
# Translate English to Russian text with Deep Learning AI
api_response = api_instance.language_translation_translate_eng_to_rus(input)
pprint(api_response)
except ApiException as e:
print("Exception when calling LanguageTranslationApi->language_translation_translate_eng_to_rus: %s\n" % e)

--

--

Cloudmersive

There’s an API for that. Cloudmersive is a leader in Highly Scalable Cloud APIs.