SaguiItay

My blog has moved!

You should be automatically redirected in 4 seconds. If not, visit:
http://itaysagui.wordpress.com
and update your bookmarks.

Friday, June 25, 2010

Microsoft Translator - Quick Start

After adding a Service Reference to the following URL http://api.microsofttranslator.com/v2/Soap.svc, You can easily translate text by following the sample below:

LanguageService service = new LanguageServiceClient();

string appId = ""; // Application ID required for using the Bing Web Service


// Get all available languages for translation
var langs = service.GetLanguagesForTranslate(appId);
foreach (var lang in langs)
    Console.WriteLine("Language: " + lang);

// We request up-to 5 french translations for the english work 'number'
var result = service.GetTranslations(appId, "number", "en", "fr", 5, null);
foreach (var tranlationMatch in result.Translations)
{
    // TranslatedText: The translated text
    Console.WriteLine("TranslatedText: " + tranlationMatch.TranslatedText);
    // MatchDegree: The system matches input sentences against the store, including inexact matches.
    // MatchDegree indicates how closely the input text matches the original text found in the store.
    // The value returned ranges from 0 to 100, where 0 is no similarity and 100 is an exact case sensitive match.
    Console.WriteLine("MatchDegree: " + tranlationMatch.MatchDegree);
    // Rating: Indicates the authority of the person making the quality decision. Machine Translation
    // results will have a rating of 5. Anonymously provided translations will generally have a rating of 1 to
    // 4, authoritatively provided translations will generally have a rating of 6 to 10.
    Console.WriteLine("Rating: " + tranlationMatch.Rating);
}

Labels: , ,

Sunday, May 25, 2008

SharePoint Lists: Grouping/Paging by first letter

A very interesting blog entry, Alphabetical Paging on a SharePoint List View, by Tom Clarkson, talks about grouping/paging items in a SharePoint list based on their first letter. If you are just looking for the formula needed to create a calculated column that contains the first letter of the item's Title, here it is:
=IF(ISNUMBER(VALUE(LEFT(Title,1))), "0", LEFT(Title,1))

Labels: , ,

Friday, May 23, 2008

TechEd 2008: Wait for me....

TechEd 2008 is coming fast, and this year, I'll attend the developers conference. Read more details on the TechEd Developers 2008, and if you're interested in meeting me, drop me a line. During the first week of June, I'll post details and photos of my whole experience in Orlando.

Labels: , ,