Skip to content

Latest commit

 

History

History
22 lines (19 loc) · 2.93 KB

README.md

File metadata and controls

22 lines (19 loc) · 2.93 KB

Text Translation Examples

These samples demonstrate the use of the following methods in the Text Translation API:

Name Description
Microsoft.Translator.AddTranslation Method Adds a translation to the translation memory.
Microsoft.Translator.AddTranslationArray Method Adds an array of translations to the translation memory
Microsoft.Translator.BreakSentences Method Returns an array of sentence lengths for each sentence of the given text.
Microsoft.Translator.Detect Method Detects the language of a selection of text.
Microsoft.Translator.DetectArray Method Detects the language of an array of strings.
Microsoft.Translator.GetLanguageNames Method Obtains a list of the languages supported by the Translator Service.
Microsoft.Translator.GetLanguagesForSpeak Method Obtains a list of the language codes supported by the Translator Service for speech synthesis.
Microsoft.Translator.GetLanguagesForTranslate Method Obtains a list of the language codes supported by the Translator Service.
Microsoft.Translator.GetTranslations Method Returns an array of alternative translations of the given text.
Microsoft.Translator.GetTranslationsArray Method Returns an array of alternative translations of the passed array of text.
Microsoft.Translator.Speak Method Returns a string with a URL to a wave stream of the passed in text in desired language.
Microsoft.Translator.TransformText Method Transforms the input text into a normalized form. The function currently works only with English input.
Microsoft.Translator.Translate Method Converts a text string from one language to another.
Microsoft.Translator.TranslateArray Method Translates an array of texts into another language.

Running the samples requires a subscription with Microsoft Translator Text Translation API, which is part of Microsoft Azure Cognitive Services. Visit the Text Translation API documentation page to get started.