How to translate English to Russian Text in C# .NET Framework using Deep Learning AI

Cloudmersive
2 min readJul 20, 2020

--

You may have heard of the recent advances in Deep Learning that have allowed machine learned AIs to perform human-level translations with high accuracy. You may also know that this tech is locked behind a week-long wall of GPU training, which you probably don’t have time for. And that is exactly the purpose of this tutorial we have for you today. We will be setting up an English to Russian translation system in just a few minutes with help from an API.

First we will need our client, so grab that from NuGet with this command for the package manager console:

Install-Package Cloudmersive.APIClient.NET.NLP -Version 4.0.9

Now we can call our translation funciton:

using System;using System.Diagnostics;using Cloudmersive.APIClient.NET.NLP.Api;using Cloudmersive.APIClient.NET.NLP.Client;using Cloudmersive.APIClient.NET.NLP.Model;namespace Example{public class LanguageTranslationTranslateEngToRusExample{public void main(){// Configure API key authorization: ApikeyConfiguration.Default.AddApiKey("Apikey", "YOUR_API_KEY");// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed// Configuration.Default.AddApiKeyPrefix("Apikey", "Bearer");var apiInstance = new LanguageTranslationApi();var input = new LanguageTranslationRequest(); // LanguageTranslationRequest | Input translation requesttry{// Translate English to Russian text with Deep Learning AILanguageTranslationResponse result = apiInstance.LanguageTranslationTranslateEngToRus(input);Debug.WriteLine(result);}catch (Exception e){Debug.Print("Exception when calling LanguageTranslationApi.LanguageTranslationTranslateEngToRus: " + e.Message );}}}}

Finished!

--

--

Cloudmersive
Cloudmersive

Written by Cloudmersive

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

No responses yet