swagger: '2.0' info: version: 2020-08-01-preview title: Microsoft Azure AccessControlClient AccessConnector Dictionary/Lookup API schemes: - https tags: - name: Dictionary/Lookup paths: /Dictionary/Lookup: post: description: Provides alternative translations for a word and a small number of idiomatic phrases. Each translation has a `part-of-speech` and a list of `back-translations`. The back-translations enable a user to understand the translation in context. The Dictionary Example operation allows further drill down to see example uses of each translation pair.
tags: - Dictionary/Lookup operationId: microsoftAzureTranslatorDictionarylookup consumes: - application/json produces: - application/json parameters: - $ref: '#/parameters/ApiVersion' - name: from description: Specifies the language of the input text. The source language must be one of the supported languages included in the `dictionary` scope. in: query required: true type: string - name: to description: Specifies the language of the output text. The target language must be one of the supported languages included in the `dictionary` scope of the Languages resource. in: query required: true type: string - name: X-ClientTraceId description: A client-generated GUID to uniquely identify the request. Note that you can omit this header if you include the trace ID in the query string using a query parameter named ClientTraceId. in: header required: false type: string - 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 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: type: array items: $ref: '#/definitions/DictionaryLookupTextInput' responses: '200': description: Success schema: $ref: '#/definitions/DictionaryLookupResult' default: description: Error response. schema: $ref: '#/definitions/ErrorMessage' x-ms-examples: DictionaryLookup success example: $ref: ./examples/dictionaryLookupSuccess.json deprecated: false summary: Microsoft Azure Post Dictionary Lookup definitions: ErrorMessage: type: object properties: error: type: object properties: code: type: string message: type: string DictionaryLookupResult: type: array description: Example of a successful dictionary lookup request items: type: object properties: normalizedSource: type: string displaySource: type: string translations: type: array items: type: object properties: normalizedTarget: type: string displayTarget: type: string posTag: type: string confidence: type: number prefixWord: type: string backTranslations: type: array items: type: object properties: normalizedText: type: string displayText: type: string numExamples: type: integer frequencyCount: type: integer DictionaryLookupTextInput: type: object description: 'Text needed for a dictionary lookup request ' properties: text: type: string maximum: 100 example: text: Bug parameters: ApiVersion: name: api-version description: Version of the API requested by the client. Value must be **3.0**. in: query required: true type: string default: '3.0' x-ms-parameterized-host: hostTemplate: '{endpoint}' useSchemePrefix: false parameters: - $ref: '#/parameters/Endpoint'