swagger: '2.0' info: version: 2020-08-01-preview title: Microsoft Azure AccessControlClient AccessConnector keyPhrases API schemes: - https tags: - name: keyPhrases paths: /keyPhrases: post: summary: Microsoft Azure Key Phrases description: The API returns a list of strings denoting the key phrases in the input text. See the Supported languages in Text Analytics API for the list of enabled languages. operationId: microsoftAzureKeyphrases consumes: - application/json - text/json produces: - application/json - text/json parameters: - $ref: '#/parameters/ModelVersion' - $ref: '#/parameters/ShowStats' - $ref: '#/parameters/MultiLanguageInput' responses: '200': description: A successful response results in 0 or more key phrases identified in each valid document schema: $ref: '#/definitions/KeyPhraseResult' '400': description: Bad Request. schema: $ref: '#/definitions/ErrorResponse' x-ms-error-response: true '500': description: Internal error response schema: $ref: '#/definitions/ErrorResponse' x-ms-error-response: true x-ms-examples: Successful Key Phrase request: $ref: .//examples//SuccessfulKeyPhrasesRequest.json deprecated: false tags: - keyPhrases definitions: ErrorResponse: type: object required: - error properties: error: type: object description: Document Error. $ref: '#/definitions/TextAnalyticsError' MultiLanguageBatchInput: type: object required: - documents properties: documents: type: array description: The set of documents to process as part of this batch. items: $ref: '#/definitions/MultiLanguageInput' description: Contains a set of input documents to be analyzed by the service. KeyPhraseResult: type: object required: - documents - errors - modelVersion properties: documents: type: array description: Response by document items: $ref: '#/definitions/DocumentKeyPhrases' errors: type: array description: Errors by document id. items: $ref: '#/definitions/DocumentError' statistics: $ref: '#/definitions/RequestStatistics' modelVersion: type: string description: This field indicates which model is used for scoring. MultiLanguageInput: type: object required: - id - text properties: id: type: string description: A unique, non-empty document identifier. text: type: string description: The input text to process. language: type: string description: (Optional) This is the 2 letter ISO 639-1 representation of a language. For example, use "en" for English; "es" for Spanish etc. If not set, use "en" for English as default. description: Contains an input document to be analyzed by the service. RequestStatistics: type: object required: - documentsCount - validDocumentsCount - erroneousDocumentsCount - transactionsCount properties: documentsCount: type: integer format: int32 description: Number of documents submitted in the request. validDocumentsCount: type: integer format: int32 description: Number of valid documents. This excludes empty, over-size limit or non-supported languages documents. erroneousDocumentsCount: type: integer format: int32 description: Number of invalid documents. This includes empty, over-size limit or non-supported languages documents. transactionsCount: type: integer format: int64 description: Number of transactions for the request. description: if showStats=true was specified in the request this field will contain information about the request payload. TextAnalyticsWarning: type: object required: - code - message properties: code: type: string enum: - LongWordsInDocument - DocumentTruncated x-ms-enum: name: WarningCodeValue modelAsString: true description: Error code. message: type: string description: Warning message. targetRef: type: string description: A JSON pointer reference indicating the target object. InnerError: type: object required: - code - message properties: code: type: string enum: - InvalidParameterValue - InvalidRequestBodyFormat - EmptyRequest - MissingInputRecords - InvalidDocument - ModelVersionIncorrect - InvalidDocumentBatch - UnsupportedLanguageCode - InvalidCountryHint x-ms-enum: name: InnerErrorCodeValue modelAsString: true description: Error code. message: type: string description: Error message. details: type: object additionalProperties: type: string description: Error details. target: type: string description: Error target. innererror: $ref: '#/definitions/InnerError' description: Inner error contains more specific information. DocumentError: type: object required: - id - error properties: id: type: string description: Document Id. error: type: object description: Document Error. $ref: '#/definitions/TextAnalyticsError' DocumentKeyPhrases: type: object required: - id - keyPhrases - warnings properties: id: type: string description: Unique, non-empty document identifier. keyPhrases: type: array description: A list of representative words or phrases. The number of key phrases returned is proportional to the number of words in the input document. items: type: string warnings: type: array description: Warnings encountered while processing document. items: $ref: '#/definitions/TextAnalyticsWarning' statistics: description: if showStats=true was specified in the request this field will contain information about the document payload. $ref: '#/definitions/DocumentStatistics' DocumentStatistics: type: object required: - charactersCount - transactionsCount properties: charactersCount: type: integer format: int32 description: Number of text elements recognized in the document. transactionsCount: type: integer format: int32 description: Number of transactions for the document. description: if showStats=true was specified in the request this field will contain information about the document payload. TextAnalyticsError: type: object required: - code - message properties: code: type: string enum: - InvalidRequest - InvalidArgument - InternalServerError - ServiceUnavailable - NotFound x-ms-enum: name: ErrorCodeValue modelAsString: false description: Error code. message: type: string description: Error message. target: type: string description: Error target. innererror: $ref: '#/definitions/InnerError' description: Inner error contains more specific information. details: type: array description: Details about specific errors that led to this reported error. items: $ref: '#/definitions/TextAnalyticsError' parameters: ModelVersion: name: model-version in: query description: '(Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. ' type: string required: false x-ms-parameter-location: method MultiLanguageInput: in: body name: input description: Collection of documents to analyze. required: true schema: $ref: '#/definitions/MultiLanguageBatchInput' x-ms-parameter-location: method ShowStats: name: showStats in: query description: (Optional) if set to true, response will contain request and document level statistics. type: boolean required: false x-ms-parameter-location: method x-ms-parameterized-host: hostTemplate: '{endpoint}' useSchemePrefix: false parameters: - $ref: '#/parameters/Endpoint'