From 11cb5c629a836dc99454d85c233405f952b555d8 Mon Sep 17 00:00:00 2001 From: korosensei Date: Wed, 20 Oct 2021 18:19:21 +0200 Subject: [PATCH] Add text analytics v3.2-preview.2 API (#15736) * Add text analytics v3.2-preview.2 API * CR comments * Make project and deployment names required parameters * Fix projectName and deploymentName Rename projectName and deploymentName in input to project-name and deployment-name Co-authored-by: Omar Elhariry Co-authored-by: Kareem Yousef --- .../preview/v3.2-preview.2/TextAnalytics.json | 3477 +++++++++++++++++ .../examples/SuccessfulAnalyzeRequest.json | 41 + .../SuccessfulAnalyzeStatusRequest.json | 91 + .../examples/SuccessfulEntitiesRequest.json | 73 + .../SuccessfulEntityLinkingRequest.json | 119 + .../examples/SuccessfulEntityPIIRequest.json | 79 + .../SuccessfulHealthDeleteRequest.json | 15 + .../examples/SuccessfulHealthRequest.json | 24 + .../SuccessfulHealthStatusRequest.json | 206 + .../examples/SuccessfulKeyPhrasesRequest.json | 62 + .../examples/SuccessfulLanguagesRequest.json | 61 + .../examples/SuccessfulSentimentRequest.json | 139 + .../data-plane/TextAnalytics/readme.md | 8 + 13 files changed, 4395 insertions(+) create mode 100644 specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.2-preview.2/TextAnalytics.json create mode 100644 specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.2-preview.2/examples/SuccessfulAnalyzeRequest.json create mode 100644 specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.2-preview.2/examples/SuccessfulAnalyzeStatusRequest.json create mode 100644 specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.2-preview.2/examples/SuccessfulEntitiesRequest.json create mode 100644 specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.2-preview.2/examples/SuccessfulEntityLinkingRequest.json create mode 100644 specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.2-preview.2/examples/SuccessfulEntityPIIRequest.json create mode 100644 specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.2-preview.2/examples/SuccessfulHealthDeleteRequest.json create mode 100644 specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.2-preview.2/examples/SuccessfulHealthRequest.json create mode 100644 specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.2-preview.2/examples/SuccessfulHealthStatusRequest.json create mode 100644 specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.2-preview.2/examples/SuccessfulKeyPhrasesRequest.json create mode 100644 specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.2-preview.2/examples/SuccessfulLanguagesRequest.json create mode 100644 specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.2-preview.2/examples/SuccessfulSentimentRequest.json diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.2-preview.2/TextAnalytics.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.2-preview.2/TextAnalytics.json new file mode 100644 index 000000000000..8f3f4c1bfc27 --- /dev/null +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.2-preview.2/TextAnalytics.json @@ -0,0 +1,3477 @@ +{ + "swagger": "2.0", + "info": { + "version": "v3.2-preview.2", + "contact": { + "name": "Microsoft Cognitive Services", + "url": "https://azure.microsoft.com/en-us/services/cognitive-services/text-analytics/", + "email": "mlapi@microsoft.com" + }, + "title": "Text Analytics Client", + "description": "The Text Analytics API is a suite of natural language processing (NLP) services built with best-in-class Microsoft machine learning algorithms. The API can be used to analyze unstructured text for tasks such as sentiment analysis, key phrase extraction and language detection. Functionality for analysis of text specific to the healthcare domain and personal information are also available in the API. Further documentation can be found in https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/overview" + }, + "securityDefinitions": { + "apim_key": { + "type": "apiKey", + "name": "Ocp-Apim-Subscription-Key", + "in": "header" + } + }, + "security": [ + { + "apim_key": [] + } + ], + "x-ms-parameterized-host": { + "hostTemplate": "{Endpoint}/text/analytics/{ApiVersion}", + "useSchemePrefix": false, + "parameters": [ + { + "$ref": "#/parameters/Endpoint" + }, + { + "$ref": "#/parameters/ApiVersion" + } + ] + }, + "paths": { + "/analyze": { + "post": { + "consumes": [ + "application/json", + "text/json" + ], + "produces": [ + "application/json", + "text/json" + ], + "description": "Submit a collection of text documents for analysis. Specify one or more unique tasks to be executed.", + "operationId": "Analyze", + "summary": "Submit analysis job", + "parameters": [ + { + "description": "Collection of documents to analyze and tasks to execute.", + "in": "body", + "name": "body", + "schema": { + "$ref": "#/definitions/AnalyzeBatchInput" + } + } + ], + "responses": { + "202": { + "description": "A successful call results with an Operation-Location header used to check the status of the analysis job.", + "headers": { + "Operation-Location": { + "type": "string" + } + } + }, + "default": { + "description": "Unexpected error", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Successful Submit analysis job request": { + "$ref": ".//examples//SuccessfulAnalyzeRequest.json" + } + }, + "deprecated": false, + "x-ms-long-running-operation": true + } + }, + "/analyze/jobs/{jobId}": { + "get": { + "produces": [ + "application/json", + "text/json" + ], + "description": "Get the status of an analysis job. A job may consist of one or more tasks. Once all tasks are completed, the job will transition to the completed state and results will be available for each task.", + "operationId": "AnalyzeStatus", + "summary": "Get analysis status and results", + "parameters": [ + { + "$ref": "#/parameters/AnalyzeJobId" + }, + { + "$ref": "#/parameters/ShowStats" + }, + { + "default": 20, + "description": "(Optional) Set the maximum number of results per task. When both $top and $skip are specified, $skip is applied first.", + "in": "query", + "maximum": 50, + "minimum": 1, + "name": "$top", + "type": "integer" + }, + { + "default": 0, + "description": "(Optional) Set the number of elements to offset in the response. When both $top and $skip are specified, $skip is applied first.", + "in": "query", + "minimum": 0, + "name": "$skip", + "type": "integer" + } + ], + "responses": { + "200": { + "description": "Analysis job status and metadata.", + "schema": { + "$ref": "#/definitions/AnalyzeJobState" + } + }, + "default": { + "description": "Unexpected error", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Successful Get Analysis job status request": { + "$ref": ".//examples//SuccessfulAnalyzeStatusRequest.json" + } + }, + "deprecated": false + } + }, + "/entities/health/jobs/{jobId}": { + "get": { + "produces": [ + "application/json", + "text/json" + ], + "description": "Get details of the healthcare prediction job specified by the jobId.", + "operationId": "HealthStatus", + "summary": "Get healthcare analysis job status and results", + "parameters": [ + { + "$ref": "#/parameters/JobId" + }, + { + "default": 20, + "description": "(Optional) Set the maximum number of results per task. When both $top and $skip are specified, $skip is applied first.", + "in": "query", + "maximum": 50, + "minimum": 1, + "name": "$top", + "type": "integer" + }, + { + "default": 0, + "description": "(Optional) Set the number of elements to offset in the response. When both $top and $skip are specified, $skip is applied first.", + "in": "query", + "minimum": 0, + "name": "$skip", + "type": "integer" + }, + { + "$ref": "#/parameters/ShowStats" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/HealthcareJobState" + } + }, + "default": { + "description": "Unexpected error", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Successful Health request": { + "$ref": ".//examples//SuccessfulHealthStatusRequest.json" + } + }, + "deprecated": false + }, + "delete": { + "produces": [ + "application/json", + "text/json" + ], + "description": "Cancel healthcare prediction job.", + "operationId": "CancelHealthJob", + "summary": "Cancel healthcare prediction job", + "parameters": [ + { + "$ref": "#/parameters/JobId" + } + ], + "responses": { + "202": { + "description": "Cancel Job request has been received.", + "headers": { + "Operation-Location": { + "type": "string" + } + } + }, + "default": { + "description": "Unexpected error", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Successful Health request": { + "$ref": ".//examples//SuccessfulHealthDeleteRequest.json" + } + }, + "deprecated": false, + "x-ms-long-running-operation": true + } + }, + "/entities/health/jobs": { + "post": { + "summary": "Submit healthcare analysis job", + "description": "Start a healthcare analysis job to recognize healthcare related entities (drugs, conditions, symptoms, etc) and their relations.", + "operationId": "Health", + "consumes": [ + "application/json", + "text/json" + ], + "produces": [ + "application/json", + "text/json" + ], + "parameters": [ + { + "$ref": "#/parameters/ModelVersion" + }, + { + "$ref": "#/parameters/StringIndexType" + }, + { + "$ref": "#/parameters/MultiLanguageInput" + }, + { + "$ref": "#/parameters/LoggingOptOut" + } + ], + "responses": { + "202": { + "description": "Accepted - call results in a link where the status of the submitted job can be checked via the GET operation.", + "headers": { + "Operation-Location": { + "type": "string" + } + } + }, + "default": { + "description": "Unexpected error", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Successful Health request": { + "$ref": ".//examples//SuccessfulHealthRequest.json" + } + }, + "deprecated": false, + "x-ms-long-running-operation": true + } + }, + "/entities/recognition/general": { + "post": { + "summary": "Named Entity Recognition", + "description": "The API returns a list of general named entities in a given document. For the list of supported entity types, check Supported Entity Types in Text Analytics API. See the Supported languages in Text Analytics API for the list of enabled languages.", + "operationId": "EntitiesRecognitionGeneral", + "consumes": [ + "application/json", + "text/json" + ], + "produces": [ + "application/json", + "text/json" + ], + "parameters": [ + { + "$ref": "#/parameters/ModelVersion" + }, + { + "$ref": "#/parameters/ShowStats" + }, + { + "$ref": "#/parameters/LoggingOptOut" + }, + { + "$ref": "#/parameters/StringIndexType" + }, + { + "$ref": "#/parameters/MultiLanguageInput" + } + ], + "responses": { + "200": { + "description": "A successful call results in a list of recognized entities returned for each valid document.", + "schema": { + "$ref": "#/definitions/EntitiesResult" + } + }, + "default": { + "description": "Unexpected error", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Successful Entities request": { + "$ref": ".//examples//SuccessfulEntitiesRequest.json" + } + }, + "deprecated": false + } + }, + "/entities/recognition/pii": { + "post": { + "summary": "Entities containing personal information", + "description": "The API returns a list of entities with personal information (\\\"SSN\\\", \\\"Bank Account\\\" etc) in the document. For the list of supported entity types, check Supported Entity Types in Text Analytics API. See the Supported languages in Text Analytics API for the list of enabled languages.\n", + "operationId": "EntitiesRecognitionPii", + "consumes": [ + "application/json", + "text/json" + ], + "produces": [ + "application/json", + "text/json" + ], + "parameters": [ + { + "$ref": "#/parameters/ModelVersion" + }, + { + "$ref": "#/parameters/ShowStats" + }, + { + "$ref": "#/parameters/LoggingOptOut" + }, + { + "name": "domain", + "in": "query", + "description": "(Optional) if specified, will set the PII domain to include only a subset of the entity categories. Possible values include: 'PHI', 'none'.", + "type": "string" + }, + { + "$ref": "#/parameters/StringIndexType" + }, + { + "$ref": "#/parameters/PiiCategories" + }, + { + "$ref": "#/parameters/MultiLanguageInput" + } + ], + "responses": { + "200": { + "description": "A successful call results in a list of entities containing personal information returned for each valid document", + "schema": { + "$ref": "#/definitions/PiiResult" + } + }, + "default": { + "description": "Unexpected error", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Successful Entity PII request": { + "$ref": ".//examples//SuccessfulEntityPIIRequest.json" + } + }, + "deprecated": false + } + }, + "/entities/linking": { + "post": { + "summary": "Linked entities from a well known knowledge base", + "description": "The API returns a list of recognized entities with links to a well known knowledge base. See the Supported languages in Text Analytics API for the list of enabled languages.", + "operationId": "EntitiesLinking", + "consumes": [ + "application/json", + "text/json" + ], + "produces": [ + "application/json", + "text/json" + ], + "parameters": [ + { + "$ref": "#/parameters/ModelVersion" + }, + { + "$ref": "#/parameters/ShowStats" + }, + { + "$ref": "#/parameters/LoggingOptOut" + }, + { + "$ref": "#/parameters/StringIndexType" + }, + { + "$ref": "#/parameters/MultiLanguageInput" + } + ], + "responses": { + "200": { + "description": "A successful call results in a list of recognized entities with links to a well known knowledge base returned for each valid document", + "schema": { + "$ref": "#/definitions/EntityLinkingResult" + } + }, + "default": { + "description": "Unexpected error", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Successful Entity Linking request": { + "$ref": ".//examples//SuccessfulEntityLinkingRequest.json" + } + }, + "deprecated": false + } + }, + "/keyPhrases": { + "post": { + "summary": "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": "KeyPhrases", + "consumes": [ + "application/json", + "text/json" + ], + "produces": [ + "application/json", + "text/json" + ], + "parameters": [ + { + "$ref": "#/parameters/ModelVersion" + }, + { + "$ref": "#/parameters/ShowStats" + }, + { + "$ref": "#/parameters/LoggingOptOut" + }, + { + "$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" + } + }, + "default": { + "description": "Unexpected error", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Successful Key Phrase request": { + "$ref": ".//examples//SuccessfulKeyPhrasesRequest.json" + } + }, + "deprecated": false + } + }, + "/languages": { + "post": { + "summary": "Detect Language", + "description": "The API returns the detected language and a numeric score between 0 and 1. Scores close to 1 indicate 100% certainty that the identified language is true. See the Supported languages in Text Analytics API for the list of enabled languages.", + "operationId": "Languages", + "consumes": [ + "application/json", + "text/json" + ], + "produces": [ + "application/json", + "text/json" + ], + "parameters": [ + { + "$ref": "#/parameters/ModelVersion" + }, + { + "$ref": "#/parameters/ShowStats" + }, + { + "$ref": "#/parameters/LoggingOptOut" + }, + { + "$ref": "#/parameters/LanguageInput" + } + ], + "responses": { + "200": { + "description": "A successful call results in the detected language with the highest probability for each valid document", + "schema": { + "$ref": "#/definitions/LanguageResult" + } + }, + "default": { + "description": "Unexpected error", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Successful Detect Language request": { + "$ref": ".//examples//SuccessfulLanguagesRequest.json" + } + }, + "deprecated": false + } + }, + "/sentiment": { + "post": { + "summary": "Sentiment", + "description": "The API returns a detailed sentiment analysis for the input text. The analysis is done in multiple levels of granularity, start from the a document level, down to sentence and key terms (targets and assessments).", + "operationId": "Sentiment", + "consumes": [ + "application/json", + "text/json" + ], + "produces": [ + "application/json", + "text/json" + ], + "parameters": [ + { + "$ref": "#/parameters/ModelVersion" + }, + { + "$ref": "#/parameters/ShowStats" + }, + { + "$ref": "#/parameters/LoggingOptOut" + }, + { + "name": "opinionMining", + "in": "query", + "description": "(Optional) if set to true, response will contain not only sentiment prediction but also opinion mining (aspect-based sentiment analysis) results.", + "type": "boolean" + }, + { + "$ref": "#/parameters/StringIndexType" + }, + { + "$ref": "#/parameters/MultiLanguageInput" + } + ], + "responses": { + "200": { + "description": "A successful call results in a document sentiment prediction, as well as sentiment scores for each sentiment class (Positive, Negative, and Neutral)", + "schema": { + "$ref": "#/definitions/SentimentResponse" + } + }, + "default": { + "description": "Unexpected error", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Successful Sentiment request": { + "$ref": ".//examples//SuccessfulSentimentRequest.json" + } + }, + "deprecated": false + } + } + }, + "definitions": { + "JobManifest": { + "properties": { + "tasks": { + "description": "The set of tasks to execute on the input documents. Cannot specify the same task more than once.", + "properties": { + "entityRecognitionTasks": { + "type": "array", + "items": { + "$ref": "#/definitions/EntitiesTask" + } + }, + "entityRecognitionPiiTasks": { + "type": "array", + "items": { + "$ref": "#/definitions/PiiTask" + } + }, + "keyPhraseExtractionTasks": { + "type": "array", + "items": { + "$ref": "#/definitions/KeyPhrasesTask" + } + }, + "entityLinkingTasks": { + "type": "array", + "items": { + "$ref": "#/definitions/EntityLinkingTask" + } + }, + "sentimentAnalysisTasks": { + "type": "array", + "items": { + "$ref": "#/definitions/SentimentAnalysisTask" + } + }, + "extractiveSummarizationTasks": { + "type": "array", + "items": { + "$ref": "#/definitions/ExtractiveSummarizationTask" + } + }, + "customEntityRecognitionTasks": { + "type": "array", + "items": { + "$ref": "#/definitions/CustomEntitiesTask" + } + }, + "customSingleClassificationTasks": { + "type": "array", + "items": { + "$ref": "#/definitions/CustomSingleClassificationTask" + } + }, + "customMultiClassificationTasks": { + "type": "array", + "items": { + "$ref": "#/definitions/CustomMultiClassificationTask" + } + } + }, + "type": "object" + } + }, + "required": [ + "tasks" + ], + "type": "object" + }, + "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." + }, + "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." + }, + "DocumentError": { + "type": "object", + "required": [ + "id", + "error" + ], + "properties": { + "id": { + "type": "string", + "description": "Document Id." + }, + "error": { + "type": "object", + "description": "Document Error.", + "$ref": "#/definitions/TextAnalyticsError" + } + } + }, + "ErrorResponse": { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "type": "object", + "description": "Document Error.", + "$ref": "#/definitions/TextAnalyticsError" + } + } + }, + "TextAnalyticsError": { + "type": "object", + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "type": "string", + "enum": [ + "InvalidRequest", + "InvalidArgument", + "InternalServerError", + "ServiceUnavailable", + "NotFound" + ], + "x-ms-enum": { + "name": "ErrorCodeValue", + "modelAsString": true + }, + "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" + } + } + } + }, + "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." + } + } + }, + "ExtractiveSummarizationTask": { + "type": "object", + "properties": { + "parameters": { + "type": "object", + "properties": { + "model-version": { + "default": "latest", + "type": "string" + }, + "loggingOptOut": { + "default": false, + "type": "boolean" + }, + "stringIndexType": { + "$ref": "#/definitions/StringIndexType" + }, + "sentenceCount": { + "default": 3, + "type": "integer" + }, + "sortBy": { + "default": "Offset", + "enum": [ + "Offset", + "Rank" + ], + "type": "string" + } + } + }, + "taskName": { + "type": "string" + } + } + }, + "CustomEntitiesTask": { + "properties": { + "parameters": { + "properties": { + "project-name": { + "type": "string" + }, + "deployment-name": { + "type": "string" + }, + "loggingOptOut": { + "default": false, + "type": "boolean" + }, + "stringIndexType": { + "$ref": "#/definitions/StringIndexType" + } + }, + "type": "object", + "required": [ + "project-name", + "deployment-name" + ] + }, + "taskName": { + "type": "string" + } + }, + "type": "object" + }, + "CustomSingleClassificationTask": { + "properties": { + "parameters": { + "properties": { + "project-name": { + "type": "string" + }, + "deployment-name": { + "type": "string" + }, + "loggingOptOut": { + "default": false, + "type": "boolean" + } + }, + "type": "object", + "required": [ + "project-name", + "deployment-name" + ] + }, + "taskName": { + "type": "string" + } + }, + "type": "object" + }, + "CustomMultiClassificationTask": { + "properties": { + "parameters": { + "properties": { + "project-name": { + "type": "string" + }, + "deployment-name": { + "type": "string" + }, + "loggingOptOut": { + "default": false, + "type": "boolean" + } + }, + "type": "object", + "required": [ + "project-name", + "deployment-name" + ] + }, + "taskName": { + "type": "string" + } + }, + "type": "object" + }, + "PiiTask": { + "properties": { + "parameters": { + "properties": { + "domain": { + "default": "none", + "enum": [ + "phi", + "none" + ], + "type": "string" + }, + "model-version": { + "default": "latest", + "type": "string" + }, + "loggingOptOut": { + "default": true, + "type": "boolean" + }, + "piiCategories": { + "$ref": "#/definitions/PiiCategories" + }, + "stringIndexType": { + "$ref": "#/definitions/StringIndexType" + } + }, + "type": "object" + }, + "taskName": { + "type": "string" + } + }, + "type": "object" + }, + "EntitiesTask": { + "properties": { + "parameters": { + "properties": { + "model-version": { + "default": "latest", + "type": "string" + }, + "loggingOptOut": { + "default": false, + "type": "boolean" + }, + "stringIndexType": { + "$ref": "#/definitions/StringIndexType" + } + }, + "type": "object" + }, + "taskName": { + "type": "string" + } + }, + "type": "object" + }, + "SentimentAnalysisTask": { + "properties": { + "parameters": { + "properties": { + "model-version": { + "default": "latest", + "type": "string" + }, + "loggingOptOut": { + "default": false, + "type": "boolean" + }, + "opinionMining": { + "default": false, + "type": "boolean" + }, + "stringIndexType": { + "$ref": "#/definitions/StringIndexType" + } + }, + "type": "object" + }, + "taskName": { + "type": "string" + } + }, + "type": "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." + } + } + }, + "AnalyzeBatchInput": { + "allOf": [ + { + "$ref": "#/definitions/JobDescriptor" + }, + { + "$ref": "#/definitions/AnalysisInput" + }, + { + "$ref": "#/definitions/JobManifest" + } + ] + }, + "AnalyzeJobState": { + "allOf": [ + { + "$ref": "#/definitions/AnalyzeJobMetadata" + }, + { + "$ref": "#/definitions/TasksState" + }, + { + "$ref": "#/definitions/AnalyzeJobErrorsAndStatistics" + }, + { + "$ref": "#/definitions/Pagination" + } + ] + }, + "ExtractiveSummarizationResult": { + "type": "object", + "required": [ + "documents", + "errors", + "modelVersion" + ], + "properties": { + "documents": { + "type": "array", + "description": "Response by document", + "items": { + "$ref": "#/definitions/ExtractedDocumentSummary" + } + }, + "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." + } + } + }, + "ExtractedDocumentSummary": { + "type": "object", + "required": [ + "id", + "sentences", + "warnings" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique, non-empty document identifier." + }, + "sentences": { + "type": "array", + "description": "A ranked list of sentences representing the extracted summary.", + "items": { + "$ref": "#/definitions/ExtractedSummarySentence" + } + }, + "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" + } + } + }, + "ExtractedSummarySentence": { + "type": "object", + "required": [ + "text", + "rankScore", + "offset", + "length" + ], + "properties": { + "text": { + "type": "string", + "description": "The extracted sentence text." + }, + "rankScore": { + "type": "number", + "format": "double", + "description": "A double value representing the relevance of the sentence within the summary. Higher values indicate higher importance." + }, + "offset": { + "type": "integer", + "format": "int32", + "description": "The sentence offset from the start of the document, based on the value of the parameter StringIndexType." + }, + "length": { + "type": "integer", + "format": "int32", + "description": "The length of the sentence." + } + } + }, + "CustomEntitiesResult": { + "type": "object", + "required": [ + "documents", + "errors", + "projectName", + "deploymentName" + ], + "properties": { + "documents": { + "type": "array", + "description": "Response by document", + "items": { + "$ref": "#/definitions/DocumentEntities" + } + }, + "errors": { + "type": "array", + "description": "Errors by document id.", + "items": { + "$ref": "#/definitions/DocumentError" + } + }, + "statistics": { + "$ref": "#/definitions/RequestStatistics" + }, + "projectName": { + "type": "string", + "description": "This field indicates the project name for the model." + }, + "deploymentName": { + "type": "string", + "description": "This field indicates the deployment name for the model." + } + } + }, + "CustomSingleClassificationResult": { + "type": "object", + "required": [ + "documents", + "errors", + "projectName", + "deploymentName" + ], + "properties": { + "documents": { + "type": "array", + "description": "Response by document", + "items": { + "$ref": "#/definitions/SingleClassificationDocument" + } + }, + "errors": { + "type": "array", + "description": "Errors by document id.", + "items": { + "$ref": "#/definitions/DocumentError" + } + }, + "statistics": { + "$ref": "#/definitions/RequestStatistics" + }, + "projectName": { + "type": "string", + "description": "This field indicates the project name for the model." + }, + "deploymentName": { + "type": "string", + "description": "This field indicates the deployment name for the model." + } + } + }, + "CustomMultiClassificationResult": { + "type": "object", + "required": [ + "documents", + "errors", + "projectName", + "deploymentName" + ], + "properties": { + "documents": { + "type": "array", + "description": "Response by document", + "items": { + "$ref": "#/definitions/MultiClassificationDocument" + } + }, + "errors": { + "type": "array", + "description": "Errors by document id.", + "items": { + "$ref": "#/definitions/DocumentError" + } + }, + "statistics": { + "$ref": "#/definitions/RequestStatistics" + }, + "projectName": { + "type": "string", + "description": "This field indicates the project name for the model." + }, + "deploymentName": { + "type": "string", + "description": "This field indicates the deployment name for the model." + } + } + }, + "SingleClassificationDocument": { + "type": "object", + "required": [ + "id", + "classification", + "warnings" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique, non-empty document identifier." + }, + "classification": { + "$ref": "#/definitions/ClassificationResult" + }, + "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" + } + } + }, + "MultiClassificationDocument": { + "type": "object", + "required": [ + "id", + "classifications", + "warnings" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique, non-empty document identifier." + }, + "classifications": { + "type": "array", + "description": "Recognized classification results in the document.", + "items": { + "$ref": "#/definitions/ClassificationResult" + } + }, + "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" + } + } + }, + "ClassificationResult": { + "type": "object", + "required": [ + "category", + "confidenceScore" + ], + "properties": { + "category": { + "type": "string", + "description": "Classification type." + }, + "confidenceScore": { + "type": "number", + "format": "double", + "description": "Confidence score between 0 and 1 of the recognized classification." + } + } + }, + "SentimentResponse": { + "type": "object", + "required": [ + "documents", + "errors", + "modelVersion" + ], + "properties": { + "documents": { + "type": "array", + "description": "Sentiment analysis per document.", + "items": { + "$ref": "#/definitions/DocumentSentiment" + } + }, + "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." + } + } + }, + "TaskState": { + "properties": { + "lastUpdateDateTime": { + "format": "date-time", + "type": "string" + }, + "taskName": { + "type": "string" + }, + "status": { + "enum": [ + "notStarted", + "running", + "succeeded", + "failed", + "rejected", + "cancelled", + "cancelling" + ], + "x-ms-enum": { + "modelAsString": false, + "name": "State" + } + } + }, + "required": [ + "status", + "lastUpdateDateTime", + "taskName" + ], + "type": "object" + }, + "TasksState": { + "properties": { + "tasks": { + "properties": { + "completed": { + "type": "integer" + }, + "failed": { + "type": "integer" + }, + "inProgress": { + "type": "integer" + }, + "total": { + "type": "integer" + }, + "entityRecognitionTasks": { + "type": "array", + "items": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/TaskState" + }, + { + "$ref": "#/definitions/EntitiesTaskResult" + } + ] + } + }, + "entityRecognitionPiiTasks": { + "type": "array", + "items": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/TaskState" + }, + { + "$ref": "#/definitions/PiiTaskResult" + } + ] + } + }, + "keyPhraseExtractionTasks": { + "type": "array", + "items": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/TaskState" + }, + { + "$ref": "#/definitions/KeyPhraseTaskResult" + } + ] + } + }, + "entityLinkingTasks": { + "type": "array", + "items": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/TaskState" + }, + { + "$ref": "#/definitions/EntityLinkingTaskResult" + } + ] + } + }, + "sentimentAnalysisTasks": { + "type": "array", + "items": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/TaskState" + }, + { + "$ref": "#/definitions/SentimentTaskResult" + } + ] + } + }, + "extractiveSummarizationTasks": { + "type": "array", + "items": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/TaskState" + }, + { + "$ref": "#/definitions/ExtractiveSummarizationTaskResult" + } + ] + } + }, + "customEntityRecognitionTasks": { + "type": "array", + "items": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/TaskState" + }, + { + "$ref": "#/definitions/CustomEntitiesTaskResult" + } + ] + } + }, + "customSingleClassificationTasks": { + "type": "array", + "items": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/TaskState" + }, + { + "$ref": "#/definitions/CustomSingleClassificationTaskResult" + } + ] + } + }, + "customMultiClassificationTasks": { + "type": "array", + "items": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/TaskState" + }, + { + "$ref": "#/definitions/CustomMultiClassificationTaskResult" + } + ] + } + } + }, + "required": [ + "total", + "completed", + "failed", + "inProgress" + ], + "type": "object" + } + }, + "required": [ + "tasks" + ], + "type": "object" + }, + "DocumentSentiment": { + "type": "object", + "required": [ + "id", + "sentiment", + "confidenceScores", + "sentences", + "warnings" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique, non-empty document identifier." + }, + "sentiment": { + "type": "string", + "description": "Predicted sentiment for document (Negative, Neutral, Positive, or Mixed).", + "enum": [ + "positive", + "neutral", + "negative", + "mixed" + ], + "x-ms-enum": { + "name": "DocumentSentimentValue", + "modelAsString": false + } + }, + "statistics": { + "$ref": "#/definitions/DocumentStatistics" + }, + "confidenceScores": { + "description": "Document level sentiment confidence scores between 0 and 1 for each sentiment class.", + "$ref": "#/definitions/SentimentConfidenceScorePerLabel" + }, + "sentences": { + "type": "array", + "description": "Sentence level sentiment analysis.", + "items": { + "$ref": "#/definitions/SentenceSentiment" + } + }, + "warnings": { + "type": "array", + "description": "Warnings encountered while processing document.", + "items": { + "$ref": "#/definitions/TextAnalyticsWarning" + } + } + } + }, + "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." + }, + "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." + }, + "SentimentConfidenceScorePerLabel": { + "type": "object", + "required": [ + "positive", + "neutral", + "negative" + ], + "properties": { + "positive": { + "type": "number", + "format": "double" + }, + "neutral": { + "type": "number", + "format": "double" + }, + "negative": { + "type": "number", + "format": "double" + } + }, + "description": "Represents the confidence scores between 0 and 1 across all sentiment classes: positive, neutral, negative." + }, + "SentenceSentiment": { + "type": "object", + "required": [ + "text", + "sentiment", + "confidenceScores", + "offset", + "length" + ], + "properties": { + "text": { + "type": "string", + "description": "The sentence text." + }, + "sentiment": { + "type": "string", + "description": "The predicted Sentiment for the sentence.", + "enum": [ + "positive", + "neutral", + "negative" + ], + "x-ms-enum": { + "name": "SentenceSentimentValue", + "modelAsString": false + } + }, + "confidenceScores": { + "description": "The sentiment confidence score between 0 and 1 for the sentence for all classes.", + "$ref": "#/definitions/SentimentConfidenceScorePerLabel" + }, + "offset": { + "type": "integer", + "format": "int32", + "description": "The sentence offset from the start of the document." + }, + "length": { + "type": "integer", + "format": "int32", + "description": "The length of the sentence." + }, + "targets": { + "type": "array", + "description": "The array of sentence targets for the sentence.", + "items": { + "$ref": "#/definitions/SentenceTarget" + } + }, + "assessments": { + "type": "array", + "description": "The array of assessments for the sentence.", + "items": { + "$ref": "#/definitions/SentenceAssessment" + } + } + } + }, + "SentenceTarget": { + "type": "object", + "required": [ + "confidenceScores", + "length", + "offset", + "relations", + "sentiment", + "text" + ], + "properties": { + "sentiment": { + "type": "string", + "enum": [ + "positive", + "mixed", + "negative" + ], + "x-ms-enum": { + "name": "TokenSentimentValue", + "modelAsString": false + }, + "description": "Targeted sentiment in the sentence." + }, + "confidenceScores": { + "description": "Target sentiment confidence scores for the target in the sentence.", + "$ref": "#/definitions/TargetConfidenceScoreLabel" + }, + "offset": { + "type": "integer", + "format": "int32", + "description": "The target offset from the start of the sentence." + }, + "length": { + "type": "integer", + "format": "int32", + "description": "The length of the target." + }, + "text": { + "type": "string", + "description": "The target text detected." + }, + "relations": { + "type": "array", + "description": "The array of either assessment or target objects which is related to the target.", + "items": { + "$ref": "#/definitions/TargetRelation" + } + } + } + }, + "SentenceAssessment": { + "type": "object", + "required": [ + "confidenceScores", + "isNegated", + "length", + "offset", + "sentiment", + "text" + ], + "properties": { + "sentiment": { + "type": "string", + "enum": [ + "positive", + "mixed", + "negative" + ], + "x-ms-enum": { + "name": "TokenSentimentValue", + "modelAsString": false + }, + "description": "Assessment sentiment in the sentence." + }, + "confidenceScores": { + "description": "Assessment sentiment confidence scores in the sentence.", + "$ref": "#/definitions/TargetConfidenceScoreLabel" + }, + "offset": { + "type": "integer", + "format": "int32", + "description": "The assessment offset from the start of the sentence." + }, + "length": { + "type": "integer", + "format": "int32", + "description": "The length of the assessment." + }, + "text": { + "type": "string", + "description": "The assessment text detected." + }, + "isNegated": { + "type": "boolean", + "description": "The indicator representing if the assessment is negated." + } + } + }, + "TargetRelation": { + "type": "object", + "required": [ + "ref", + "relationType" + ], + "properties": { + "relationType": { + "type": "string", + "enum": [ + "assessment", + "target" + ], + "x-ms-enum": { + "name": "TargetRelationType", + "modelAsString": false + }, + "description": "The type related to the target." + }, + "ref": { + "type": "string", + "description": "The JSON pointer indicating the linked object." + } + } + }, + "TargetConfidenceScoreLabel": { + "type": "object", + "required": [ + "negative", + "positive" + ], + "properties": { + "positive": { + "type": "number", + "format": "double" + }, + "negative": { + "type": "number", + "format": "double" + } + }, + "description": "Represents the confidence scores across all sentiment classes: positive, neutral, negative." + }, + "EntitiesResult": { + "type": "object", + "required": [ + "documents", + "errors", + "modelVersion" + ], + "properties": { + "documents": { + "type": "array", + "description": "Response by document", + "items": { + "$ref": "#/definitions/DocumentEntities" + } + }, + "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." + } + } + }, + "DocumentEntities": { + "type": "object", + "required": [ + "id", + "entities", + "warnings" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique, non-empty document identifier." + }, + "entities": { + "type": "array", + "description": "Recognized entities in the document.", + "items": { + "$ref": "#/definitions/Entity" + } + }, + "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" + } + } + }, + "PiiDocumentEntities": { + "type": "object", + "required": [ + "id", + "redactedText", + "entities", + "warnings" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique, non-empty document identifier." + }, + "redactedText": { + "type": "string", + "description": "Returns redacted text." + }, + "entities": { + "type": "array", + "description": "Recognized entities in the document.", + "items": { + "$ref": "#/definitions/Entity" + } + }, + "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" + } + } + }, + "Entity": { + "type": "object", + "required": [ + "text", + "category", + "offset", + "length", + "confidenceScore" + ], + "properties": { + "text": { + "type": "string", + "description": "Entity text as appears in the request." + }, + "category": { + "type": "string", + "description": "Entity type." + }, + "subcategory": { + "type": "string", + "description": "(Optional) Entity sub type." + }, + "offset": { + "type": "integer", + "format": "int32", + "description": "Start position for the entity text. Use of different 'stringIndexType' values can affect the offset returned." + }, + "length": { + "type": "integer", + "format": "int32", + "description": "Length for the entity text. Use of different 'stringIndexType' values can affect the length returned." + }, + "confidenceScore": { + "type": "number", + "format": "double", + "description": "Confidence score between 0 and 1 of the extracted entity." + } + } + }, + "EntityLinkingResult": { + "type": "object", + "required": [ + "documents", + "errors", + "modelVersion" + ], + "properties": { + "documents": { + "type": "array", + "description": "Response by document", + "items": { + "$ref": "#/definitions/DocumentLinkedEntities" + } + }, + "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." + } + } + }, + "DocumentLinkedEntities": { + "type": "object", + "required": [ + "id", + "entities", + "warnings" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique, non-empty document identifier." + }, + "entities": { + "type": "array", + "description": "Recognized well known entities in the document.", + "items": { + "$ref": "#/definitions/LinkedEntity" + } + }, + "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" + } + } + }, + "HealthcareJobState": { + "allOf": [ + { + "$ref": "#/definitions/JobMetadata" + }, + { + "$ref": "#/definitions/HealthcareTaskResult" + }, + { + "$ref": "#/definitions/Pagination" + } + ] + }, + "HealthcareResult": { + "type": "object", + "required": [ + "documents", + "errors", + "modelVersion" + ], + "properties": { + "documents": { + "type": "array", + "description": "Response by document", + "items": { + "$ref": "#/definitions/DocumentHealthcareEntities" + } + }, + "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." + } + } + }, + "DocumentHealthcareEntities": { + "type": "object", + "required": [ + "id", + "entities", + "relations", + "warnings" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique, non-empty document identifier." + }, + "entities": { + "description": "Healthcare entities.", + "type": "array", + "items": { + "$ref": "#/definitions/HealthcareEntity" + } + }, + "relations": { + "type": "array", + "description": "Healthcare entity relations.", + "items": { + "$ref": "#/definitions/HealthcareRelation" + } + }, + "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" + } + } + }, + "HealthcareEntity": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/HealthcareEntityProperties" + }, + { + "$ref": "#/definitions/HealthcareLinkingProperties" + } + ] + }, + "HealthcareRelation": { + "type": "object", + "description": "Every relation is an entity graph of a certain relationType, where all entities are connected and have specific roles within the relation context.", + "required": [ + "relationType", + "entities" + ], + "properties": { + "relationType": { + "description": "Type of relation. Examples include: `DosageOfMedication` or 'FrequencyOfMedication', etc.", + "type": "string", + "enum": [ + "Abbreviation", + "DirectionOfBodyStructure", + "DirectionOfCondition", + "DirectionOfExamination", + "DirectionOfTreatment", + "DosageOfMedication", + "FormOfMedication", + "FrequencyOfMedication", + "FrequencyOfTreatment", + "QualifierOfCondition", + "RelationOfExamination", + "RouteOfMedication", + "TimeOfCondition", + "TimeOfEvent", + "TimeOfExamination", + "TimeOfMedication", + "TimeOfTreatment", + "UnitOfCondition", + "UnitOfExamination", + "ValueOfCondition", + "ValueOfExamination" + ], + "x-ms-enum": { + "name": "relationType", + "modelAsString": true + } + }, + "entities": { + "description": "The entities in the relation.", + "type": "array", + "items": { + "$ref": "#/definitions/HealthcareRelationEntity" + } + } + } + }, + "HealthcareAssertion": { + "type": "object", + "properties": { + "conditionality": { + "description": "Describes any conditionality on the entity.", + "type": "string", + "enum": [ + "hypothetical", + "conditional" + ], + "x-ms-enum": { + "name": "Conditionality", + "modelAsString": false + } + }, + "certainty": { + "description": "Describes the entities certainty and polarity.", + "type": "string", + "enum": [ + "positive", + "positivePossible", + "neutralPossible", + "negativePossible", + "negative" + ], + "x-ms-enum": { + "name": "Certainty", + "modelAsString": false + } + }, + "association": { + "description": "Describes if the entity is the subject of the text or if it describes someone else.", + "type": "string", + "enum": [ + "subject", + "other" + ], + "x-ms-enum": { + "name": "Association", + "modelAsString": false + } + } + } + }, + "HealthcareRelationEntity": { + "type": "object", + "required": [ + "ref", + "role" + ], + "properties": { + "ref": { + "description": "Reference link object, using a JSON pointer RFC 6901 (URI Fragment Identifier Representation), pointing to the entity .", + "type": "string" + }, + "role": { + "description": "Role of entity in the relationship. For example: 'CD20-positive diffuse large B-cell lymphoma' has the following entities with their roles in parenthesis: CD20 (GeneOrProtein), Positive (Expression), diffuse large B-cell lymphoma (Diagnosis).", + "type": "string" + } + } + }, + "HealthcareEntityLink": { + "type": "object", + "required": [ + "dataSource", + "id" + ], + "properties": { + "dataSource": { + "description": "Entity Catalog. Examples include: UMLS, CHV, MSH, etc.", + "type": "string" + }, + "id": { + "description": "Entity id in the given source catalog.", + "type": "string" + } + } + }, + "HealthcareEntityProperties": { + "type": "object", + "required": [ + "text", + "category", + "offset", + "length", + "confidenceScore" + ], + "properties": { + "text": { + "type": "string", + "description": "Entity text as appears in the request." + }, + "category": { + "x-ms-enum": { + "name": "healthcareEntityCategory", + "modelAsString": true + }, + "type": "string", + "description": "Healthcare Entity Category.", + "enum": [ + "BODY_STRUCTURE", + "AGE", + "GENDER", + "EXAMINATION_NAME", + "DATE", + "DIRECTION", + "FREQUENCY", + "MEASUREMENT_VALUE", + "MEASUREMENT_UNIT", + "RELATIONAL_OPERATOR", + "TIME", + "GENE_OR_PROTEIN", + "VARIANT", + "ADMINISTRATIVE_EVENT", + "CARE_ENVIRONMENT", + "HEALTHCARE_PROFESSION", + "DIAGNOSIS", + "SYMPTOM_OR_SIGN", + "CONDITION_QUALIFIER", + "MEDICATION_CLASS", + "MEDICATION_NAME", + "DOSAGE", + "MEDICATION_FORM", + "MEDICATION_ROUTE", + "FAMILY_RELATION", + "TREATMENT_NAME" + ] + }, + "subcategory": { + "type": "string", + "description": "(Optional) Entity sub type." + }, + "offset": { + "type": "integer", + "format": "int32", + "description": "Start position for the entity text. Use of different 'stringIndexType' values can affect the offset returned." + }, + "length": { + "type": "integer", + "format": "int32", + "description": "Length for the entity text. Use of different 'stringIndexType' values can affect the length returned." + }, + "confidenceScore": { + "type": "number", + "format": "double", + "description": "Confidence score between 0 and 1 of the extracted entity." + } + } + }, + "HealthcareLinkingProperties": { + "properties": { + "assertion": { + "type": "object", + "$ref": "#/definitions/HealthcareAssertion" + }, + "name": { + "description": "Preferred name for the entity. Example: 'histologically' would have a 'name' of 'histologic'.", + "type": "string" + }, + "links": { + "description": "Entity references in known data sources.", + "type": "array", + "items": { + "$ref": "#/definitions/HealthcareEntityLink" + } + } + } + }, + "LinkedEntity": { + "type": "object", + "required": [ + "name", + "matches", + "language", + "url", + "dataSource" + ], + "properties": { + "name": { + "type": "string", + "description": "Entity Linking formal name." + }, + "matches": { + "type": "array", + "description": "List of instances this entity appears in the text.", + "items": { + "$ref": "#/definitions/Match" + } + }, + "language": { + "type": "string", + "description": "Language used in the data source." + }, + "id": { + "type": "string", + "description": "Unique identifier of the recognized entity from the data source." + }, + "url": { + "type": "string", + "description": "URL for the entity's page from the data source." + }, + "dataSource": { + "type": "string", + "description": "Data source used to extract entity linking, such as Wiki/Bing etc." + }, + "bingId": { + "type": "string", + "description": "Bing Entity Search API unique identifier of the recognized entity." + } + } + }, + "Match": { + "type": "object", + "required": [ + "confidenceScore", + "text", + "offset", + "length" + ], + "properties": { + "confidenceScore": { + "type": "number", + "format": "double", + "description": "If a well known item is recognized, a decimal number denoting the confidence level between 0 and 1 will be returned." + }, + "text": { + "type": "string", + "description": "Entity text as appears in the request." + }, + "offset": { + "type": "integer", + "format": "int32", + "description": "Start position for the entity match text." + }, + "length": { + "type": "integer", + "format": "int32", + "description": "Length for the entity match text." + } + } + }, + "AnalysisInput": { + "type": "object", + "required": [ + "analysisInput" + ], + "properties": { + "analysisInput": { + "$ref": "#/definitions/MultiLanguageBatchInput" + } + } + }, + "EntitiesTaskResult": { + "type": "object", + "properties": { + "results": { + "$ref": "#/definitions/EntitiesResult" + } + } + }, + "PiiTaskResult": { + "type": "object", + "properties": { + "results": { + "$ref": "#/definitions/PiiResult" + } + } + }, + "KeyPhraseTaskResult": { + "type": "object", + "properties": { + "results": { + "$ref": "#/definitions/KeyPhraseResult" + } + } + }, + "EntityLinkingTaskResult": { + "type": "object", + "properties": { + "results": { + "$ref": "#/definitions/EntityLinkingResult" + } + } + }, + "SentimentTaskResult": { + "type": "object", + "properties": { + "results": { + "$ref": "#/definitions/SentimentResponse" + } + } + }, + "ExtractiveSummarizationTaskResult": { + "type": "object", + "properties": { + "results": { + "$ref": "#/definitions/ExtractiveSummarizationResult" + } + } + }, + "CustomEntitiesTaskResult": { + "type": "object", + "properties": { + "results": { + "$ref": "#/definitions/CustomEntitiesResult" + } + } + }, + "CustomSingleClassificationTaskResult": { + "type": "object", + "properties": { + "results": { + "$ref": "#/definitions/CustomSingleClassificationResult" + } + } + }, + "CustomMultiClassificationTaskResult": { + "type": "object", + "properties": { + "results": { + "$ref": "#/definitions/CustomMultiClassificationResult" + } + } + }, + "HealthcareTaskResult": { + "properties": { + "results": { + "$ref": "#/definitions/HealthcareResult" + }, + "errors": { + "items": { + "$ref": "#/definitions/TextAnalyticsError" + }, + "type": "array" + } + }, + "type": "object" + }, + "JobDescriptor": { + "properties": { + "displayName": { + "description": "Optional display name for the analysis job.", + "type": "string" + } + }, + "type": "object" + }, + "JobMetadata": { + "properties": { + "createdDateTime": { + "format": "date-time", + "type": "string" + }, + "expirationDateTime": { + "format": "date-time", + "type": "string" + }, + "jobId": { + "format": "uuid", + "type": "string" + }, + "lastUpdateDateTime": { + "format": "date-time", + "type": "string" + }, + "status": { + "enum": [ + "notStarted", + "running", + "succeeded", + "failed", + "cancelled", + "cancelling" + ], + "type": "string", + "x-ms-enum": { + "modelAsString": false, + "name": "State" + } + } + }, + "required": [ + "jobId", + "lastUpdateDateTime", + "createdDateTime", + "status" + ], + "type": "object" + }, + "AnalyzeJobDisplayName": { + "properties": { + "displayName": { + "type": "string" + } + } + }, + "AnalyzeJobMetadata": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/JobMetadata" + }, + { + "$ref": "#/definitions/AnalyzeJobDisplayName" + } + ] + }, + "AnalyzeJobErrorsAndStatistics": { + "properties": { + "errors": { + "items": { + "$ref": "#/definitions/TextAnalyticsError" + }, + "type": "array" + }, + "statistics": { + "$ref": "#/definitions/RequestStatistics" + } + }, + "type": "object" + }, + "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." + } + } + }, + "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" + } + } + }, + "KeyPhrasesTask": { + "properties": { + "parameters": { + "properties": { + "model-version": { + "default": "latest", + "type": "string" + }, + "loggingOptOut": { + "default": false, + "type": "boolean" + } + }, + "type": "object" + }, + "taskName": { + "type": "string" + } + }, + "type": "object" + }, + "EntityLinkingTask": { + "properties": { + "parameters": { + "properties": { + "model-version": { + "default": "latest", + "type": "string" + }, + "loggingOptOut": { + "default": false, + "type": "boolean" + }, + "stringIndexType": { + "$ref": "#/definitions/StringIndexType" + } + }, + "type": "object" + }, + "taskName": { + "type": "string" + } + }, + "type": "object" + }, + "LanguageBatchInput": { + "type": "object", + "required": [ + "documents" + ], + "properties": { + "documents": { + "type": "array", + "items": { + "$ref": "#/definitions/LanguageInput" + } + } + } + }, + "LanguageInput": { + "type": "object", + "required": [ + "id", + "text" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique, non-empty document identifier." + }, + "text": { + "type": "string" + }, + "countryHint": { + "type": "string" + } + } + }, + "Pagination": { + "properties": { + "@nextLink": { + "type": "string" + } + }, + "type": "object" + }, + "PiiResult": { + "type": "object", + "required": [ + "documents", + "errors", + "modelVersion" + ], + "properties": { + "documents": { + "type": "array", + "description": "Response by document", + "items": { + "$ref": "#/definitions/PiiDocumentEntities" + } + }, + "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." + } + } + }, + "LanguageResult": { + "type": "object", + "required": [ + "documents", + "errors", + "modelVersion" + ], + "properties": { + "documents": { + "type": "array", + "description": "Response by document", + "items": { + "$ref": "#/definitions/DocumentLanguage" + } + }, + "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." + } + } + }, + "DocumentLanguage": { + "type": "object", + "required": [ + "id", + "detectedLanguage", + "warnings" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique, non-empty document identifier." + }, + "detectedLanguage": { + "description": "Detected Language.", + "$ref": "#/definitions/DetectedLanguage" + }, + "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" + } + } + }, + "DetectedLanguage": { + "type": "object", + "required": [ + "name", + "iso6391Name", + "confidenceScore" + ], + "properties": { + "name": { + "type": "string", + "description": "Long name of a detected language (e.g. English, French)." + }, + "iso6391Name": { + "type": "string", + "description": "A two letter representation of the detected language according to the ISO 639-1 standard (e.g. en, fr)." + }, + "confidenceScore": { + "type": "number", + "format": "double", + "description": "A confidence score between 0 and 1. Scores close to 1 indicate 100% certainty that the identified language is true." + } + } + }, + "StringIndexType": { + "default": "TextElement_v8", + "enum": [ + "TextElement_v8", + "UnicodeCodePoint", + "Utf16CodeUnit" + ], + "x-ms-enum": { + "name": "StringIndexType", + "modelAsString": true, + "values": [ + { + "value": "TextElement_v8", + "description": "Returned offset and length values will correspond to TextElements (Graphemes and Grapheme clusters) confirming to the Unicode 8.0.0 standard. Use this option if your application is written in .Net Framework or .Net Core and you will be using StringInfo." + }, + { + "value": "UnicodeCodePoint", + "description": "Returned offset and length values will correspond to Unicode code points. Use this option if your application is written in a language that support Unicode, for example Python." + }, + { + "value": "Utf16CodeUnit", + "description": "Returned offset and length values will correspond to UTF-16 code units. Use this option if your application is written in a language that support Unicode, for example Java, JavaScript." + } + ] + }, + "type": "string" + }, + "PiiCategories": { + "description": "(Optional) describes the PII categories to return", + "items": { + "type": "string", + "x-ms-enum": { + "name": "PiiCategory", + "modelAsString": true + }, + "enum": [ + "ABARoutingNumber", + "ARNationalIdentityNumber", + "AUBankAccountNumber", + "AUDriversLicenseNumber", + "AUMedicalAccountNumber", + "AUPassportNumber", + "AUTaxFileNumber", + "AUBusinessNumber", + "AUCompanyNumber", + "ATIdentityCard", + "ATTaxIdentificationNumber", + "ATValueAddedTaxNumber", + "AzureDocumentDBAuthKey", + "AzureIAASDatabaseConnectionAndSQLString", + "AzureIoTConnectionString", + "AzurePublishSettingPassword", + "AzureRedisCacheString", + "AzureSAS", + "AzureServiceBusString", + "AzureStorageAccountKey", + "AzureStorageAccountGeneric", + "BENationalNumber", + "BENationalNumberV2", + "BEValueAddedTaxNumber", + "BRCPFNumber", + "BRLegalEntityNumber", + "BRNationalIDRG", + "BGUniformCivilNumber", + "CABankAccountNumber", + "CADriversLicenseNumber", + "CAHealthServiceNumber", + "CAPassportNumber", + "CAPersonalHealthIdentification", + "CASocialInsuranceNumber", + "CLIdentityCardNumber", + "CNResidentIdentityCardNumber", + "CreditCardNumber", + "HRIdentityCardNumber", + "HRNationalIDNumber", + "HRPersonalIdentificationNumber", + "HRPersonalIdentificationOIBNumberV2", + "CYIdentityCard", + "CYTaxIdentificationNumber", + "CZPersonalIdentityNumber", + "CZPersonalIdentityV2", + "DKPersonalIdentificationNumber", + "DKPersonalIdentificationV2", + "DrugEnforcementAgencyNumber", + "EEPersonalIdentificationCode", + "EUDebitCardNumber", + "EUDriversLicenseNumber", + "EUGPSCoordinates", + "EUNationalIdentificationNumber", + "EUPassportNumber", + "EUSocialSecurityNumber", + "EUTaxIdentificationNumber", + "FIEuropeanHealthNumber", + "FINationalID", + "FINationalIDV2", + "FIPassportNumber", + "FRDriversLicenseNumber", + "FRHealthInsuranceNumber", + "FRNationalID", + "FRPassportNumber", + "FRSocialSecurityNumber", + "FRTaxIdentificationNumber", + "FRValueAddedTaxNumber", + "DEDriversLicenseNumber", + "DEPassportNumber", + "DEIdentityCardNumber", + "DETaxIdentificationNumber", + "DEValueAddedNumber", + "GRNationalIDCard", + "GRNationalIDV2", + "GRTaxIdentificationNumber", + "HKIdentityCardNumber", + "HUValueAddedNumber", + "HUPersonalIdentificationNumber", + "HUTaxIdentificationNumber", + "INPermanentAccount", + "INUniqueIdentificationNumber", + "IDIdentityCardNumber", + "InternationalBankingAccountNumber", + "IEPersonalPublicServiceNumber", + "IEPersonalPublicServiceNumberV2", + "ILBankAccountNumber", + "ILNationalID", + "ITDriversLicenseNumber", + "ITFiscalCode", + "ITValueAddedTaxNumber", + "JPBankAccountNumber", + "JPDriversLicenseNumber", + "JPPassportNumber", + "JPResidentRegistrationNumber", + "JPSocialInsuranceNumber", + "JPMyNumberCorporate", + "JPMyNumberPersonal", + "JPResidenceCardNumber", + "LVPersonalCode", + "LTPersonalCode", + "LUNationalIdentificationNumberNatural", + "LUNationalIdentificationNumberNonNatural", + "MYIdentityCardNumber", + "MTIdentityCardNumber", + "MTTaxIDNumber", + "NLCitizensServiceNumber", + "NLCitizensServiceNumberV2", + "NLTaxIdentificationNumber", + "NLValueAddedTaxNumber", + "NZBankAccountNumber", + "NZDriversLicenseNumber", + "NZInlandRevenueNumber", + "NZMinistryOfHealthNumber", + "NZSocialWelfareNumber", + "NOIdentityNumber", + "PHUnifiedMultiPurposeIDNumber", + "PLIdentityCard", + "PLNationalID", + "PLNationalIDV2", + "PLPassportNumber", + "PLTaxIdentificationNumber", + "PLREGONNumber", + "PTCitizenCardNumber", + "PTCitizenCardNumberV2", + "PTTaxIdentificationNumber", + "ROPersonalNumericalCode", + "RUPassportNumberDomestic", + "RUPassportNumberInternational", + "SANationalID", + "SGNationalRegistrationIdentityCardNumber", + "SKPersonalNumber", + "SITaxIdentificationNumber", + "SIUniqueMasterCitizenNumber", + "ZAIdentificationNumber", + "KRResidentRegistrationNumber", + "ESDNI", + "ESSocialSecurityNumber", + "ESTaxIdentificationNumber", + "SQLServerConnectionString", + "SENationalID", + "SENationalIDV2", + "SEPassportNumber", + "SETaxIdentificationNumber", + "SWIFTCode", + "CHSocialSecurityNumber", + "TWNationalID", + "TWPassportNumber", + "TWResidentCertificate", + "THPopulationIdentificationCode", + "TRNationalIdentificationNumber", + "UKDriversLicenseNumber", + "UKElectoralRollNumber", + "UKNationalHealthNumber", + "UKNationalInsuranceNumber", + "UKUniqueTaxpayerNumber", + "USUKPassportNumber", + "USBankAccountNumber", + "USDriversLicenseNumber", + "USIndividualTaxpayerIdentification", + "USSocialSecurityNumber", + "UAPassportNumberDomestic", + "UAPassportNumberInternational", + "Organization", + "Email", + "URL", + "Age", + "PhoneNumber", + "IPAddress", + "Date", + "Person", + "Address", + "All", + "Default" + ] + }, + "type": "array", + "uniqueItems": true + } + }, + "parameters": { + "ApiVersion": { + "name": "ApiVersion", + "description": "Text Analytics API version (for example, v3.0).", + "x-ms-parameter-location": "client", + "required": true, + "type": "string", + "enum": [ + "v3.2-preview.2" + ], + "in": "path", + "x-ms-skip-url-encoding": true + }, + "Endpoint": { + "name": "Endpoint", + "description": "Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus.api.cognitive.microsoft.com).", + "x-ms-parameter-location": "client", + "required": true, + "type": "string", + "in": "path", + "x-ms-skip-url-encoding": true + }, + "StringIndexType": { + "name": "stringIndexType", + "in": "query", + "type": "string", + "description": "(Optional) Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see https://aka.ms/text-analytics-offsets", + "default": "TextElement_v8", + "enum": [ + "TextElement_v8", + "UnicodeCodePoint", + "Utf16CodeUnit" + ], + "x-ms-enum": { + "name": "StringIndexType", + "modelAsString": true, + "values": [ + { + "value": "TextElement_v8", + "description": "Returned offset and length values will correspond to TextElements (Graphemes and Grapheme clusters) confirming to the Unicode 8.0.0 standard. Use this option if your application is written in .Net Framework or .Net Core and you will be using StringInfo." + }, + { + "value": "UnicodeCodePoint", + "description": "Returned offset and length values will correspond to Unicode code points. Use this option if your application is written in a language that support Unicode, for example Python." + }, + { + "value": "Utf16CodeUnit", + "description": "Returned offset and length values will correspond to UTF-16 code units. Use this option if your application is written in a language that support Unicode, for example Java, JavaScript." + } + ] + }, + "x-ms-parameter-location": "method" + }, + "PiiCategories": { + "description": "(Optional) describes the PII categories to return", + "in": "query", + "collectionFormat": "csv", + "items": { + "type": "string", + "x-ms-enum": { + "name": "PiiCategory", + "modelAsString": true + }, + "enum": [ + "ABARoutingNumber", + "ARNationalIdentityNumber", + "AUBankAccountNumber", + "AUDriversLicenseNumber", + "AUMedicalAccountNumber", + "AUPassportNumber", + "AUTaxFileNumber", + "AUBusinessNumber", + "AUCompanyNumber", + "ATIdentityCard", + "ATTaxIdentificationNumber", + "ATValueAddedTaxNumber", + "AzureDocumentDBAuthKey", + "AzureIAASDatabaseConnectionAndSQLString", + "AzureIoTConnectionString", + "AzurePublishSettingPassword", + "AzureRedisCacheString", + "AzureSAS", + "AzureServiceBusString", + "AzureStorageAccountKey", + "AzureStorageAccountGeneric", + "BENationalNumber", + "BENationalNumberV2", + "BEValueAddedTaxNumber", + "BRCPFNumber", + "BRLegalEntityNumber", + "BRNationalIDRG", + "BGUniformCivilNumber", + "CABankAccountNumber", + "CADriversLicenseNumber", + "CAHealthServiceNumber", + "CAPassportNumber", + "CAPersonalHealthIdentification", + "CASocialInsuranceNumber", + "CLIdentityCardNumber", + "CNResidentIdentityCardNumber", + "CreditCardNumber", + "HRIdentityCardNumber", + "HRNationalIDNumber", + "HRPersonalIdentificationNumber", + "HRPersonalIdentificationOIBNumberV2", + "CYIdentityCard", + "CYTaxIdentificationNumber", + "CZPersonalIdentityNumber", + "CZPersonalIdentityV2", + "DKPersonalIdentificationNumber", + "DKPersonalIdentificationV2", + "DrugEnforcementAgencyNumber", + "EEPersonalIdentificationCode", + "EUDebitCardNumber", + "EUDriversLicenseNumber", + "EUGPSCoordinates", + "EUNationalIdentificationNumber", + "EUPassportNumber", + "EUSocialSecurityNumber", + "EUTaxIdentificationNumber", + "FIEuropeanHealthNumber", + "FINationalID", + "FINationalIDV2", + "FIPassportNumber", + "FRDriversLicenseNumber", + "FRHealthInsuranceNumber", + "FRNationalID", + "FRPassportNumber", + "FRSocialSecurityNumber", + "FRTaxIdentificationNumber", + "FRValueAddedTaxNumber", + "DEDriversLicenseNumber", + "DEPassportNumber", + "DEIdentityCardNumber", + "DETaxIdentificationNumber", + "DEValueAddedNumber", + "GRNationalIDCard", + "GRNationalIDV2", + "GRTaxIdentificationNumber", + "HKIdentityCardNumber", + "HUValueAddedNumber", + "HUPersonalIdentificationNumber", + "HUTaxIdentificationNumber", + "INPermanentAccount", + "INUniqueIdentificationNumber", + "IDIdentityCardNumber", + "InternationalBankingAccountNumber", + "IEPersonalPublicServiceNumber", + "IEPersonalPublicServiceNumberV2", + "ILBankAccountNumber", + "ILNationalID", + "ITDriversLicenseNumber", + "ITFiscalCode", + "ITValueAddedTaxNumber", + "JPBankAccountNumber", + "JPDriversLicenseNumber", + "JPPassportNumber", + "JPResidentRegistrationNumber", + "JPSocialInsuranceNumber", + "JPMyNumberCorporate", + "JPMyNumberPersonal", + "JPResidenceCardNumber", + "LVPersonalCode", + "LTPersonalCode", + "LUNationalIdentificationNumberNatural", + "LUNationalIdentificationNumberNonNatural", + "MYIdentityCardNumber", + "MTIdentityCardNumber", + "MTTaxIDNumber", + "NLCitizensServiceNumber", + "NLCitizensServiceNumberV2", + "NLTaxIdentificationNumber", + "NLValueAddedTaxNumber", + "NZBankAccountNumber", + "NZDriversLicenseNumber", + "NZInlandRevenueNumber", + "NZMinistryOfHealthNumber", + "NZSocialWelfareNumber", + "NOIdentityNumber", + "PHUnifiedMultiPurposeIDNumber", + "PLIdentityCard", + "PLNationalID", + "PLNationalIDV2", + "PLPassportNumber", + "PLTaxIdentificationNumber", + "PLREGONNumber", + "PTCitizenCardNumber", + "PTCitizenCardNumberV2", + "PTTaxIdentificationNumber", + "ROPersonalNumericalCode", + "RUPassportNumberDomestic", + "RUPassportNumberInternational", + "SANationalID", + "SGNationalRegistrationIdentityCardNumber", + "SKPersonalNumber", + "SITaxIdentificationNumber", + "SIUniqueMasterCitizenNumber", + "ZAIdentificationNumber", + "KRResidentRegistrationNumber", + "ESDNI", + "ESSocialSecurityNumber", + "ESTaxIdentificationNumber", + "SQLServerConnectionString", + "SENationalID", + "SENationalIDV2", + "SEPassportNumber", + "SETaxIdentificationNumber", + "SWIFTCode", + "CHSocialSecurityNumber", + "TWNationalID", + "TWPassportNumber", + "TWResidentCertificate", + "THPopulationIdentificationCode", + "TRNationalIdentificationNumber", + "UKDriversLicenseNumber", + "UKElectoralRollNumber", + "UKNationalHealthNumber", + "UKNationalInsuranceNumber", + "UKUniqueTaxpayerNumber", + "USUKPassportNumber", + "USBankAccountNumber", + "USDriversLicenseNumber", + "USIndividualTaxpayerIdentification", + "USSocialSecurityNumber", + "UAPassportNumberDomestic", + "UAPassportNumberInternational", + "Organization", + "Email", + "URL", + "Age", + "PhoneNumber", + "IPAddress", + "Date", + "Person", + "Address", + "All", + "Default" + ] + }, + "name": "piiCategories", + "required": false, + "type": "array", + "uniqueItems": true, + "x-ms-parameter-location": "method" + }, + "JobId": { + "description": "Job ID", + "format": "uuid", + "in": "path", + "name": "jobId", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "AnalyzeJobId": { + "description": "Job ID for Analyze", + "in": "path", + "name": "jobId", + "required": true, + "type": "string", + "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" + }, + "LoggingOptOut": { + "name": "loggingOptOut", + "in": "query", + "description": "(Optional) If set to true, you opt-out of having your text input logged for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to allow for troubleshooting issues in providing you with the Text Analytics natural language processing functions. Setting this parameter to true, disables input logging and may limit our ability to remediate issues that occur. Please see Cognitive Services Compliance and Privacy notes at https://aka.ms/cs-compliance for additional details, and Microsoft Responsible AI principles at https://www.microsoft.com/en-us/ai/responsible-ai.", + "type": "boolean", + "required": false, + "x-ms-parameter-location": "method" + }, + "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" + }, + "LanguageInput": { + "in": "body", + "name": "input", + "description": "Collection of documents to analyze for language endpoint.", + "required": true, + "schema": { + "$ref": "#/definitions/LanguageBatchInput" + }, + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.2-preview.2/examples/SuccessfulAnalyzeRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.2-preview.2/examples/SuccessfulAnalyzeRequest.json new file mode 100644 index 000000000000..0e27c771f244 --- /dev/null +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.2-preview.2/examples/SuccessfulAnalyzeRequest.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "ApiVersion": "v3.2-preview.2", + "Endpoint": "{Endpoint}", + "jobId": "{Job ID}", + "input": { + "displayName": "Extracting Location & US Region", + "analysisInput": { + "documents": [ + { + "id": "1", + "language": "en", + "text": "I had a wonderful trip to Seattle last week." + }, + { + "id": "2", + "language": "en", + "text": "I'm flying to NYC tomorrow. See you there." + } + ] + }, + "tasks": { + "entityRecognitionTasks": [ + { + "parameters": { + "model-version": "latest" + } + } + ] + } + } + }, + "responses": { + "202": { + "headers": { + "Operation-Location": "{endpoint}/text/analytics/v3.2-preview.2/analyze/jobs/{jobId}" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.2-preview.2/examples/SuccessfulAnalyzeStatusRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.2-preview.2/examples/SuccessfulAnalyzeStatusRequest.json new file mode 100644 index 000000000000..12650b876e60 --- /dev/null +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.2-preview.2/examples/SuccessfulAnalyzeStatusRequest.json @@ -0,0 +1,91 @@ +{ + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "ApiVersion": "v3.2-preview.2", + "Endpoint": "{Endpoint}", + "jobId": "{Job ID}" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "createdDateTime": "2020-10-01T15:00:45Z", + "displayName": "Extracting Location & US Region", + "expirationDateTime": "2020-10-03T15:01:03Z", + "jobId": "c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18", + "lastUpdateDateTime": "2020-10-01T15:01:03Z", + "status": "succeeded", + "tasks": { + "completed": 2, + "failed": 0, + "inProgress": 0, + "total": 2, + "entityRecognitionTasks": [ + { + "taskName": "Recognize Entities (2020-04-01)", + "lastUpdateDateTime": "2020-10-01T15:01:03Z", + "status": "succeeded", + "results": { + "documents": [ + { + "entities": [ + { + "category": "Event", + "confidenceScore": 0.61, + "length": 4, + "offset": 18, + "text": "trip" + }, + { + "category": "Location", + "confidenceScore": 0.82, + "length": 7, + "offset": 26, + "subcategory": "GPE", + "text": "Seattle" + }, + { + "category": "DateTime", + "confidenceScore": 0.8, + "length": 9, + "offset": 34, + "subcategory": "DateRange", + "text": "last week" + } + ], + "id": "1", + "warnings": [] + }, + { + "entities": [ + { + "category": "Location", + "confidenceScore": 0.52, + "length": 3, + "offset": 14, + "subcategory": "GPE", + "text": "NYC" + }, + { + "category": "DateTime", + "confidenceScore": 0.8, + "length": 8, + "offset": 18, + "subcategory": "Date", + "text": "tomorrow" + } + ], + "id": "2", + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2020-04-01" + } + } + ] + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.2-preview.2/examples/SuccessfulEntitiesRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.2-preview.2/examples/SuccessfulEntitiesRequest.json new file mode 100644 index 000000000000..0411014e8ca1 --- /dev/null +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.2-preview.2/examples/SuccessfulEntitiesRequest.json @@ -0,0 +1,73 @@ +{ + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "ApiVersion": "v3.2-preview.2", + "Endpoint": "{Endpoint}", + "input": { + "documents": [ + { + "id": "1", + "language": "en", + "text": "Microsoft was founded by Bill Gates and Paul Allen." + }, + { + "id": "2", + "language": "en", + "text": "Pike place market is my favorite Seattle attraction." + } + ] + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "documents": [ + { + "entities": [ + { + "category": "Organization", + "confidenceScore": 0.84, + "length": 9, + "offset": 0, + "text": "Microsoft" + }, + { + "category": "Person", + "confidenceScore": 0.85, + "length": 10, + "offset": 25, + "text": "Bill Gates" + }, + { + "category": "Person", + "confidenceScore": 0.9, + "length": 10, + "offset": 40, + "text": "Paul Allen" + } + ], + "id": "1", + "warnings": [] + }, + { + "entities": [ + { + "category": "Location", + "confidenceScore": 0.55, + "length": 7, + "offset": 33, + "subcategory": "GPE", + "text": "Seattle" + } + ], + "id": "2", + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2020-04-01" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.2-preview.2/examples/SuccessfulEntityLinkingRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.2-preview.2/examples/SuccessfulEntityLinkingRequest.json new file mode 100644 index 000000000000..0cdc8583aaa7 --- /dev/null +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.2-preview.2/examples/SuccessfulEntityLinkingRequest.json @@ -0,0 +1,119 @@ +{ + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "ApiVersion": "v3.2-preview.2", + "Endpoint": "{Endpoint}", + "input": { + "documents": [ + { + "id": "1", + "language": "en", + "text": "Microsoft was founded by Bill Gates and Paul Allen." + }, + { + "id": "2", + "language": "en", + "text": "Pike place market is my favorite Seattle attraction." + } + ] + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "documents": [ + { + "entities": [ + { + "dataSource": "Wikipedia", + "id": "Bill Gates", + "language": "en", + "matches": [ + { + "confidenceScore": 0.52, + "length": 10, + "offset": 25, + "text": "Bill Gates" + } + ], + "name": "Bill Gates", + "url": "https://en.wikipedia.org/wiki/Bill_Gates" + }, + { + "dataSource": "Wikipedia", + "id": "Paul Allen", + "language": "en", + "matches": [ + { + "confidenceScore": 0.54, + "length": 10, + "offset": 40, + "text": "Paul Allen" + } + ], + "name": "Paul Allen", + "url": "https://en.wikipedia.org/wiki/Paul_Allen" + }, + { + "dataSource": "Wikipedia", + "id": "Microsoft", + "language": "en", + "matches": [ + { + "confidenceScore": 0.49, + "length": 9, + "offset": 0, + "text": "Microsoft" + } + ], + "name": "Microsoft", + "url": "https://en.wikipedia.org/wiki/Microsoft" + } + ], + "id": "1", + "warnings": [] + }, + { + "entities": [ + { + "dataSource": "Wikipedia", + "id": "Pike Place Market", + "language": "en", + "matches": [ + { + "confidenceScore": 0.86, + "length": 17, + "offset": 0, + "text": "Pike place market" + } + ], + "name": "Pike Place Market", + "url": "https://en.wikipedia.org/wiki/Pike_Place_Market" + }, + { + "dataSource": "Wikipedia", + "id": "Seattle", + "language": "en", + "matches": [ + { + "confidenceScore": 0.27, + "length": 7, + "offset": 33, + "text": "Seattle" + } + ], + "name": "Seattle", + "url": "https://en.wikipedia.org/wiki/Seattle" + } + ], + "id": "2", + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2020-02-01" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.2-preview.2/examples/SuccessfulEntityPIIRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.2-preview.2/examples/SuccessfulEntityPIIRequest.json new file mode 100644 index 000000000000..a0f057d9a862 --- /dev/null +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.2-preview.2/examples/SuccessfulEntityPIIRequest.json @@ -0,0 +1,79 @@ +{ + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "ApiVersion": "v3.2-preview.2", + "Endpoint": "{Endpoint}", + "input": { + "documents": [ + { + "id": "1", + "language": "en", + "text": "My SSN is 859-98-0987" + }, + { + "id": "2", + "language": "en", + "text": "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check." + }, + { + "id": "3", + "language": "en", + "text": "Is 998.214.865-68 your Brazilian CPF number?" + } + ] + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "documents": [ + { + "id": "1", + "redactedText": "My SSN is ***********", + "entities": [ + { + "category": "U.S. Social Security Number (SSN)", + "confidenceScore": 0.65, + "length": 11, + "offset": 28, + "text": "859-98-0987" + } + ], + "warnings": [] + }, + { + "id": "2", + "redactedText": "Your ABA number - ********* - is the first 9 digits in the lower left hand corner of your personal check.", + "entities": [ + { + "category": "ABA Routing Number", + "confidenceScore": 0.75, + "length": 9, + "offset": 18, + "text": "111000025" + } + ], + "warnings": [] + }, + { + "id": "3", + "redactedText": "Is ************** your Brazilian CPF number?", + "entities": [ + { + "category": "Brazil CPF Number", + "confidenceScore": 0.85, + "length": 14, + "offset": 3, + "text": "998.214.865-68" + } + ], + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2019-10-01" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.2-preview.2/examples/SuccessfulHealthDeleteRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.2-preview.2/examples/SuccessfulHealthDeleteRequest.json new file mode 100644 index 000000000000..1d2e2d1db2df --- /dev/null +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.2-preview.2/examples/SuccessfulHealthDeleteRequest.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "ApiVersion": "v3.2-preview.2", + "Endpoint": "{Endpoint}", + "jobId": "{Job ID}" + }, + "responses": { + "202": { + "headers": { + "Operation-Location": "{endpoint}/text/analytics/v3.2-preview.2/entities/healthcare/jobs/{jobId}" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.2-preview.2/examples/SuccessfulHealthRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.2-preview.2/examples/SuccessfulHealthRequest.json new file mode 100644 index 000000000000..a63a59eab294 --- /dev/null +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.2-preview.2/examples/SuccessfulHealthRequest.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "ApiVersion": "v3.2-preview.2", + "Endpoint": "{Endpoint}", + "jobId": "{Job ID}", + "input": { + "documents": [ + { + "id": "1", + "language": "en", + "text": "Subject is taking 100mg of ibuprofen twice daily." + } + ] + } + }, + "responses": { + "202": { + "headers": { + "Operation-Location": "{endpoint}/text/analytics/v3.2-preview.2/entities/healthcare/jobs/{jobId}" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.2-preview.2/examples/SuccessfulHealthStatusRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.2-preview.2/examples/SuccessfulHealthStatusRequest.json new file mode 100644 index 000000000000..343b2b5b45a7 --- /dev/null +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.2-preview.2/examples/SuccessfulHealthStatusRequest.json @@ -0,0 +1,206 @@ +{ + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "ApiVersion": "v3.2-preview.2", + "Endpoint": "{Endpoint}", + "jobId": "{Job ID}" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "createdDateTime": "2020-10-01T15:01:03Z", + "expirationDateTime": "2020-10-03T15:01:03Z", + "jobId": "c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18", + "lastUpdateDateTime": "2020-10-01T15:01:03Z", + "status": "succeeded", + "results": { + "documents": [ + { + "id": "1", + "entities": [ + { + "offset": 18, + "length": 5, + "text": "100mg", + "category": "DOSAGE", + "confidenceScore": 0.99 + }, + { + "offset": 27, + "length": 9, + "text": "ibuprofen", + "category": "MEDICATION_NAME", + "confidenceScore": 1.0, + "assertion": { + "certainty": "positive" + }, + "links": [ + { + "id": "C0020740", + "dataSource": "UMLS" + }, + { + "id": "0000019879", + "dataSource": "AOD" + }, + { + "id": "M01AE01", + "dataSource": "ATC" + }, + { + "id": "0046165", + "dataSource": "CCPSS" + }, + { + "id": "0000006519", + "dataSource": "CHV" + }, + { + "id": "2270-2077", + "dataSource": "CSP" + }, + { + "id": "DB01050", + "dataSource": "DRUGBANK" + }, + { + "id": "1611", + "dataSource": "GS" + }, + { + "id": "sh97005926", + "dataSource": "LCH_NW" + }, + { + "id": "LP16165-0", + "dataSource": "LNC" + }, + { + "id": "40458", + "dataSource": "MEDCIN" + }, + { + "id": "d00015", + "dataSource": "MMSL" + }, + { + "id": "D007052", + "dataSource": "MSH" + }, + { + "id": "WK2XYI10QM", + "dataSource": "MTHSPL" + }, + { + "id": "C561", + "dataSource": "NCI" + }, + { + "id": "C561", + "dataSource": "NCI_CTRP" + }, + { + "id": "00803", + "dataSource": "NCI_DCP" + }, + { + "id": "NSC0256857", + "dataSource": "NCI_DTP" + }, + { + "id": "WK2XYI10QM", + "dataSource": "NCI_FDA" + }, + { + "id": "CDR0000613511", + "dataSource": "NCI_NCI-GLOSS" + }, + { + "id": "002377", + "dataSource": "NDDF" + }, + { + "id": "CDR0000040475", + "dataSource": "PDQ" + }, + { + "id": "x02MO", + "dataSource": "RCD" + }, + { + "id": "5640", + "dataSource": "RXNORM" + }, + { + "id": "E-7772", + "dataSource": "SNM" + }, + { + "id": "C-603C0", + "dataSource": "SNMI" + }, + { + "id": "387207008", + "dataSource": "SNOMEDCT_US" + }, + { + "id": "m39860", + "dataSource": "USP" + }, + { + "id": "MTHU000060", + "dataSource": "USPMG" + }, + { + "id": "4017840", + "dataSource": "VANDF" + } + ] + }, + { + "offset": 37, + "length": 11, + "text": "twice daily", + "category": "FREQUENCY", + "confidenceScore": 1 + } + ], + "relations": [ + { + "relationType": "DosageOfMedication", + "entities": [ + { + "ref": "#/documents/0/entities/0", + "role": "Attribute" + }, + { + "ref": "#/documents/0/entities/1", + "role": "Entity" + } + ] + }, + { + "relationType": "FrequencyOfMedication", + "entities": [ + { + "ref": "#/documents/0/entities/2", + "role": "Attribute" + }, + { + "ref": "#/documents/0/entities/1", + "role": "Entity" + } + ] + } + ], + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2020-05-08" + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.2-preview.2/examples/SuccessfulKeyPhrasesRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.2-preview.2/examples/SuccessfulKeyPhrasesRequest.json new file mode 100644 index 000000000000..7459fdea7a3b --- /dev/null +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.2-preview.2/examples/SuccessfulKeyPhrasesRequest.json @@ -0,0 +1,62 @@ +{ + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "ApiVersion": "v3.2-preview.2", + "Endpoint": "{Endpoint}", + "input": { + "documents": [ + { + "id": "1", + "language": "en", + "text": "Microsoft was founded by Bill Gates and Paul Allen." + }, + { + "id": "2", + "language": "en", + "text": "Text Analytics is one of the Azure Cognitive Services." + }, + { + "id": "3", + "language": "en", + "text": "My cat might need to see a veterinarian." + } + ] + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "documents": [ + { + "id": "1", + "keyPhrases": [ + "Bill Gates", + "Paul Allen", + "Microsoft" + ], + "warnings": [] + }, + { + "id": "2", + "keyPhrases": [ + "Azure Cognitive Services", + "Text Analytics" + ], + "warnings": [] + }, + { + "id": "3", + "keyPhrases": [ + "cat", + "veterinarian" + ], + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2019-10-01" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.2-preview.2/examples/SuccessfulLanguagesRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.2-preview.2/examples/SuccessfulLanguagesRequest.json new file mode 100644 index 000000000000..e5af200192be --- /dev/null +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.2-preview.2/examples/SuccessfulLanguagesRequest.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "ApiVersion": "v3.2-preview.2", + "Endpoint": "{Endpoint}", + "input": { + "documents": [ + { + "id": "1", + "text": "Hello world" + }, + { + "id": "2", + "text": "Bonjour tout le monde" + }, + { + "id": "3", + "text": "Hola mundo" + } + ] + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "documents": [ + { + "detectedLanguage": { + "confidenceScore": 1, + "iso6391Name": "en", + "name": "English" + }, + "id": "1", + "warnings": [] + }, + { + "detectedLanguage": { + "confidenceScore": 1, + "iso6391Name": "fr", + "name": "French" + }, + "id": "2", + "warnings": [] + }, + { + "detectedLanguage": { + "confidenceScore": 1, + "iso6391Name": "es", + "name": "Spanish" + }, + "id": "3", + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2020-04-01" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.2-preview.2/examples/SuccessfulSentimentRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.2-preview.2/examples/SuccessfulSentimentRequest.json new file mode 100644 index 000000000000..04ea896c843b --- /dev/null +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.2-preview.2/examples/SuccessfulSentimentRequest.json @@ -0,0 +1,139 @@ +{ + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "ApiVersion": "v3.2-preview.2", + "Endpoint": "{Endpoint}", + "input": { + "documents": [ + { + "id": "1", + "language": "en", + "text": "Great atmosphere. Close to plenty of restaurants, hotels, and transit! Staff are friendly and helpful." + } + ] + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "documents": [ + { + "confidenceScores": { + "negative": 0, + "neutral": 0, + "positive": 1 + }, + "id": "1", + "sentences": [ + { + "targets": [ + { + "confidenceScores": { + "negative": 0, + "positive": 1 + }, + "length": 10, + "offset": 6, + "relations": [ + { + "ref": "#/documents/0/sentences/0/assessments/0", + "relationType": "assessment" + } + ], + "sentiment": "positive", + "text": "atmosphere" + } + ], + "confidenceScores": { + "negative": 0, + "neutral": 0, + "positive": 1 + }, + "length": 17, + "offset": 0, + "assessments": [ + { + "confidenceScores": { + "negative": 0, + "positive": 1 + }, + "isNegated": false, + "length": 5, + "offset": 0, + "sentiment": "positive", + "text": "great" + } + ], + "sentiment": "positive", + "text": "Great atmosphere." + }, + { + "targets": [ + { + "confidenceScores": { + "negative": 0.01, + "positive": 0.99 + }, + "length": 11, + "offset": 37, + "relations": [ + { + "ref": "#/documents/0/sentences/1/assessments/0", + "relationType": "assessment" + } + ], + "sentiment": "positive", + "text": "restaurants" + }, + { + "confidenceScores": { + "negative": 0.01, + "positive": 0.99 + }, + "length": 6, + "offset": 50, + "relations": [ + { + "ref": "#/documents/0/sentences/1/assessments/0", + "relationType": "assessment" + } + ], + "sentiment": "positive", + "text": "hotels" + } + ], + "confidenceScores": { + "negative": 0.01, + "neutral": 0.86, + "positive": 0.13 + }, + "length": 52, + "offset": 18, + "assessments": [ + { + "confidenceScores": { + "negative": 0.01, + "positive": 0.99 + }, + "isNegated": false, + "length": 15, + "offset": 18, + "sentiment": "positive", + "text": "Close to plenty" + } + ], + "sentiment": "neutral", + "text": "Close to plenty of restaurants, hotels, and transit!" + } + ], + "sentiment": "positive", + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2020-04-01" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/readme.md b/specification/cognitiveservices/data-plane/TextAnalytics/readme.md index 7539842e2c81..cfd9ac31ead0 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/readme.md +++ b/specification/cognitiveservices/data-plane/TextAnalytics/readme.md @@ -132,6 +132,14 @@ These settings apply only when `--tag=release_3_2_preview.1` is specified on the input-file: preview/v3.2-preview.1/TextAnalytics.json ``` +### Release 3.2-preview.2 + +These settings apply only when `--tag=release_3_2_preview.2` is specified on the command line. + +``` yaml $(tag) == 'release_3_2_preview.2' +input-file: preview/v3.2-preview.2/TextAnalytics.json +``` + ## Swagger to SDK This section describes what SDK should be generated by the automatic system.