How to translate English to French Text in C# .Net Framework using Deep Learning AI

After a great many advances in recent years, Deep Learning AI has reached a point where its translation accuracy has begun to rival that of human translators. As good as this sounds, there is a drawback: Deep Learning requires a large time and resource investment to get started. In particular, the training needs at least a week to complete, even on bleeding edge GPUs. If you would rather get those same results immediately and without all of the trouble that goes into setting up those training regimens, then I have the solution for you. We will be using an API that already has the fully trained AI that we need.

To start, we install our client using this command for NuGet’s console:

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

Now we just need to call LanguageTranslationTranslateEngToFra and input our string.

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 LanguageTranslationTranslateEngToFraExample{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 French text with Deep Learning AILanguageTranslationResponse result = apiInstance.LanguageTranslationTranslateEngToFra(input);Debug.WriteLine(result);}catch (Exception e){Debug.Print("Exception when calling LanguageTranslationApi.LanguageTranslationTranslateEngToFra: " + e.Message );}}}}

And that’s all that you have to do! You now have an advanced AI at your beck and call.

Image for post

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

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store