swagger: '2.0' info: version: 2020-08-01-preview title: Microsoft Azure AccessControlClient AccessConnector Dictionary API schemes: - https tags: - name: Dictionary paths: /dictionary/examples: post: operationId: microsoftAzureLookupdictionaryexamples summary: Microsoft Azure Lookup Dictionary Examples description: Lookup Dictionary Examples parameters: - name: X-ClientTraceId in: header description: A client-generated GUID to uniquely identify the request. required: false type: string x-ms-client-name: clientTraceId - name: from in: query description: 'Specifies the language of the input text. The source language must be one of the supported languages included in the dictionary scope.' required: true type: string - name: to in: query description: 'Specifies the language of the output text. The target language must be one of the supported languages included in the dictionary scope.' required: true type: string - name: api-version in: query description: Mandatory API version parameter required: true type: string x-ms-client-name: apiVersion - name: requestBody in: body description: Defines the content of the request required: true schema: type: array items: $ref: '#/definitions/DictionaryExampleTextItem' x-ms-identifiers: [] responses: '200': description: Response for the dictionary examples API. schema: type: array items: $ref: '#/definitions/DictionaryExampleItem' x-ms-identifiers: [] headers: X-RequestId: type: string description: Value generated by the service to identify the request. It is used for troubleshooting purposes. default: description: An unexpected error response. schema: $ref: '#/definitions/ErrorResponse' headers: X-RequestId: type: string description: Value generated by the service to identify the request. It is used for troubleshooting purposes. x-ms-examples: Lookup Dictionary Examples: $ref: ./examples/LookupDictionaryExamples_MaximumSet_Gen.json Lookup Dictionary Examples with minimum properties: $ref: ./examples/LookupDictionaryExamples_MinimumSet_Gen.json tags: - Dictionary /dictionary/lookup: post: operationId: microsoftAzureLookupdictionaryentries summary: Microsoft Azure Lookup Dictionary Entries description: Lookup Dictionary Entries parameters: - name: X-ClientTraceId in: header description: A client-generated GUID to uniquely identify the request. required: false type: string x-ms-client-name: clientTraceId - name: from in: query description: 'Specifies the language of the input text. The source language must be one of the supported languages included in the dictionary scope.' required: true type: string - name: to in: query description: 'Specifies the language of the output text. The target language must be one of the supported languages included in the dictionary scope.' required: true type: string - name: api-version in: query description: Mandatory API version parameter required: true type: string x-ms-client-name: apiVersion - name: requestBody in: body description: Defines the content of the request required: true schema: type: array items: $ref: '#/definitions/InputTextItem' x-ms-identifiers: [] responses: '200': description: Response for the dictionary lookup API. schema: type: array items: $ref: '#/definitions/DictionaryLookupItem' x-ms-identifiers: [] headers: X-RequestId: type: string description: Value generated by the service to identify the request. It is used for troubleshooting purposes. default: description: An unexpected error response. schema: $ref: '#/definitions/ErrorResponse' headers: X-RequestId: type: string description: Value generated by the service to identify the request. It is used for troubleshooting purposes. x-ms-examples: Lookup Dictionary Entries: $ref: ./examples/LookupDictionaryEntries_MaximumSet_Gen.json Lookup Dictionary Entries with minimum properties: $ref: ./examples/LookupDictionaryEntries_MinimumSet_Gen.json tags: - Dictionary definitions: DictionaryExample: type: object description: Dictionary Example properties: sourcePrefix: type: string description: 'The string to concatenate before the value of sourceTerm to form a complete example. Do not add a space character, since it is already there when it should be. This value may be an empty string.' sourceTerm: type: string description: 'A string equal to the actual term looked up. The string is added with sourcePrefix and sourceSuffix to form the complete example. Its value is separated so it can be marked in a user interface, e.g., by bolding it.' sourceSuffix: type: string description: 'The string to concatenate after the value of sourceTerm to form a complete example. Do not add a space character, since it is already there when it should be. This value may be an empty string.' targetPrefix: type: string description: A string similar to sourcePrefix but for the target. targetTerm: type: string description: A string similar to sourceTerm but for the target. targetSuffix: type: string description: A string similar to sourceSuffix but for the target. required: - sourcePrefix - sourceTerm - sourceSuffix - targetPrefix - targetTerm - targetSuffix ErrorResponse: type: object description: Representation of the Error Response from Translator Service. properties: error: $ref: '#/definitions/ErrorDetails' description: Error details. required: - error DictionaryTranslation: type: object description: Translation source term. properties: normalizedTarget: type: string description: 'A string giving the normalized form of this term in the target language. This value should be used as input to lookup examples.' displayTarget: type: string description: '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".' posTag: type: string description: A string associating this term with a part-of-speech tag. confidence: type: number format: float description: "A value between 0.0 and 1.0 which represents the \"confidence\" \n(or perhaps more accurately, \"probability in the training data\") of that translation pair. \nThe sum of confidence scores for one source word may or may not sum to 1.0." prefixWord: type: string description: "A string giving the word to display as a prefix of the translation. Currently,\nthis is the gendered determiner of nouns, in languages that have gendered determiners.\nFor example, the prefix of the Spanish word \"mosca\" is \"la\", since \"mosca\" is a feminine noun in Spanish. \nThis is only dependent on the translation, and not on the source. \nIf there is no prefix, it will be the empty string." backTranslations: type: array description: '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.' items: $ref: '#/definitions/BackTranslation' x-ms-identifiers: [] required: - normalizedTarget - displayTarget - posTag - confidence - prefixWord - backTranslations BackTranslation: type: object description: Back Translation properties: normalizedText: type: string description: '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.' displayText: type: string description: 'A string giving the source term that is a back-translation of the target in a form best suited for end-user display.' numExamples: type: integer format: int32 description: '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.' frequencyCount: type: integer format: int32 description: '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.' required: - normalizedText - displayText - numExamples - frequencyCount ErrorDetails: type: object description: Error details as returned by Translator Service. properties: code: type: integer format: int32 description: Number identifier of the error. message: type: string description: Human readable error description. required: - code - message DictionaryLookupItem: type: object description: Dictionary Lookup Element properties: normalizedSource: type: string description: '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.' displaySource: type: string description: '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".' translations: type: array description: A list of translations for the source term. items: $ref: '#/definitions/DictionaryTranslation' x-ms-identifiers: [] required: - normalizedSource - displaySource - translations InputTextItem: type: object description: Element containing the text for translation. properties: text: type: string description: Text to translate. required: - text DictionaryExampleItem: type: object description: Dictionary Example element properties: normalizedSource: type: string description: 'A string giving the normalized form of the source term. Generally, this should be identical to the value of the Text field at the matching list index in the body of the request.' normalizedTarget: type: string description: 'A string giving the normalized form of the target term. Generally, this should be identical to the value of the Translation field at the matching list index in the body of the request.' examples: type: array description: A list of examples for the (source term, target term) pair. items: $ref: '#/definitions/DictionaryExample' x-ms-identifiers: [] required: - normalizedSource - normalizedTarget - examples DictionaryExampleTextItem: type: object description: Element containing the text with translation. properties: translation: type: string description: "A string specifying the translated text previously returned by the Dictionary lookup operation. \nThis should be the value from the normalizedTarget field in the translations list of the Dictionary \nlookup response. The service will return examples for the specific source-target word-pair." required: - translation allOf: - $ref: '#/definitions/InputTextItem' x-ms-parameterized-host: hostTemplate: '{endpoint}' useSchemePrefix: false parameters: - $ref: '#/parameters/Endpoint'