Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@
},
{
"name": "text",
"description": "# Request Body\nThe body of the request is a JSON array. Each array element is a JSON object with a string property named `Text`, which represents the term to lookup.\nThe following limitations apply:\n* The array can have at most 10 elements.\n* The text value of an array element cannot exceed 100 characters including spaces.\n\n# Response Body\nA successful response is a JSON array with one result for each string in the input array. A result object includes the following properties:\n* `normalizedSource`- A string giving the normalized form of the source term. For example, if the request is \"JOHN\", the normalized form will be \"john\". The content of this field becomes the input to lookup examples.\n* `displaySource`- A string giving the source term in a form best suited for end-user display. For example, if the input is \"JOHN\", the display form will reflect the usual spelling of the name- \"John\".\n* `translations`- A list of translations for the source term. Each element of the list is an object with the following properties:\n * `normalizedTarget`- A string giving the normalized form of this term in the target language. This value should be used as input to lookup examples.\n * `displayTarget`- 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\"`.\n * `posTag`- A string associating this term with a part-of-speech tag.\n \n | Tag name | Description |\n | --------- | ---------------- |\n | ADJ | Adjectives |\n | ADV | Adverbs |\n | CONJ | Conjunctions |\n | DET | Determiners |\n | MODAL | Verbs |\n | NOUN | Nouns |\n | PREP | Prepositions |\n | PRON | Pronouns |\n | VERB | Verbs |\n | OTHER | Other |\n \n As an implementation note, these tags were determined by part-of-speech tagging the English side, and then taking the most frequent tag for each source/target pair. So if people frequently translate a Spanish word to a different part-of-speech tag in English, tags may end up being wrong (with respect to the Spanish word).\n * `confidence`- 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.\n * `prefixWord-` A string giving the 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.\n * `backTranslations-` 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. Each element of the `backTranslations` list is an object described by the following properties-\n * `normalizedText-` A string giving the normalized form of the source term that is a back-translation of the target. This value should be used as input to lookup examples.\n * `displayText-` A string giving the source term that is a back-translation of the target in a form best suited for end-user display.\n * `numExamples-` An integer representing the number of examples that are available for this translation pair. Actual examples must be retrieved with a separate call to lookup examples. The number is mostly intended to facilitate display in a UX. For example, a user interface may add a hyperlink to the back-translation if the number of examples is greater than zero and show the back-translation as plain text if there are no examples. Note that the actual number of examples returned by a call to lookup examples may be less than `numExamples`, because additional filtering may be applied on the fly to remove \"bad\" examples.\n * `frequencyCount-` An integer representing the frequency of this translation pair in the data. The main purpose of this field is to provide a user interface with a means to sort back-translations so the most frequent terms are first.\n \nNote - If the term being looked up does not exist in the dictionary, the response is 200 (OK) but the `translations` list is an empty list.\n \n# Response Header\nX-RequestId - Value generated by the service to identify the request. It is used for troubleshooting purposes.\n",
"description": "# Request Body\nThe body of the request is a JSON array. Each array element is a JSON object with a string property named `Text`, which represents the term to lookup.\nThe following limitations apply:\n* The array can have at most 10 elements.\n* The text value of an array element cannot exceed 100 characters including spaces.\n\n# Response Body\nA successful response is a JSON array with one result for each string in the input array. A result object includes the following properties:\n* `normalizedSource`- A string giving the normalized form of the source term. For example, if the request is \"JOHN\", the normalized form will be \"john\". The content of this field becomes the input to lookup examples.\n* `displaySource`- A string giving the source term in a form best suited for end-user display. For example, if the input is \"JOHN\", the display form will reflect the usual spelling of the name- \"John\".\n* `translations`- A list of translations for the source term. Each element of the list is an object with the following properties:\n * `normalizedTarget`- A string giving the normalized form of this term in the target language. This value should be used as input to lookup examples.\n * `displayTarget`- 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\"`.\n * `posTag`- A string associating this term with a part-of-speech tag.\n \n | Tag name | Description |\n | --------- | ---------------- |\n | ADJ | Adjectives |\n | ADV | Adverbs |\n | CONJ | Conjunctions |\n | DET | Determiners |\n | MODAL | Verbs |\n | NOUN | Nouns |\n | PREP | Prepositions |\n | PRON | Pronouns |\n | VERB | Verbs |\n | OTHER | Other |\n \n As an implementation note, these tags were determined by part-of-speech tagging the English side, and then taking the most frequent tag for each source/target pair. So if people frequently translate a Spanish word to a different part-of-speech tag in English, tags may end up being wrong (with respect to the Spanish word).\n * `confidence`- 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.\n * `prefixWord-` 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.\n * `backTranslations-` 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. Each element of the `backTranslations` list is an object described by the following properties-\n * `normalizedText-` A string giving the normalized form of the source term that is a back-translation of the target. This value should be used as input to lookup examples.\n * `displayText-` A string giving the source term that is a back-translation of the target in a form best suited for end-user display.\n * `numExamples-` An integer representing the number of examples that are available for this translation pair. Actual examples must be retrieved with a separate call to lookup examples. The number is mostly intended to facilitate display in a UX. For example, a user interface may add a hyperlink to the back-translation if the number of examples is greater than zero and show the back-translation as plain text if there are no examples. Note that the actual number of examples returned by a call to lookup examples may be less than `numExamples`, because additional filtering may be applied on the fly to remove \"bad\" examples.\n * `frequencyCount-` An integer representing the frequency of this translation pair in the data. The main purpose of this field is to provide a user interface with a means to sort back-translations so the most frequent terms are first.\n \nNote - If the term being looked up does not exist in the dictionary, the response is 200 (OK) but the `translations` list is an empty list.\n \n# Response Header\nX-RequestId - Value generated by the service to identify the request. It is used for troubleshooting purposes.\n",
"in": "body",
"required": true,
"schema": {
Expand Down Expand Up @@ -519,7 +519,7 @@
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/TranslateTextInput"
"$ref": "#/definitions/TranslateTextInput"
}
}
}
Expand Down Expand Up @@ -628,7 +628,7 @@
}
},
"definitions": {

"LanguagesResult": {
"type": "object",
"description": "Example of a successful languages request",
Expand Down Expand Up @@ -871,7 +871,7 @@
}
}
},

"TranslateResultAll": {
"type": "array",
"description": "Example of a successful translate request, including all optional parameters.",
Expand All @@ -898,7 +898,7 @@
"type": "string"
},
"transliteration": {
"type": "object",
"type": "object",
"properties": {
"text": {
"type": "string"
Expand Down Expand Up @@ -950,7 +950,7 @@
}
}
},

"BreakSentenceResult": {
"type": "array",
"description": "Example of a successful break sentence request",
Expand Down