From 79dc36babd86de8dadc972b8bd71b3ae81a89b12 Mon Sep 17 00:00:00 2001 From: tarun Date: Wed, 4 Mar 2020 14:02:25 -0800 Subject: [PATCH] added warnings --- .../stable/v3.0/TextAnalytics.json | 275 +++++------------- .../examples/SuccessfulEntitiesRequest.json | 11 +- .../SuccessfulEntityLinkingRequest.json | 11 +- .../examples/SuccessfulEntityPIIRequest.json | 11 +- .../examples/SuccessfulKeyPhrasesRequest.json | 11 +- .../examples/SuccessfulLanguagesRequest.json | 11 +- .../examples/SuccessfulSentimentRequest.json | 28 +- 7 files changed, 131 insertions(+), 227 deletions(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.0/TextAnalytics.json b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.0/TextAnalytics.json index 1202514132bb..de2dfdfe0e58 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.0/TextAnalytics.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.0/TextAnalytics.json @@ -37,14 +37,8 @@ "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" - ], + "consumes": [ "application/json", "text/json" ], + "produces": [ "application/json", "text/json" ], "parameters": [ { "name": "model-version", @@ -97,14 +91,8 @@ "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" - ], + "consumes": [ "application/json", "text/json" ], + "produces": [ "application/json", "text/json" ], "parameters": [ { "name": "model-version", @@ -155,14 +143,8 @@ "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" - ], + "consumes": [ "application/json", "text/json" ], + "produces": [ "application/json", "text/json" ], "parameters": [ { "name": "model-version", @@ -213,14 +195,8 @@ "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" - ], + "consumes": [ "application/json", "text/json" ], + "produces": [ "application/json", "text/json" ], "parameters": [ { "name": "model-version", @@ -271,14 +247,8 @@ "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" - ], + "consumes": [ "application/json", "text/json" ], + "produces": [ "application/json", "text/json" ], "parameters": [ { "name": "model-version", @@ -329,14 +299,8 @@ "summary": "Sentiment", "description": "The API returns a sentiment prediction, as well as sentiment scores for each sentiment class (Positive, Negative, and Neutral) for the document and each sentence within it. See the Supported languages in Text Analytics API for the list of enabled languages.", "operationId": "Sentiment", - "consumes": [ - "application/json", - "text/json" - ], - "produces": [ - "application/json", - "text/json" - ], + "consumes": [ "application/json", "text/json" ], + "produces": [ "application/json", "text/json" ], "parameters": [ { "name": "model-version", @@ -386,9 +350,7 @@ "definitions": { "MultiLanguageBatchInput": { "type": "object", - "required": [ - "documents" - ], + "required": [ "documents" ], "properties": { "documents": { "type": "array", @@ -402,10 +364,7 @@ }, "MultiLanguageInput": { "type": "object", - "required": [ - "id", - "text" - ], + "required": [ "id", "text" ], "properties": { "id": { "type": "string", @@ -424,10 +383,7 @@ }, "DocumentError": { "type": "object", - "required": [ - "id", - "error" - ], + "required": [ "id", "error" ], "properties": { "id": { "type": "string", @@ -442,19 +398,11 @@ }, "TextAnalyticsError": { "type": "object", - "required": [ - "code", - "message" - ], + "required": [ "code", "message" ], "properties": { "code": { "type": "string", - "enum": [ - "invalidRequest", - "invalidArgument", - "internalServerError", - "serviceUnavailable" - ], + "enum": [ "invalidRequest", "invalidArgument", "internalServerError", "serviceUnavailable" ], "x-ms-enum": { "name": "ErrorCodeValue", "modelAsString": false @@ -484,24 +432,11 @@ }, "InnerError": { "type": "object", - "required": [ - "code", - "message" - ], + "required": [ "code", "message" ], "properties": { "code": { "type": "string", - "enum": [ - "invalidParameterValue", - "invalidRequestBodyFormat", - "emptyRequest", - "missingInputRecords", - "invalidDocument", - "modelVersionIncorrect", - "invalidDocumentBatch", - "unsupportedLanguageCode", - "invalidCountryHint" - ], + "enum": [ "invalidParameterValue", "invalidRequestBodyFormat", "emptyRequest", "missingInputRecords", "invalidDocument", "modelVersionIncorrect", "invalidDocumentBatch", "unsupportedLanguageCode", "invalidCountryHint" ], "x-ms-enum": { "name": "InnerErrorCodeValue", "modelAsString": false @@ -531,11 +466,7 @@ }, "SentimentResponse": { "type": "object", - "required": [ - "documents", - "errors", - "modelVersion" - ], + "required": [ "documents", "errors", "modelVersion" ], "properties": { "documents": { "type": "array", @@ -562,12 +493,7 @@ }, "DocumentSentiment": { "type": "object", - "required": [ - "id", - "sentiment", - "documentScores", - "sentences" - ], + "required": [ "id", "sentiment", "documentScores", "sentences", "warnings" ], "properties": { "id": { "type": "string", @@ -576,12 +502,7 @@ "sentiment": { "type": "string", "description": "Predicted sentiment for document (Negative, Neutral, Positive, or Mixed).", - "enum": [ - "positive", - "neutral", - "negative", - "mixed" - ], + "enum": [ "positive", "neutral", "negative", "mixed" ], "x-ms-enum": { "name": "DocumentSentimentValue", "modelAsString": false @@ -600,17 +521,19 @@ "items": { "$ref": "#/definitions/SentenceSentiment" } + }, + "warnings": { + "type": "array", + "description": "Warnings encountered while processing document.", + "items": { + "$ref": "#/definitions/TextAnalyticsError" + } } } }, "RequestStatistics": { "type": "object", - "required": [ - "documentsCount", - "validDocumentsCount", - "erroneousDocumentsCount", - "transactionsCount" - ], + "required": [ "documentsCount", "validDocumentsCount", "erroneousDocumentsCount", "transactionsCount" ], "properties": { "documentsCount": { "type": "integer", @@ -637,10 +560,7 @@ }, "DocumentStatistics": { "type": "object", - "required": [ - "charactersCount", - "transactionsCount" - ], + "required": [ "charactersCount", "transactionsCount" ], "properties": { "charactersCount": { "type": "integer", @@ -657,11 +577,7 @@ }, "SentimentConfidenceScorePerLabel": { "type": "object", - "required": [ - "positive", - "neutral", - "negative" - ], + "required": [ "positive", "neutral", "negative" ], "properties": { "positive": { "type": "number", @@ -680,21 +596,12 @@ }, "SentenceSentiment": { "type": "object", - "required": [ - "sentiment", - "sentenceScores", - "offset", - "length" - ], + "required": [ "sentiment", "sentenceScores", "offset", "length", "warnings" ], "properties": { "sentiment": { "type": "string", "description": "The predicted Sentiment for the sentence.", - "enum": [ - "positive", - "neutral", - "negative" - ], + "enum": [ "positive", "neutral", "negative" ], "x-ms-enum": { "name": "SentenceSentimentValue", "modelAsString": false @@ -716,20 +623,16 @@ }, "warnings": { "type": "array", - "description": "The warnings generated for the sentence.", + "description": "Warnings encountered while processing sentence.", "items": { - "type": "string" + "$ref": "#/definitions/TextAnalyticsError" } } } }, "EntitiesResult": { "type": "object", - "required": [ - "documents", - "errors", - "modelVersion" - ], + "required": [ "documents", "errors", "modelVersion" ], "properties": { "documents": { "type": "array", @@ -756,10 +659,7 @@ }, "DocumentEntities": { "type": "object", - "required": [ - "id", - "entities" - ], + "required": [ "id", "entities", "warnings" ], "properties": { "id": { "type": "string", @@ -772,6 +672,13 @@ "$ref": "#/definitions/Entity" } }, + "warnings": { + "type": "array", + "description": "Warnings encountered while processing document.", + "items": { + "$ref": "#/definitions/TextAnalyticsError" + } + }, "statistics": { "description": "if showStats=true was specified in the request this field will contain information about the document payload.", "$ref": "#/definitions/DocumentStatistics" @@ -780,13 +687,7 @@ }, "Entity": { "type": "object", - "required": [ - "text", - "type", - "offset", - "length", - "score" - ], + "required": [ "text", "type", "offset", "length", "score" ], "properties": { "text": { "type": "string", @@ -819,11 +720,7 @@ }, "EntityLinkingResult": { "type": "object", - "required": [ - "documents", - "errors", - "modelVersion" - ], + "required": [ "documents", "errors", "modelVersion" ], "properties": { "documents": { "type": "array", @@ -850,10 +747,7 @@ }, "DocumentLinkedEntities": { "type": "object", - "required": [ - "id", - "entities" - ], + "required": [ "id", "entities", "warnings" ], "properties": { "id": { "type": "string", @@ -866,6 +760,13 @@ "$ref": "#/definitions/LinkedEntity" } }, + "warnings": { + "type": "array", + "description": "Warnings encountered while processing document.", + "items": { + "$ref": "#/definitions/TextAnalyticsError" + } + }, "statistics": { "description": "if showStats=true was specified in the request this field will contain information about the document payload.", "$ref": "#/definitions/DocumentStatistics" @@ -874,13 +775,7 @@ }, "LinkedEntity": { "type": "object", - "required": [ - "name", - "matches", - "language", - "url", - "dataSource" - ], + "required": [ "name", "matches", "language", "url", "dataSource" ], "properties": { "name": { "type": "string", @@ -913,12 +808,7 @@ }, "Match": { "type": "object", - "required": [ - "score", - "text", - "offset", - "length" - ], + "required": [ "score", "text", "offset", "length" ], "properties": { "score": { "type": "number", @@ -943,11 +833,7 @@ }, "KeyPhraseResult": { "type": "object", - "required": [ - "documents", - "errors", - "modelVersion" - ], + "required": [ "documents", "errors", "modelVersion" ], "properties": { "documents": { "type": "array", @@ -974,10 +860,7 @@ }, "DocumentKeyPhrases": { "type": "object", - "required": [ - "id", - "keyPhrases" - ], + "required": [ "id", "keyPhrases", "warnings" ], "properties": { "id": { "type": "string", @@ -990,6 +873,13 @@ "type": "string" } }, + "warnings": { + "type": "array", + "description": "Warnings encountered while processing document.", + "items": { + "$ref": "#/definitions/TextAnalyticsError" + } + }, "statistics": { "description": "if showStats=true was specified in the request this field will contain information about the document payload.", "$ref": "#/definitions/DocumentStatistics" @@ -998,9 +888,7 @@ }, "LanguageBatchInput": { "type": "object", - "required": [ - "documents" - ], + "required": [ "documents" ], "properties": { "documents": { "type": "array", @@ -1012,10 +900,7 @@ }, "LanguageInput": { "type": "object", - "required": [ - "id", - "text" - ], + "required": [ "id", "text" ], "properties": { "id": { "type": "string", @@ -1031,11 +916,7 @@ }, "LanguageResult": { "type": "object", - "required": [ - "documents", - "errors", - "modelVersion" - ], + "required": [ "documents", "errors", "modelVersion" ], "properties": { "documents": { "type": "array", @@ -1062,10 +943,7 @@ }, "DocumentLanguage": { "type": "object", - "required": [ - "id", - "detectedLanguages" - ], + "required": [ "id", "detectedLanguages", "warnings" ], "properties": { "id": { "type": "string", @@ -1078,6 +956,13 @@ "$ref": "#/definitions/DetectedLanguage" } }, + "warnings": { + "type": "array", + "description": "Warnings encountered while processing document.", + "items": { + "$ref": "#/definitions/TextAnalyticsError" + } + }, "statistics": { "description": "if showStats=true was specified in the request this field will contain information about the document payload.", "$ref": "#/definitions/DocumentStatistics" @@ -1086,11 +971,7 @@ }, "DetectedLanguage": { "type": "object", - "required": [ - "name", - "iso6391Name", - "score" - ], + "required": [ "name", "iso6391Name", "score" ], "properties": { "name": { "type": "string", diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.0/examples/SuccessfulEntitiesRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.0/examples/SuccessfulEntitiesRequest.json index babd6e22d296..1258b6df3035 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.0/examples/SuccessfulEntitiesRequest.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.0/examples/SuccessfulEntitiesRequest.json @@ -45,7 +45,8 @@ "length": 9, "score": 0.8 } - ] + ], + "warnings": [] }, { "id": "2", @@ -57,7 +58,8 @@ "length": 9, "score": 0.9998359680175781 } - ] + ], + "warnings": [] }, { "id": "3", @@ -77,11 +79,12 @@ "length": 1, "score": 0.8 } - ] + ], + "warnings": [] } ], "errors": [], - "modelVersion": "2019-10-01" + "modelVersion": "2020-04-01" } } } diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.0/examples/SuccessfulEntityLinkingRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.0/examples/SuccessfulEntityLinkingRequest.json index c58af39167b9..d159c9acc15f 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.0/examples/SuccessfulEntityLinkingRequest.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.0/examples/SuccessfulEntityLinkingRequest.json @@ -45,7 +45,8 @@ "url": "https://en.wikipedia.org/wiki/Seattle", "dataSource": "Wikipedia" } - ] + ], + "warnings": [] }, { "id": "2", @@ -65,7 +66,8 @@ "url": "https://en.wikipedia.org/wiki/Microsoft", "dataSource": "Wikipedia" } - ] + ], + "warnings": [] }, { "id": "3", @@ -85,11 +87,12 @@ "url": "https://en.wikipedia.org/wiki/Space_Needle", "dataSource": "Wikipedia" } - ] + ], + "warnings": [] } ], "errors": [], - "modelVersion": "2019-10-01" + "modelVersion": "2020-04-01" } } } diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.0/examples/SuccessfulEntityPIIRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.0/examples/SuccessfulEntityPIIRequest.json index 29cba30d10b6..50518bcdfde0 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.0/examples/SuccessfulEntityPIIRequest.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.0/examples/SuccessfulEntityPIIRequest.json @@ -38,7 +38,8 @@ "length": 11, "score": 0.65 } - ] + ], + "warnings": [] }, { "id": "1", @@ -51,7 +52,8 @@ "length": 9, "score": 0.75 } - ] + ], + "warnings": [] }, { "id": "2", @@ -64,11 +66,12 @@ "length": 14, "score": 0.85 } - ] + ], + "warnings": [] } ], "errors": [], - "modelVersion": "2019-10-01" + "modelVersion": "2020-04-01" } } } diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.0/examples/SuccessfulKeyPhrasesRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.0/examples/SuccessfulKeyPhrasesRequest.json index 4a61dd56c123..77ea9c553b0e 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.0/examples/SuccessfulKeyPhrasesRequest.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.0/examples/SuccessfulKeyPhrasesRequest.json @@ -32,13 +32,15 @@ "keyPhrases": [ "world", "input text" - ] + ], + "warnings": [] }, { "id": "2", "keyPhrases": [ "monde" - ] + ], + "warnings": [] }, { "id": "3", @@ -46,11 +48,12 @@ "carretera", "tráfico", "día" - ] + ], + "warnings": [] } ], "errors": [], - "modelVersion": "2019-10-01" + "modelVersion": "2020-04-01" } } } diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.0/examples/SuccessfulLanguagesRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.0/examples/SuccessfulLanguagesRequest.json index 071bf51ea8c9..7d33e45a4a22 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.0/examples/SuccessfulLanguagesRequest.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.0/examples/SuccessfulLanguagesRequest.json @@ -33,7 +33,8 @@ "iso6391Name": "en", "score": 1 } - ] + ], + "warnings": [] }, { "id": "2", @@ -43,7 +44,8 @@ "iso6391Name": "fr", "score": 1 } - ] + ], + "warnings": [] }, { "id": "3", @@ -53,11 +55,12 @@ "iso6391Name": "es", "score": 1 } - ] + ], + "warnings": [] } ], "errors": [], - "modelVersion": "2019-10-01" + "modelVersion": "2020-04-01" } } } diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.0/examples/SuccessfulSentimentRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.0/examples/SuccessfulSentimentRequest.json index a61d236644d0..80420a403ccd 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.0/examples/SuccessfulSentimentRequest.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.0/examples/SuccessfulSentimentRequest.json @@ -44,7 +44,8 @@ "negative": 0.0166865326464176 }, "offset": 0, - "length": 12 + "length": 12, + "warnings": [] }, { "sentiment": "positive", @@ -54,9 +55,11 @@ "negative": 0.000517153472174 }, "offset": 13, - "length": 36 + "length": 36, + "warnings": [] } - ] + ], + "warnings": [] }, { "id": "2", @@ -75,7 +78,8 @@ "negative": 0.0113849258050323 }, "offset": 0, - "length": 30 + "length": 30, + "warnings": [] }, { "sentiment": "positive", @@ -85,9 +89,11 @@ "negative": 0.0010774657130241 }, "offset": 31, - "length": 13 + "length": 13, + "warnings": [] } - ] + ], + "warnings": [] }, { "id": "3", @@ -106,14 +112,16 @@ "negative": 0.0015906029148027 }, "offset": 0, - "length": 52 + "length": 52, + "warnings": [] } - ] + ], + "warnings": [] } ], "errors": [], - "modelVersion": "2019-10-01" + "modelVersion": "2020-04-01" } } } -} +} \ No newline at end of file