Class DictionaryTranslation
java.lang.Object
com.azure.ai.translation.text.models.DictionaryTranslation
Translation source term.
-
Method Summary
Modifier and TypeMethodDescriptionGet the backTranslations property: A list of "back translations" of the target.double
Get the confidence property: A value between 0.0 and 1.0 which represents the "confidence" (or perhaps more accurately, "probability in the training data") of that translation pair.Get the displayTarget property: A string giving the term in the target language and in a form best suited for end-user display.Get the normalizedTarget property: A string giving the normalized form of this term in the target language.Get the posTag property: A string associating this term with a part-of-speech tag.Get the prefixWord property: A string giving the word to display as a prefix of the translation.
-
Method Details
-
getNormalizedTarget
Get the normalizedTarget property: A string giving the normalized form of this term in the target language. This value should be used as input to lookup examples.- Returns:
- the normalizedTarget value.
-
getDisplayTarget
Get the displayTarget property: A string giving the term in the target language and in a form best suited for end-user display. Generally, this will only differ from the normalizedTarget in terms of capitalization. For example, a proper noun like "Juan" will have normalizedTarget = "juan" and displayTarget = "Juan".- Returns:
- the displayTarget value.
-
getPosTag
Get the posTag property: A string associating this term with a part-of-speech tag.- Returns:
- the posTag value.
-
getConfidence
public double getConfidence()Get the confidence property: A value between 0.0 and 1.0 which represents the "confidence" (or perhaps more accurately, "probability in the training data") of that translation pair. The sum of confidence scores for one source word may or may not sum to 1.0.- Returns:
- the confidence value.
-
getPrefixWord
Get the prefixWord property: A string giving the word to display as a prefix of the translation. Currently, this is the gendered determiner of nouns, in languages that have gendered determiners. For example, the prefix of the Spanish word "mosca" is "la", since "mosca" is a feminine noun in Spanish. This is only dependent on the translation, and not on the source. If there is no prefix, it will be the empty string.- Returns:
- the prefixWord value.
-
getBackTranslations
Get the backTranslations property: A list of "back translations" of the target. For example, source words that the target can translate to. The list is guaranteed to contain the source word that was requested (e.g., if the source word being looked up is "fly", then it is guaranteed that "fly" will be in the backTranslations list). However, it is not guaranteed to be in the first position, and often will not be.- Returns:
- the backTranslations value.
-