Friday, February 10, 2012

Walking through learning how to use Microsoft Translator via a console app

Visual Studio Gallery - Walkthrough: Microsoft Translator in a C# Console Application

"This sample explains how to use the Microsoft Translator API through the Windows Azure Marketplace by creating a sample application which takes an input string and translates it from the detected source language to a random output language.

...

Having seen some of the cool projects people have been doing with the Microsoft Translator API I decided to write a small app and learn how the APIs work. Since this is a learning exercise, I wanted something that’s very simple and yet powerful enough to exercise all of the key features in the API. The Console application I came up with takes a string as a command-line argument. It firsts asks the service what language the string was written in. Next, it asks for the list of all supported languages and chooses one at random. Finally, it gets the string translated from the source language to the randomly selected target language. You put a string in and get a random translation of that string out. The design is simple, so let’s look at the implementation!

1. Getting Ready to Code

2. Preparing the Development Environment

3. Determine the Language of the Input String

4. Get a List of All Supported Languages

5. Translate the String to the Randomly Selected Languages

6. Result

image

..."

I thought this a great walkthrough for using the Microsoft Translator service, where being in a console app lets you focus on the lesson at hand (and not the plumbing)

No comments:

Post a Comment

NOTE: Anonymous Commenting has been turned off for a while... The comment spammers are just killing me...

ALL comments are moderated. I will review every comment before it will appear on the blog.

Your comment WILL NOT APPEAR UNTIL I approve it. This may take some hours...

I reserve, and will use, the right to not approve ANY comment for ANY reason. I will not usually, but if it's off topic, spam (or even close to spam-like), inflammatory, mean, etc, etc, well... then...

Please see my comment policy for more information if you are interested.

Thanks,
Greg

PS. I am proactively moderating comments. Your comment WILL NOT APPEAR UNTIL I approve it. This may take some hours...