共用方式為


TranslationRecognitionResult Class

public class TranslationRecognitionResult
extends RecognitionResult

Defines translation recognition result.

Constructor Summary

Constructor Description
TranslationRecognitionResult(long result)

Internal constructor for creating a TranslationRecognitionResult from a native handle.

Method Summary

Modifier and Type Method and Description
final java.util.Map<java.lang.String,java.lang.String> getTranslations()

Presents the translation results.

java.lang.String toString()

Returns a String that represents the translation recognition result.

Methods inherited from RecognitionResult

Methods inherited from java.lang.Object

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.toString java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

Constructor Details

TranslationRecognitionResult

public TranslationRecognitionResult(long result)

Internal constructor for creating a TranslationRecognitionResult from a native handle.

Parameters:

Method Details

getTranslations

public final Map getTranslations()

Presents the translation results. Each item in the dictionary represents translation result in one of target languages, where the key is the name of the target language, in BCP-47 format, and the value is the translation text in the specified language.

Returns:

the current translation map.

toString

public String toString()

Returns a String that represents the translation recognition result.

Overrides:

TranslationRecognitionResult.toString()

Returns:

A String that represents the translation recognition result.

Applies to