AzureCognitiveServicesTranslationService class
Translator based on Azure Cognitive Services API Azure Cognitive Services API Documentation: https://docs.microsoft.com/en-us/azure/cognitive-services/translator/quickstart-translator?tabs=csharp
- Inheritance
-
- Object
- AbstractTranslationService
- AzureCognitiveServicesTranslationService
- Mixed-in types
Constructors
- AzureCognitiveServicesTranslationService.new({required String subscriptionKey, String? region, required Logger logger})
-
subscriptionKey
- Azure Subscription Key, read mode here: https://docs.microsoft.com/en-us/azure/cognitive-services/authentication?tabs=powershellregion
- Azure Subscription Region, read more here: https://docs.microsoft.com/en-us/azure/cognitive-services/authentication?tabs=powershell
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
translate(
String source, LanguageCode sourceLanguage, LanguageCode target) → Future< String> -
Translates given text to specified language
source
- text which should be translatedsourceLanguage
- the language in whichsource
was giventarget
- language to whichsource
should be translatedoverride -
translateBulk(
List< String> sources, LanguageCode sourceLanguage, List<LanguageCode> targets) → Future<List< Translation> > -
Translates given texts to specified languages
sources
- list of texts which should be translatedsourceLanguage
- the language in whichsources
were giventargets
- list of languages to whichsources
should be translatedoverride -
translateBulkToSingleTarget(
List< String> sources, LanguageCode sourceLanguage, LanguageCode target) → Future<List< String> > -
Translates given texts to specified language
sources
- list of text which should be translatedsourceLanguage
- the language in whichsources
were giventarget
- language to whichsources
should be translatedoverride -
translateToTargetsList(
String source, LanguageCode sourceLanguage, List< LanguageCode> targets) → Future<Translation> -
Translates given text to specified languages
source
- text which should be translatedsourceLanguage
- the language in whichsource
was giventargets
- list of languages to whichsource
should be translatedoverride
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited