From 2e25b7e776f00cdf28eb378967b4b48b79d73900 Mon Sep 17 00:00:00 2001 From: Han Li Date: Thu, 5 Sep 2019 01:26:16 -0700 Subject: [PATCH 01/62] add ta v3.0-preview.1 --- .../preview/v3.0-Preview.1/TextAnalytics.json | 1189 +++++++++++++++++ 1 file changed, 1189 insertions(+) create mode 100644 specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json new file mode 100644 index 000000000000..d0bac02602c9 --- /dev/null +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json @@ -0,0 +1,1189 @@ +{ + "swagger" : "2.0", + "info" : { + "description" : "The Text Analytics API is a suite of text analytics web services built with best-in-class Microsoft machine learning algorithms. \nThe API can be used to analyze unstructured text for tasks such as sentiment analysis, key phrase and entity extraction as well as language detection. \nNo training data is needed to use this API; just bring your text data. \nThis API uses advanced natural language processing techniques to deliver best in class predictions.\n\nFurther documentation can be found in https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/overview\n\nThis API is currently available in:\n\n* Australia East - australiaeast.api.cognitive.microsoft.com\n* Brazil South - brazilsouth.api.cognitive.microsoft.com\n* Canada Central - canadacentral.api.cognitive.microsoft.com\n* Central India - centralindia.api.cognitive.microsoft.com\n* Central US - centralus.api.cognitive.microsoft.com\n* East Asia - eastasia.api.cognitive.microsoft.com\n* East US - eastus.api.cognitive.microsoft.com\n* East US 2 - eastus2.api.cognitive.microsoft.com\n* France Central - francecentral.api.cognitive.microsoft.com\n* Japan East - japaneast.api.cognitive.microsoft.com\n* Japan West - japanwest.api.cognitive.microsoft.com\n* Korea Central - koreacentral.api.cognitive.microsoft.com\n* North Central US - northcentralus.api.cognitive.microsoft.com\n* North Europe - northeurope.api.cognitive.microsoft.com\n* South Africa North - southafricanorth.api.cognitive.microsoft.com\n* South Central US - southcentralus.api.cognitive.microsoft.com\n* Southeast Asia - southeastasia.api.cognitive.microsoft.com\n* UK South - uksouth.api.cognitive.microsoft.com\n* West Central US - westcentralus.api.cognitive.microsoft.com\n* West Europe - westeurope.api.cognitive.microsoft.com\n* West US - westus.api.cognitive.microsoft.com\n* West US 2 - westus2.api.cognitive.microsoft.com", + "version" : "V3.0-Preview.1", + "title" : "Text Analytics API (V3.0-Preview.1)" + }, + "host" : "westus.api.cognitive.microsoft.com", + "basePath" : "/text/analytics/V3.0-preview.1", + "tags" : [ ], + "schemes" : [ "https" ], + "security" : [ { + "apiKeyHeader" : [ ] + }, { + "apiKeyQuery" : [ ] + } ], + "paths" : { + "/entities" : { + "post" : { + "summary" : "Entities from open domain", + "description" : "The API returns a list of general named entities (\\\"Person\\\", \\\"Location\\\", \\\"Organization\\\" etc) in a given document. See the Supported Entity Types in Text Analytics API for the list of supported Entity Types. See the Supported languages in Text Analytics API for the list of enabled languages.\n", + "operationId" : "5ac4251d5b4ccd1554da7631", + "consumes" : [ "application/json", "text/json" ], + "produces" : [ "application/json", "text/json" ], + "parameters" : [ { + "name" : "modelVersion", + "in" : "query", + "description" : "(optional) This value indicates which model be used for scoring .", + "required" : false, + "type" : "string" + }, { + "name" : "showStats", + "in" : "query", + "description" : "(optional) if set to true, response will contain input and document level statistics.", + "required" : false, + "type" : "boolean" + }, { + "in" : "body", + "name" : "multiLanguageBatchInput", + "description" : "Collection of documents to analyze.", + "required" : false, + "schema" : { + "$ref" : "#/definitions/MultiLanguageBatchInput" + } + } ], + "responses" : { + "200" : { + "description" : "A successful call results in a list of recognized entities returned for each valid document", + "examples" : { + "application/json" : { + "documents" : [ { + "id" : "1", + "entities" : [ { + "text" : "Microsoft", + "type" : "Organization", + "offset" : 25, + "length" : 9 + } ] + }, { + "id" : "2", + "entities" : [ { + "text" : "John", + "type" : "Person", + "offset" : 25, + "length" : 9 + }, { + "text" : 20, + "type" : "Number", + "subType" : "Age", + "offset" : 30, + "length" : 2 + } ] + } ], + "errors" : [ ] + } + }, + "schema" : { + "$ref" : "#/definitions/EntitiesBatchResult" + } + }, + "500" : { + "description" : "Error Response", + "schema" : { + "$ref" : "#/definitions/ErrorResponse" + } + } + } + } + }, + "/entities/biomedical" : { + "post" : { + "summary" : "Entities from biomedical domain", + "description" : "The API returns a list of biomedical entities (\\\"Treatment\\\", \\\"Medication\\\", \\\"Dosage\\\" etc) in a given document. See the Supported languages in Text Analytics API for the list of enabled languages.\n", + "operationId" : "5ac4251d5b4ccd1554da7632", + "consumes" : [ "application/json", "text/json" ], + "produces" : [ "application/json", "text/json" ], + "parameters" : [ { + "name" : "modelVersion", + "in" : "query", + "description" : "(optional) This value indicates which model be used for scoring .", + "required" : false, + "type" : "string" + }, { + "name" : "showStats", + "in" : "query", + "description" : "(optional) if set to true, response will contain input and document level statistics.", + "required" : false, + "type" : "boolean" + }, { + "in" : "body", + "name" : "multiLanguageBatchInput", + "description" : "Collection of documents to analyze.", + "required" : false, + "schema" : { + "$ref" : "#/definitions/MultiLanguageBatchInput" + } + } ], + "responses" : { + "200" : { + "description" : "A successful call results in a list of recognized entities returned for each valid document", + "examples" : { + "application/json" : { + "documents" : [ { + "id" : "1", + "entities" : [ { + "text" : "100mg", + "type" : "Organization", + "offset" : 11, + "length" : 5 + }, { + "text" : "ibuprofen", + "type" : "Chemical", + "offset" : 17, + "length" : 9 + }, { + "text" : "twice daily", + "type" : "Frequency", + "offset" : 34, + "length" : 11 + } ], + "relations" : [ { + "target" : "TBD", + "source" : "TBD", + "relationType" : "TBD" + } ] + } ], + "errors" : [ ] + } + }, + "schema" : { + "$ref" : "#/definitions/BioEntitiesBatchResult" + } + }, + "500" : { + "description" : "Error Response", + "schema" : { + "$ref" : "#/definitions/ErrorResponse" + } + } + } + } + }, + "/entities/pii" : { + "post" : { + "summary" : "Entities from PII domain", + "description" : "The API returns a list of pii entities (\\\"SSN\\\", \\\"Bank Account\\\", \\\"Goverment ID\\\" etc) in a given document. See the Supported languages in Text Analytics API for the list of enabled languages.\n", + "operationId" : "5ac4251d5b4ccd1554da7633", + "consumes" : [ "application/json", "text/json" ], + "produces" : [ "application/json", "text/json" ], + "parameters" : [ { + "name" : "modelVersion", + "in" : "query", + "description" : "(optional) This value indicates which model be used for scoring .", + "required" : false, + "type" : "string" + }, { + "name" : "showStats", + "in" : "query", + "description" : "(optional) if set to true, response will contain input and document level statistics.", + "required" : false, + "type" : "boolean" + }, { + "in" : "body", + "name" : "multiLanguageBatchInput", + "description" : "Collection of documents to analyze.", + "required" : false, + "schema" : { + "$ref" : "#/definitions/MultiLanguageBatchInput" + } + } ], + "responses" : { + "200" : { + "description" : "A successful call results in a list of recognized entities returned for each valid document", + "examples" : { + "application/json" : { + "documents" : [ { + "id" : "1", + "entities" : [ { + "text" : "111-22-5555", + "type" : "SSN", + "offset" : 22, + "length" : 11 + }, { + "text" : "23902039I23J902RJ32", + "type" : "National_ID", + "subType" : "Country_ID", + "offset" : 20, + "length" : 55 + } ] + } ], + "errors" : [ ] + } + }, + "schema" : { + "$ref" : "#/definitions/EntitiesBatchResult" + } + }, + "500" : { + "description" : "Error Response", + "schema" : { + "$ref" : "#/definitions/ErrorResponse" + } + } + } + } + }, + "/entities/linking" : { + "post" : { + "summary" : "Well-known entities.", + "description" : "The API returns a list of recognized entities in a given document. To get even more information on each recognized entity we recommend using the Bing Entity Search API by querying for the recognized entities names. See the Supported languages in Text Analytics API.\n", + "operationId" : "5ac4251d5b4ccd1554da7635", + "consumes" : [ "application/json", "text/json" ], + "produces" : [ "application/json", "text/json" ], + "parameters" : [ { + "name" : "modelVersion", + "in" : "query", + "description" : "(optional) This value indicates which model be used for scoring .", + "required" : false, + "type" : "string" + }, { + "name" : "showStats", + "in" : "query", + "description" : "(optional) if set to true, response will contain input and document level statistics.", + "required" : false, + "type" : "boolean" + }, { + "in" : "body", + "name" : "multiLanguageBatchInput", + "description" : "Collection of documents to analyze.", + "required" : false, + "schema" : { + "$ref" : "#/definitions/MultiLanguageBatchInput" + } + } ], + "responses" : { + "200" : { + "description" : "A successful call results in a list of recognized entities returned for each valid document", + "examples" : { + "application/json" : { + "documents" : [ { + "id" : "1", + "entities" : [ { + "name" : "Microsoft", + "matches" : [ { + "wikipediaScore" : 0.9, + "text" : "MSFT", + "offset" : 0, + "length" : 4 + }, { + "wikipediaScore" : 0.8, + "text" : "Microsoft", + "offset" : 25, + "length" : 9 + } ], + "wikipediaLanguage" : "en", + "wikipediaId" : "Microsoft", + "wikipediaUrl" : "https://en.wikipedia.org/wiki/Microsoft", + "bingId" : "a093e9b9-90f5-a3d5-c4b8-5855e1b01f85" + }, { + "name" : "Windows 10", + "matches" : [ { + "wikipediaScore" : 0.8, + "text" : "Windows 10", + "offset" : 44, + "length" : 10 + } ], + "wikipediaLanguage" : "en", + "wikipediaId" : "Windows 10", + "wikipediaUrl" : "https://en.wikipedia.org/wiki/Windows_10", + "bingId" : "5f9fbd03-49c4-39ef-cc95-de83ab897b94" + } ] + }, { + "id" : "2", + "entities" : [ { + "name" : "Application programming interface", + "matches" : [ { + "wikipediaScore" : 0.8, + "text" : "API", + "offset" : 31, + "length" : 3 + } ], + "wikipediaLanguage" : "en", + "wikipediaId" : "Application programming interface", + "wikipediaUrl" : "https://en.wikipedia.org/wiki/Application_programming_interface", + "bingId" : "e8c1a257-7315-a482-c81d-202a0260e4ed" + }, { + "name" : "Microsoft", + "matches" : [ { + "wikipediaScore" : 0.8, + "text" : "Microsoft", + "offset" : 40, + "length" : 9 + } ], + "wikipediaLanguage" : "en", + "wikipediaId" : "Microsoft", + "wikipediaUrl" : "https://en.wikipedia.org/wiki/Microsoft", + "bingId" : "a093e9b9-90f5-a3d5-c4b8-5855e1b01f85" + } ] + } ], + "errors" : [ ] + } + }, + "schema" : { + "$ref" : "#/definitions/EntityLinkingBatchResult" + } + }, + "500" : { + "description" : "Error Response", + "schema" : { + "$ref" : "#/definitions/ErrorResponse" + } + } + } + } + }, + "/keyPhrases" : { + "post" : { + "summary" : "Key Phrases", + "description" : "The API returns a list of strings denoting the key talking points in the input text. See the Supported languages in Text Analytics API for the list of enabled languages.", + "operationId" : "56f30ceeeda5650db055a3c6", + "consumes" : [ "application/json", "text/json" ], + "produces" : [ "application/json", "text/json" ], + "parameters" : [ { + "name" : "modelVersion", + "in" : "query", + "description" : "(optional) This value indicates which model be used for scoring .", + "required" : false, + "type" : "string" + }, { + "name" : "showStats", + "in" : "query", + "description" : "(optional) if set to true, response will contain input and document level statistics.", + "required" : false, + "type" : "boolean" + }, { + "in" : "body", + "name" : "multiLanguageBatchInput", + "description" : "Collection of documents to analyze. Documents can now contain a language field to indicate the text language", + "required" : false, + "schema" : { + "$ref" : "#/definitions/MultiLanguageBatchInput" + } + } ], + "responses" : { + "200" : { + "description" : "A successful response results in 0 or more key phrases identified in each valid document", + "examples" : { + "application/json" : { + "documents" : [ { + "id" : "1", + "keyPhrases" : [ "world", "input text" ] + }, { + "id" : "2", + "keyPhrases" : [ "monde" ] + }, { + "id" : "3", + "keyPhrases" : [ "carretera", "tráfico", "día" ] + } ], + "errors" : [ ] + } + }, + "schema" : { + "$ref" : "#/definitions/KeyPhraseBatchResult" + } + }, + "500" : { + "description" : "Error Response", + "schema" : { + "$ref" : "#/definitions/ErrorResponse" + } + } + } + } + }, + "/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. A total of 120 languages are supported.", + "operationId" : "56f30ceeeda5650db055a3c7", + "consumes" : [ "application/json", "text/json" ], + "produces" : [ "application/json", "text/json" ], + "parameters" : [ { + "name" : "modelVersion", + "in" : "query", + "description" : "(optional) This value indicates which model be used for scoring .", + "required" : false, + "type" : "string" + }, { + "name" : "showStats", + "in" : "query", + "description" : "(optional) if set to true, response will contain input and document level statistics.", + "required" : false, + "type" : "boolean" + }, { + "in" : "body", + "name" : "languageBatchInput", + "description" : "Collection of documents to analyze.", + "required" : false, + "schema" : { + "$ref" : "#/definitions/LanguageBatchInput" + } + } ], + "responses" : { + "200" : { + "description" : "A successful call results in the detected language with the highest probability for each valid document", + "examples" : { + "application/json" : { + "documents" : [ { + "id" : "1", + "detectedLanguages" : [ { + "name" : "English", + "iso6391Name" : "en", + "score" : 1 + } ] + }, { + "id" : "2", + "detectedLanguages" : [ { + "name" : "French", + "iso6391Name" : "fr", + "score" : 1 + } ] + }, { + "id" : "3", + "detectedLanguages" : [ { + "name" : "Spanish", + "iso6391Name" : "es", + "score" : 1 + } ] + }, { + "id" : "4", + "detectedLanguages" : [ { + "name" : "(Unknown)", + "iso6391Name" : "(Unknown)", + "score" : 0 + } ] + } ], + "errors" : [ ] + } + }, + "schema" : { + "$ref" : "#/definitions/LanguageBatchResult" + } + }, + "500" : { + "description" : "Error Response", + "schema" : { + "$ref" : "#/definitions/ErrorResponse" + } + } + } + } + }, + "/sentiment" : { + "post" : { + "summary" : "Sentiment", + "description" : "The API returns a document sentiment prediction, as well as sentiment scores for each sentiment class (Positive, Negative, and Neutral).In addition, sentence level sentiment predictions are returned. See the Supported languages in Text Analytics API for the list of enabled languages.", + "operationId" : "56f30ceeeda5650db055a3c9", + "consumes" : [ "application/json", "text/json" ], + "produces" : [ "application/json", "text/json" ], + "parameters" : [ { + "name" : "modelVersion", + "in" : "query", + "description" : "(optional) This value indicates which model be used for scoring .", + "required" : false, + "type" : "string" + }, { + "name" : "showStats", + "in" : "query", + "description" : "(optional) if set to true, response will contain input and document level statistics.", + "required" : false, + "type" : "boolean" + }, { + "in" : "body", + "name" : "multiLanguageBatchInput", + "description" : "Collection of documents to analyze.", + "required" : false, + "schema" : { + "$ref" : "#/definitions/MultiLanguageBatchInput" + } + } ], + "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)", + "examples" : { + "application/json" : { + "documents" : [ { + "id" : "1", + "sentiment" : "positive", + "documentScores" : { + "positive" : 0.998519241809845, + "neutral" : 9.635657188483E-4, + "negative" : 5.17153472174E-4 + }, + "sentences" : [ { + "sentiment" : "neutral", + "sentenceScores" : { + "positive" : 0.070910170674324, + "neutral" : 0.9124033451080322, + "negative" : 0.0166865326464176 + }, + "offset" : 0, + "length" : 12 + }, { + "sentiment" : "positive", + "sentenceScores" : { + "positive" : 0.998519241809845, + "neutral" : 9.635657188483E-4, + "negative" : 5.17153472174E-4 + }, + "offset" : 13, + "length" : 36 + } ] + }, { + "id" : "2", + "sentiment" : "positive", + "documentScores" : { + "positive" : 0.9954571723937988, + "neutral" : 0.0034653299953789, + "negative" : 0.0010774657130241 + }, + "sentences" : [ { + "sentiment" : "neutral", + "sentenceScores" : { + "positive" : 0.0499138832092285, + "neutral" : 0.9387012720108032, + "negative" : 0.0113849258050323 + }, + "offset" : 0, + "length" : 30 + }, { + "sentiment" : "positive", + "sentenceScores" : { + "positive" : 0.9954571723937988, + "neutral" : 0.0034653299953789, + "negative" : 0.0010774657130241 + }, + "offset" : 31, + "length" : 13 + } ] + }, { + "id" : "3", + "sentiment" : "positive", + "documentScores" : { + "positive" : 0.9965128302574158, + "neutral" : 0.0018965365597978, + "negative" : 0.0015906029148027 + }, + "sentences" : [ { + "sentiment" : "positive", + "sentenceScores" : { + "positive" : 0.9965128302574158, + "neutral" : 0.0018965365597978, + "negative" : 0.0015906029148027 + }, + "offset" : 0, + "length" : 52 + } ] + } ], + "errors" : [ ] + } + }, + "schema" : { + "$ref" : "#/definitions/SentimentResponse" + } + }, + "500" : { + "description" : "Error Response", + "schema" : { + "$ref" : "#/definitions/ErrorResponse" + } + } + } + } + } + }, + "securityDefinitions" : { + "apiKeyHeader" : { + "type" : "apiKey", + "name" : "Ocp-Apim-Subscription-Key", + "in" : "header" + }, + "apiKeyQuery" : { + "type" : "apiKey", + "name" : "subscription-key", + "in" : "query" + } + }, + "definitions" : { + "MultiLanguageBatchInput" : { + "type" : "object", + "properties" : { + "documents" : { + "type" : "array", + "description" : "The set of documents to process as part of this batch.", + "readOnly" : true, + "items" : { + "$ref" : "#/definitions/MultiLanguageInput" + } + } + }, + "description" : "Contains a set of input documents to be analyzed by the service.", + "example" : "{\n \"documents\": [\n {\n \"language\": \"en\",\n \"id\": \"1\",\n \"text\": \"Hello world. This is some input text that I love.\"\n },\n {\n \"language\": \"en\",\n \"id\": \"2\",\n \"text\": \"It's incredibly sunny outside! I'm so happy.\"\n },\n {\n \"language\": \"en\",\n \"id\": \"3\",\n \"text\": \"Pike place market is my favorite Seattle attraction.\"\n }\n ]\n}" + }, + "MultiLanguageInput" : { + "type" : "object", + "properties" : { + "language" : { + "type" : "string", + "description" : "This is the 2 letter ISO 639-1 representation of a language.\r\nFor example, use \"en\" for English; \"es\" for Spanish etc.,." + }, + "id" : { + "type" : "string", + "description" : "A unique, non-empty document identifier." + }, + "text" : { + "type" : "string", + "description" : "The input text to process." + } + }, + "description" : "Contains an input document to be analyzed by the service." + }, + "ErrorRecord" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "string", + "description" : "The input document unique identifier that this error refers to." + }, + "message" : { + "type" : "string", + "description" : "The actual error message." + } + }, + "description" : "Contains error information about a particular document." + }, + "ErrorResponse" : { + "type" : "object", + "properties" : { + "TBD-- Need to follow design for all Cognitive Service" : { + "type" : "string" + } + } + }, + "SentimentResponse" : { + "type" : "object", + "properties" : { + "documents" : { + "type" : "array", + "description" : "The set of successful results.", + "readOnly" : true, + "items" : { + "$ref" : "#/definitions/DocumentSentiment" + } + }, + "errors" : { + "type" : "array", + "description" : "The set of error results.", + "readOnly" : true, + "items" : { + "$ref" : "#/definitions/ErrorRecord" + } + }, + "statistics" : { + "readOnly" : true + } + }, + "description" : "A wrapper class around a collection of results and errors." + }, + "DocumentSentiment" : { + "type" : "object", + "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" ] + }, + "statistics" : { + "$ref" : "#/definitions/DocumentStatistics" + }, + "documentScores" : { + "description" : "Document level sentiment confidence scores for each sentiment class." + }, + "sentences" : { + "type" : "array", + "description" : "Sentence level sentiment analysis.", + "items" : { + "$ref" : "#/definitions/SentenceSentiment" + } + } + } + }, + "RequestStatistics" : { + "type" : "object", + "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." + } + } + }, + "DocumentStatistics" : { + "type" : "object", + "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" : "(Optional) if showStats=true was specified in the request this field will contain information about the\r\ndocument payload." + }, + "SentimentConfidenceScoreLabel" : { + "type" : "object", + "properties" : { + "positive" : { + "type" : "number", + "format" : "double" + }, + "neutral" : { + "type" : "number", + "format" : "double" + }, + "negative" : { + "type" : "number", + "format" : "double" + } + }, + "description" : "Represents the confidence scores across all sentiment classes: positive, neutral, negative." + }, + "SentenceSentiment" : { + "type" : "object", + "properties" : { + "sentiment" : { + "type" : "string", + "description" : "The predicted Sentiment for the sentence.", + "enum" : [ "positive", "neutral", "negative" ] + }, + "sentenceScores" : { + "description" : "The sentiment confidence score for the sentence for all classes." + }, + "offset" : { + "type" : "integer", + "format" : "int32", + "description" : "The sentence offset from the start of the document." + }, + "length" : { + "type" : "integer", + "format" : "int32", + "description" : "The sentence length as given by StringInfo's LengthInTextElements property." + }, + "warnings" : { + "type" : "array", + "description" : "The warnings generated for the sentence.", + "items" : { + "type" : "string" + } + } + } + }, + "EntitiesBatchResult" : { + "type" : "object", + "properties" : { + "documents" : { + "type" : "array", + "description" : "Response by document", + "readOnly" : true, + "items" : { + "$ref" : "#/definitions/EntitiesBatchResultItem" + } + }, + "errors" : { + "type" : "array", + "description" : "Errors and Warnings by document", + "readOnly" : true, + "items" : { + "$ref" : "#/definitions/ErrorRecord" + } + }, + "statistics" : { + "description" : "/// \r\n (Optional) if showStats=true was specified in the request this field will contain information about the \r\n request payload.\r\n ", + "readOnly" : true + } + } + }, + "EntitiesBatchResultItem" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "string", + "description" : "Unique, non-empty document identifier." + }, + "entities" : { + "type" : "array", + "description" : "Recognized entities in the document.", + "readOnly" : true, + "items" : { + "$ref" : "#/definitions/EntityRecord" + } + }, + "statistics" : { + "description" : "(Optional) if showStats=true was specified in the request this field will contain information about the \r\n document payload." + } + } + }, + "EntityRecord" : { + "type" : "object", + "properties" : { + "text" : { + "type" : "string", + "description" : "Entity text as appears in the request." + }, + "type" : { + "type" : "string", + "description" : "Entity type, such as Person/Location/Org/SSN etc" + }, + "subType" : { + "type" : "string", + "description" : "Entity sub type, such as Age/Year/TimeRange etc" + }, + "offset" : { + "type" : "integer", + "format" : "int32", + "description" : "Start position (in Unicode characters) for the entity match text." + }, + "length" : { + "type" : "integer", + "format" : "int32", + "description" : "Length (in Unicode characters) for the entity match text." + } + } + }, + "BioEntitiesBatchResult" : { + "type" : "object", + "properties" : { + "documents" : { + "type" : "array", + "description" : "Response by document", + "readOnly" : true, + "items" : { + "$ref" : "#/definitions/BioEntitiesBatchResultItem" + } + }, + "errors" : { + "type" : "array", + "description" : "Errors and Warnings by document", + "readOnly" : true, + "items" : { + "$ref" : "#/definitions/ErrorRecord" + } + }, + "statistics" : { + "description" : "/// \r\n (Optional) if showStats=true was specified in the request this field will contain information about the \r\n request payload.\r\n ", + "readOnly" : true + } + } + }, + "BioEntitiesBatchResultItem" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "string", + "description" : "Unique, non-empty document identifier." + }, + "entities" : { + "type" : "array", + "description" : "Recognized biomedical entities in the document.", + "readOnly" : true, + "items" : { + "$ref" : "#/definitions/EntityRecord" + } + }, + "relations" : { + "type" : "array", + "description" : "Relations of recognized biomedical entities in the document.", + "readOnly" : true, + "items" : { + "$ref" : "#/definitions/RelationRecord" + } + }, + "statistics" : { + "description" : "(Optional) if showStats=true was specified in the request this field will contain information about the \r\n document payload." + } + } + }, + "RelationRecord" : { + "type" : "object", + "properties" : { + "target" : { + "type" : "string", + "description" : "TBD" + }, + "source" : { + "type" : "string", + "description" : "TBD" + }, + "relationType" : { + "type" : "string", + "description" : "TBD" + } + } + }, + "EntityLinkingBatchResult" : { + "type" : "object", + "properties" : { + "documents" : { + "type" : "array", + "description" : "Response by document", + "readOnly" : true, + "items" : { + "$ref" : "#/definitions/EntityLinkingBatchResultItem" + } + }, + "errors" : { + "type" : "array", + "description" : "Errors and Warnings by document", + "readOnly" : true, + "items" : { + "$ref" : "#/definitions/ErrorRecord" + } + }, + "statistics" : { + "description" : "/// \r\n (Optional) if showStats=true was specified in the request this field will contain information about the \r\n request payload.\r\n ", + "readOnly" : true + } + } + }, + "EntityLinkingBatchResultItem" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "string", + "description" : "Unique, non-empty document identifier." + }, + "entities" : { + "type" : "array", + "description" : "Recognized well-known entities in the document.", + "readOnly" : true, + "items" : { + "$ref" : "#/definitions/EntityLinkingRecord" + } + }, + "statistics" : { + "description" : "(Optional) if showStats=true was specified in the request this field will contain information about the \r\n document payload." + } + } + }, + "EntityLinkingRecord" : { + "type" : "object", + "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/MatchRecord" + } + }, + "wikipediaLanguage" : { + "type" : "string", + "description" : "Wikipedia language for which the WikipediaId and WikipediaUrl refers to." + }, + "wikipediaId" : { + "type" : "string", + "description" : "Wikipedia unique identifier of the recognized entity." + }, + "wikipediaUrl" : { + "type" : "string", + "description" : "URL for the entity's Wikipedia page.", + "readOnly" : true + }, + "bingId" : { + "type" : "string", + "description" : "Bing unique identifier of the recognized entity." + } + } + }, + "MatchRecord" : { + "type" : "object", + "properties" : { + "wikipediaScore" : { + "type" : "number", + "format" : "double", + "description" : "(optional) If a well-known item with Wikipedia link is recognized,\r\n a decimal number denoting the confidence level of the Wikipedia info will be returned." + }, + "text" : { + "type" : "string", + "description" : "Entity text as appears in the request." + }, + "offset" : { + "type" : "integer", + "format" : "int32", + "description" : "Start position (in Unicode characters) for the entity match text." + }, + "length" : { + "type" : "integer", + "format" : "int32", + "description" : "Length (in Unicode characters) for the entity match text." + } + } + }, + "KeyPhraseBatchResult" : { + "type" : "object", + "properties" : { + "documents" : { + "type" : "array", + "description" : "Response by document", + "readOnly" : true, + "items" : { + "$ref" : "#/definitions/KeyPhraseBatchResultItem" + } + }, + "errors" : { + "type" : "array", + "description" : "Errors and Warnings by document", + "readOnly" : true, + "items" : { + "$ref" : "#/definitions/ErrorRecord" + } + }, + "statistics" : { + "description" : "/// \r\n (Optional) if showStats=true was specified in the request this field will contain information about the \r\n request payload.\r\n ", + "readOnly" : true + } + } + }, + "KeyPhraseBatchResultItem" : { + "type" : "object", + "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.", + "readOnly" : true, + "items" : { + "type" : "string" + } + }, + "statistics" : { + "description" : "(Optional) if showStats=true was specified in the request this field will contain information about the \r\n document payload." + } + } + }, + "LanguageBatchInput" : { + "type" : "object", + "properties" : { + "documents" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/LanguageInput" + } + } + }, + "example" : "{\n \"documents\": [\n {\n \"countryHint\": \"US\",\n \"id\": \"1\",\n \"text\": \"Hello world\"\n },\n {\n \"countryHint\": \"US\",\n \"id\": \"2\",\n \"text\": \"Bonjour tout le monde\"\n },\n {\n \"countryHint\": \"US\",\n \"id\": \"3\",\n \"text\": \"La carretera estaba atascada. Había mucho tráfico el día de ayer.\"\n },\n {\n \"countryHint\": \"US\",\n \"id\": \"4\",\n \"text\": \":) :( :D\"\n }\n ]\n}" + }, + "LanguageInput" : { + "type" : "object", + "properties" : { + "countryHint" : { + "type" : "string" + }, + "id" : { + "type" : "string", + "description" : "Unique, non-empty document identifier." + }, + "text" : { + "type" : "string" + } + } + }, + "LanguageBatchResult" : { + "type" : "object", + "properties" : { + "documents" : { + "type" : "array", + "description" : "Response by document", + "readOnly" : true, + "items" : { + "$ref" : "#/definitions/LanguageBatchResultItem" + } + }, + "errors" : { + "type" : "array", + "description" : "Errors and Warnings by document", + "readOnly" : true, + "items" : { + "$ref" : "#/definitions/ErrorRecord" + } + }, + "statistics" : { + "description" : "/// \r\n (Optional) if showStats=true was specified in the request this field will contain information about the \r\n request payload.\r\n ", + "readOnly" : true + } + } + }, + "LanguageBatchResultItem" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "string", + "description" : "Unique, non-empty document identifier." + }, + "detectedLanguages" : { + "type" : "array", + "description" : "A list of extracted languages.", + "items" : { + "$ref" : "#/definitions/DetectedLanguage" + } + }, + "statistics" : { + "description" : "(Optional) if showStats=true was specified in the request this field will contain information about the \r\n document payload." + } + } + }, + "DetectedLanguage" : { + "type" : "object", + "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)." + }, + "score" : { + "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." + } + } + } + }, + "x-servers" : [ { + "url" : "https://cognitivewusprod.cognitiveservices.azure.com" + }, { + "url" : "https://westus.api.cognitive.microsoft.com" + } ] +} \ No newline at end of file From ddfa129c73d74fe607028c93f02d14d715185000 Mon Sep 17 00:00:00 2001 From: Han Li Date: Mon, 9 Sep 2019 16:32:37 -0700 Subject: [PATCH 02/62] resolve comments --- .../preview/v3.0-Preview.1/TextAnalytics.json | 235 +++++++++++------- 1 file changed, 152 insertions(+), 83 deletions(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json index d0bac02602c9..3208fd0a1d6c 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json @@ -3,29 +3,46 @@ "info" : { "description" : "The Text Analytics API is a suite of text analytics web services built with best-in-class Microsoft machine learning algorithms. \nThe API can be used to analyze unstructured text for tasks such as sentiment analysis, key phrase and entity extraction as well as language detection. \nNo training data is needed to use this API; just bring your text data. \nThis API uses advanced natural language processing techniques to deliver best in class predictions.\n\nFurther documentation can be found in https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/overview\n\nThis API is currently available in:\n\n* Australia East - australiaeast.api.cognitive.microsoft.com\n* Brazil South - brazilsouth.api.cognitive.microsoft.com\n* Canada Central - canadacentral.api.cognitive.microsoft.com\n* Central India - centralindia.api.cognitive.microsoft.com\n* Central US - centralus.api.cognitive.microsoft.com\n* East Asia - eastasia.api.cognitive.microsoft.com\n* East US - eastus.api.cognitive.microsoft.com\n* East US 2 - eastus2.api.cognitive.microsoft.com\n* France Central - francecentral.api.cognitive.microsoft.com\n* Japan East - japaneast.api.cognitive.microsoft.com\n* Japan West - japanwest.api.cognitive.microsoft.com\n* Korea Central - koreacentral.api.cognitive.microsoft.com\n* North Central US - northcentralus.api.cognitive.microsoft.com\n* North Europe - northeurope.api.cognitive.microsoft.com\n* South Africa North - southafricanorth.api.cognitive.microsoft.com\n* South Central US - southcentralus.api.cognitive.microsoft.com\n* Southeast Asia - southeastasia.api.cognitive.microsoft.com\n* UK South - uksouth.api.cognitive.microsoft.com\n* West Central US - westcentralus.api.cognitive.microsoft.com\n* West Europe - westeurope.api.cognitive.microsoft.com\n* West US - westus.api.cognitive.microsoft.com\n* West US 2 - westus2.api.cognitive.microsoft.com", "version" : "V3.0-Preview.1", - "title" : "Text Analytics API (V3.0-Preview.1)" + "title" : "Text Analytics API (V3.0-Preview.1)", + "contact": { + "name": "Microsoft Cognitive Services", + "url": "https://azure.microsoft.com/en-us/services/cognitive-services/text-analytics/", + "email": "mlapi@microsoft.com" + } + }, + "securityDefinitions": { + "apim_key": { + "type": "apiKey", + "name": "Ocp-Apim-Subscription-Key", + "in": "header" + } + }, + "security": [ + { + "apim_key": [] + } + ], + "x-ms-parameterized-host": { + "hostTemplate": "{Endpoint}/text/analytics/v2.1-preview", + "useSchemePrefix": false, + "parameters": [ + { + "$ref": "#/parameters/Endpoint" + } + ] }, - "host" : "westus.api.cognitive.microsoft.com", - "basePath" : "/text/analytics/V3.0-preview.1", - "tags" : [ ], - "schemes" : [ "https" ], - "security" : [ { - "apiKeyHeader" : [ ] - }, { - "apiKeyQuery" : [ ] - } ], "paths" : { "/entities" : { "post" : { "summary" : "Entities from open domain", - "description" : "The API returns a list of general named entities (\\\"Person\\\", \\\"Location\\\", \\\"Organization\\\" etc) in a given document. See the Supported Entity Types in Text Analytics API for the list of supported Entity Types. See the Supported languages in Text Analytics API for the list of enabled languages.\n", + "description" : "The API returns a list of general named entities in a given document. See the Supported Entity Types in Text Analytics API for the list of supported Entity Types. See the Supported languages in Text Analytics API for the list of enabled languages.\n", "operationId" : "5ac4251d5b4ccd1554da7631", "consumes" : [ "application/json", "text/json" ], "produces" : [ "application/json", "text/json" ], "parameters" : [ { "name" : "modelVersion", "in" : "query", - "description" : "(optional) This value indicates which model be used for scoring .", + "description" : "(optional) This value indicates which model be used for scoring.", "required" : false, "type" : "string" }, { @@ -45,7 +62,7 @@ } ], "responses" : { "200" : { - "description" : "A successful call results in a list of recognized entities returned for each valid document", + "description" : "A successful call results in a list of recognized entities returned for each valid document.", "examples" : { "application/json" : { "documents" : [ { @@ -89,8 +106,8 @@ }, "/entities/biomedical" : { "post" : { - "summary" : "Entities from biomedical domain", - "description" : "The API returns a list of biomedical entities (\\\"Treatment\\\", \\\"Medication\\\", \\\"Dosage\\\" etc) in a given document. See the Supported languages in Text Analytics API for the list of enabled languages.\n", + "summary" : "Entities from Biomedical domain", + "description" : "The API returns a list of biomedical entities in a given document. See the Supported languages in Text Analytics API for the list of enabled languages.\n", "operationId" : "5ac4251d5b4ccd1554da7632", "consumes" : [ "application/json", "text/json" ], "produces" : [ "application/json", "text/json" ], @@ -162,7 +179,7 @@ }, "/entities/pii" : { "post" : { - "summary" : "Entities from PII domain", + "summary" : "Entities from Personally Identifiable Information (PII) domain", "description" : "The API returns a list of pii entities (\\\"SSN\\\", \\\"Bank Account\\\", \\\"Goverment ID\\\" etc) in a given document. See the Supported languages in Text Analytics API for the list of enabled languages.\n", "operationId" : "5ac4251d5b4ccd1554da7633", "consumes" : [ "application/json", "text/json" ], @@ -226,7 +243,7 @@ }, "/entities/linking" : { "post" : { - "summary" : "Well-known entities.", + "summary" : "Entities from Well-Known domain", "description" : "The API returns a list of recognized entities in a given document. To get even more information on each recognized entity we recommend using the Bing Entity Search API by querying for the recognized entities names. See the Supported languages in Text Analytics API.\n", "operationId" : "5ac4251d5b4ccd1554da7635", "consumes" : [ "application/json", "text/json" ], @@ -593,18 +610,6 @@ } } }, - "securityDefinitions" : { - "apiKeyHeader" : { - "type" : "apiKey", - "name" : "Ocp-Apim-Subscription-Key", - "in" : "header" - }, - "apiKeyQuery" : { - "type" : "apiKey", - "name" : "subscription-key", - "in" : "query" - } - }, "definitions" : { "MultiLanguageBatchInput" : { "type" : "object", @@ -619,14 +624,32 @@ } }, "description" : "Contains a set of input documents to be analyzed by the service.", - "example" : "{\n \"documents\": [\n {\n \"language\": \"en\",\n \"id\": \"1\",\n \"text\": \"Hello world. This is some input text that I love.\"\n },\n {\n \"language\": \"en\",\n \"id\": \"2\",\n \"text\": \"It's incredibly sunny outside! I'm so happy.\"\n },\n {\n \"language\": \"en\",\n \"id\": \"3\",\n \"text\": \"Pike place market is my favorite Seattle attraction.\"\n }\n ]\n}" + "example" : "{ + \"documents\": [ + { + \"language\": \"en\", + \"id\": "1", + \"text\": \"Hello world. This is some input text that I love.\" + }, + { + \"language\": \"en\", + \"id\": \"2\", + \"text\": \"It's incredibly sunny outside! I'm so happy.\" + }, + { + \"language\": \"en\", + \"id\": \"3\", + \"text\": \"Pike place market is my favorite Seattle attraction.\" + } + ] + }" }, "MultiLanguageInput" : { "type" : "object", "properties" : { "language" : { "type" : "string", - "description" : "This is the 2 letter ISO 639-1 representation of a language.\r\nFor example, use \"en\" for English; \"es\" for Spanish etc.,." + "description" : "This is the 2 letter ISO 639-1 representation of a language. For example, use \"en\" for English; \"es\" for Spanish etc.,." }, "id" : { "type" : "string", @@ -639,25 +662,59 @@ }, "description" : "Contains an input document to be analyzed by the service." }, - "ErrorRecord" : { - "type" : "object", - "properties" : { - "id" : { - "type" : "string", - "description" : "The input document unique identifier that this error refers to." + "ErrorResponse": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description" : "One of a server-defined set of error codes." }, - "message" : { - "type" : "string", - "description" : "The actual error message." + "message": { + "type": "string", + "description" : "A human-readable representation of the error." + }, + "target": { + "type": "string", + "description" : "(Optional) The target of the error." + }, + "innerError": { + "$ref": "#/definitions/InternalError", + "description" : "(Optional) An object containing more specific information than the current object about the error." + }, + "details": { + "type": "array", + "description" : "(Optional) An array of details about specific errors that led to this reported error.", + "items" : { + "code": { + "type": "string", + "description" : "One of a server-defined set of error codes." + }, + "message": { + "type": "string", + "description" : "A human-readable representation of the error." + }, + "target": { + "type": "string", + "description" : "(Optional) The target of the error." + }, + } } - }, - "description" : "Contains error information about a particular document." + } }, - "ErrorResponse" : { - "type" : "object", - "properties" : { - "TBD-- Need to follow design for all Cognitive Service" : { - "type" : "string" + "InternalError": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description" : "One of a server-defined set of error codes." + }, + "message": { + "type": "string", + "description" : "A human-readable representation of the error." + }, + "target": { + "type": "string", + "description" : "(Optional) The target of the error." } } }, @@ -666,7 +723,7 @@ "properties" : { "documents" : { "type" : "array", - "description" : "The set of successful results.", + "description" : "Sentiment analysis per document.", "readOnly" : true, "items" : { "$ref" : "#/definitions/DocumentSentiment" @@ -674,17 +731,17 @@ }, "errors" : { "type" : "array", - "description" : "The set of error results.", + "description" : "Errors by document id.", "readOnly" : true, "items" : { - "$ref" : "#/definitions/ErrorRecord" + "$ref" : "#/definitions/ErrorResponse" } }, "statistics" : { - "readOnly" : true + "readOnly" : true, + "$ref" : "#/definitions/RequestStatistics" } }, - "description" : "A wrapper class around a collection of results and errors." }, "DocumentSentiment" : { "type" : "object", @@ -736,7 +793,8 @@ "format" : "int64", "description" : "Number of transactions for the request." } - } + }, + "description" : "(Optional) if showStats=true was specified in the request this field will contain information about the request payload." }, "DocumentStatistics" : { "type" : "object", @@ -752,9 +810,9 @@ "description" : "Number of transactions for the document." } }, - "description" : "(Optional) if showStats=true was specified in the request this field will contain information about the\r\ndocument payload." + "description" : "(Optional) if showStats=true was specified in the request this field will contain information about the document payload." }, - "SentimentConfidenceScoreLabel" : { + "SentimentConfidenceScorePerLabel" : { "type" : "object", "properties" : { "positive" : { @@ -791,7 +849,7 @@ "length" : { "type" : "integer", "format" : "int32", - "description" : "The sentence length as given by StringInfo's LengthInTextElements property." + "description" : "The length of the sentence by Unicode standard." }, "warnings" : { "type" : "array", @@ -818,12 +876,12 @@ "description" : "Errors and Warnings by document", "readOnly" : true, "items" : { - "$ref" : "#/definitions/ErrorRecord" + "$ref" : "#/definitions/ErrorResponse" } }, "statistics" : { - "description" : "/// \r\n (Optional) if showStats=true was specified in the request this field will contain information about the \r\n request payload.\r\n ", - "readOnly" : true + "readOnly" : true, + "$ref" : "#/definitions/RequestStatistics" } } }, @@ -843,7 +901,8 @@ } }, "statistics" : { - "description" : "(Optional) if showStats=true was specified in the request this field will contain information about the \r\n document payload." + "description" : "(Optional) if showStats=true was specified in the request this field will contain information about the document payload.", + "$ref" : "#/definitions/DocumentStatistics" } } }, @@ -890,12 +949,12 @@ "description" : "Errors and Warnings by document", "readOnly" : true, "items" : { - "$ref" : "#/definitions/ErrorRecord" + "$ref" : "#/definitions/ErrorResponse" } }, "statistics" : { - "description" : "/// \r\n (Optional) if showStats=true was specified in the request this field will contain information about the \r\n request payload.\r\n ", - "readOnly" : true + "readOnly" : true, + "$ref" : "#/definitions/RequestStatistics" } } }, @@ -923,7 +982,8 @@ } }, "statistics" : { - "description" : "(Optional) if showStats=true was specified in the request this field will contain information about the \r\n document payload." + "description" : "(Optional) if showStats=true was specified in the request this field will contain information about the document payload.", + "$ref" : "#/definitions/DocumentStatistics" } } }, @@ -960,12 +1020,12 @@ "description" : "Errors and Warnings by document", "readOnly" : true, "items" : { - "$ref" : "#/definitions/ErrorRecord" + "$ref" : "#/definitions/ErrorResponse" } }, "statistics" : { - "description" : "/// \r\n (Optional) if showStats=true was specified in the request this field will contain information about the \r\n request payload.\r\n ", - "readOnly" : true + "readOnly" : true, + "$ref" : "#/definitions/RequestStatistics" } } }, @@ -985,7 +1045,8 @@ } }, "statistics" : { - "description" : "(Optional) if showStats=true was specified in the request this field will contain information about the \r\n document payload." + "description" : "(Optional) if showStats=true was specified in the request this field will contain information about the document payload.", + "$ref" : "#/definitions/DocumentStatistics" } } }, @@ -1028,7 +1089,7 @@ "wikipediaScore" : { "type" : "number", "format" : "double", - "description" : "(optional) If a well-known item with Wikipedia link is recognized,\r\n a decimal number denoting the confidence level of the Wikipedia info will be returned." + "description" : "(optional) If a well-known item with Wikipedia link is recognized, a decimal number denoting the confidence level of the Wikipedia info will be returned." }, "text" : { "type" : "string", @@ -1062,12 +1123,12 @@ "description" : "Errors and Warnings by document", "readOnly" : true, "items" : { - "$ref" : "#/definitions/ErrorRecord" + "$ref" : "#/definitions/ErrorResponse" } }, "statistics" : { - "description" : "/// \r\n (Optional) if showStats=true was specified in the request this field will contain information about the \r\n request payload.\r\n ", - "readOnly" : true + "readOnly" : true, + "$ref" : "#/definitions/RequestStatistics" } } }, @@ -1087,7 +1148,8 @@ } }, "statistics" : { - "description" : "(Optional) if showStats=true was specified in the request this field will contain information about the \r\n document payload." + "description" : "(Optional) if showStats=true was specified in the request this field will contain information about the document payload.", + "$ref" : "#/definitions/DocumentStatistics" } } }, @@ -1134,12 +1196,12 @@ "description" : "Errors and Warnings by document", "readOnly" : true, "items" : { - "$ref" : "#/definitions/ErrorRecord" + "$ref" : "#/definitions/ErrorResponse" } }, "statistics" : { - "description" : "/// \r\n (Optional) if showStats=true was specified in the request this field will contain information about the \r\n request payload.\r\n ", - "readOnly" : true + "readOnly" : true, + "$ref" : "#/definitions/RequestStatistics" } } }, @@ -1158,7 +1220,8 @@ } }, "statistics" : { - "description" : "(Optional) if showStats=true was specified in the request this field will contain information about the \r\n document payload." + "description" : "(Optional) if showStats=true was specified in the request this field will contain information about the document payload.", + "$ref" : "#/definitions/DocumentStatistics" } } }, @@ -1181,9 +1244,15 @@ } } }, - "x-servers" : [ { - "url" : "https://cognitivewusprod.cognitiveservices.azure.com" - }, { - "url" : "https://westus.api.cognitive.microsoft.com" - } ] -} \ No newline at end of file + "parameters": { + "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 + } + } +} From e3a3d881b56b0afb59c7ceafa25068c95ea17f41 Mon Sep 17 00:00:00 2001 From: Han Li Date: Mon, 9 Sep 2019 16:43:56 -0700 Subject: [PATCH 03/62] fix spaces --- .../preview/v3.0-Preview.1/TextAnalytics.json | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json index 3208fd0a1d6c..4c65974d05ee 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json @@ -628,7 +628,7 @@ \"documents\": [ { \"language\": \"en\", - \"id\": "1", + \"id\": \"1\", \"text\": \"Hello world. This is some input text that I love.\" }, { @@ -685,18 +685,7 @@ "type": "array", "description" : "(Optional) An array of details about specific errors that led to this reported error.", "items" : { - "code": { - "type": "string", - "description" : "One of a server-defined set of error codes." - }, - "message": { - "type": "string", - "description" : "A human-readable representation of the error." - }, - "target": { - "type": "string", - "description" : "(Optional) The target of the error." - }, + "$ref" : "#/definitions/ErrorResponse" } } } From 3707aab236232f856bd99854a2e98b570f239320 Mon Sep 17 00:00:00 2001 From: Han Li Date: Mon, 9 Sep 2019 17:07:25 -0700 Subject: [PATCH 04/62] update examples --- .../preview/v3.0-Preview.1/TextAnalytics.json | 52 ++++++++++++++----- 1 file changed, 39 insertions(+), 13 deletions(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json index 4c65974d05ee..815ca428dbd0 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json @@ -624,25 +624,27 @@ } }, "description" : "Contains a set of input documents to be analyzed by the service.", - "example" : "{ - \"documents\": [ + "example" : { + "application/json" : { + "documents": [ { - \"language\": \"en\", - \"id\": \"1\", - \"text\": \"Hello world. This is some input text that I love.\" + "language": "en", + "id": "1", + "text": "Hello world. This is some input text that I love." }, { - \"language\": \"en\", - \"id\": \"2\", - \"text\": \"It's incredibly sunny outside! I'm so happy.\" + "language": "en", + "id": "2", + "text": "It's incredibly sunny outside! I'm so happy." }, { - \"language\": \"en\", - \"id\": \"3\", - \"text\": \"Pike place market is my favorite Seattle attraction.\" + "language": "en", + "id": "3", + "text": "Pike place market is my favorite Seattle attraction." } ] - }" + } + } }, "MultiLanguageInput" : { "type" : "object", @@ -1152,7 +1154,31 @@ } } }, - "example" : "{\n \"documents\": [\n {\n \"countryHint\": \"US\",\n \"id\": \"1\",\n \"text\": \"Hello world\"\n },\n {\n \"countryHint\": \"US\",\n \"id\": \"2\",\n \"text\": \"Bonjour tout le monde\"\n },\n {\n \"countryHint\": \"US\",\n \"id\": \"3\",\n \"text\": \"La carretera estaba atascada. Había mucho tráfico el día de ayer.\"\n },\n {\n \"countryHint\": \"US\",\n \"id\": \"4\",\n \"text\": \":) :( :D\"\n }\n ]\n}" + "example" : { + "application/json" : { + "documents": [ + { + "countryHint": "US", + "id": "1", + "text": "Hello world" + }, + { + "countryHint": "US", + "id": "2", + "text": "Bonjour tout le monde" + }, + { + "countryHint": "US", + "id": "3", + "text": "La carretera estaba atascada. Había mucho tráfico el día de ayer." + }, + { + "countryHint": "US", + "id": "4", + "text": ":) :( :D" + } + ] + } }, "LanguageInput" : { "type" : "object", From dd1d48582eef5fbc6f6feddec4e955a7741dfa5a Mon Sep 17 00:00:00 2001 From: Han Li Date: Tue, 10 Sep 2019 10:51:48 -0700 Subject: [PATCH 05/62] resolve comments --- .../preview/v3.0-Preview.1/TextAnalytics.json | 21 ------------------- 1 file changed, 21 deletions(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json index 815ca428dbd0..0e9d6a569afe 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json @@ -43,19 +43,16 @@ "name" : "modelVersion", "in" : "query", "description" : "(optional) This value indicates which model be used for scoring.", - "required" : false, "type" : "string" }, { "name" : "showStats", "in" : "query", "description" : "(optional) if set to true, response will contain input and document level statistics.", - "required" : false, "type" : "boolean" }, { "in" : "body", "name" : "multiLanguageBatchInput", "description" : "Collection of documents to analyze.", - "required" : false, "schema" : { "$ref" : "#/definitions/MultiLanguageBatchInput" } @@ -115,19 +112,16 @@ "name" : "modelVersion", "in" : "query", "description" : "(optional) This value indicates which model be used for scoring .", - "required" : false, "type" : "string" }, { "name" : "showStats", "in" : "query", "description" : "(optional) if set to true, response will contain input and document level statistics.", - "required" : false, "type" : "boolean" }, { "in" : "body", "name" : "multiLanguageBatchInput", "description" : "Collection of documents to analyze.", - "required" : false, "schema" : { "$ref" : "#/definitions/MultiLanguageBatchInput" } @@ -188,19 +182,16 @@ "name" : "modelVersion", "in" : "query", "description" : "(optional) This value indicates which model be used for scoring .", - "required" : false, "type" : "string" }, { "name" : "showStats", "in" : "query", "description" : "(optional) if set to true, response will contain input and document level statistics.", - "required" : false, "type" : "boolean" }, { "in" : "body", "name" : "multiLanguageBatchInput", "description" : "Collection of documents to analyze.", - "required" : false, "schema" : { "$ref" : "#/definitions/MultiLanguageBatchInput" } @@ -252,19 +243,16 @@ "name" : "modelVersion", "in" : "query", "description" : "(optional) This value indicates which model be used for scoring .", - "required" : false, "type" : "string" }, { "name" : "showStats", "in" : "query", "description" : "(optional) if set to true, response will contain input and document level statistics.", - "required" : false, "type" : "boolean" }, { "in" : "body", "name" : "multiLanguageBatchInput", "description" : "Collection of documents to analyze.", - "required" : false, "schema" : { "$ref" : "#/definitions/MultiLanguageBatchInput" } @@ -361,19 +349,16 @@ "name" : "modelVersion", "in" : "query", "description" : "(optional) This value indicates which model be used for scoring .", - "required" : false, "type" : "string" }, { "name" : "showStats", "in" : "query", "description" : "(optional) if set to true, response will contain input and document level statistics.", - "required" : false, "type" : "boolean" }, { "in" : "body", "name" : "multiLanguageBatchInput", "description" : "Collection of documents to analyze. Documents can now contain a language field to indicate the text language", - "required" : false, "schema" : { "$ref" : "#/definitions/MultiLanguageBatchInput" } @@ -420,19 +405,16 @@ "name" : "modelVersion", "in" : "query", "description" : "(optional) This value indicates which model be used for scoring .", - "required" : false, "type" : "string" }, { "name" : "showStats", "in" : "query", "description" : "(optional) if set to true, response will contain input and document level statistics.", - "required" : false, "type" : "boolean" }, { "in" : "body", "name" : "languageBatchInput", "description" : "Collection of documents to analyze.", - "required" : false, "schema" : { "$ref" : "#/definitions/LanguageBatchInput" } @@ -498,19 +480,16 @@ "name" : "modelVersion", "in" : "query", "description" : "(optional) This value indicates which model be used for scoring .", - "required" : false, "type" : "string" }, { "name" : "showStats", "in" : "query", "description" : "(optional) if set to true, response will contain input and document level statistics.", - "required" : false, "type" : "boolean" }, { "in" : "body", "name" : "multiLanguageBatchInput", "description" : "Collection of documents to analyze.", - "required" : false, "schema" : { "$ref" : "#/definitions/MultiLanguageBatchInput" } From 6ef5da80d841af86c5c74a57894f0705f5ea5271 Mon Sep 17 00:00:00 2001 From: Han Li Date: Tue, 10 Sep 2019 17:40:00 -0700 Subject: [PATCH 06/62] update /healthcare and score --- .../preview/v3.0-Preview.1/TextAnalytics.json | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json index 0e9d6a569afe..d56e26c9815f 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json @@ -101,10 +101,10 @@ } } }, - "/entities/biomedical" : { + "/entities/healthcare" : { "post" : { - "summary" : "Entities from Biomedical domain", - "description" : "The API returns a list of biomedical entities in a given document. See the Supported languages in Text Analytics API for the list of enabled languages.\n", + "summary" : "Entities from healthcare domain", + "description" : "The API returns a list of healthcare entities in a given document. See the Supported languages in Text Analytics API for the list of enabled languages.\n", "operationId" : "5ac4251d5b4ccd1554da7632", "consumes" : [ "application/json", "text/json" ], "produces" : [ "application/json", "text/json" ], @@ -894,12 +894,17 @@ "offset" : { "type" : "integer", "format" : "int32", - "description" : "Start position (in Unicode characters) for the entity match text." + "description" : "Start position (in Unicode characters) for the entity text." }, "length" : { "type" : "integer", "format" : "int32", - "description" : "Length (in Unicode characters) for the entity match text." + "description" : "Length (in Unicode characters) for the entity text." + }, + "score" : { + "type" : "number", + "format" : "double", + "description" : "Confidence score of the extracted entity." } } }, @@ -937,7 +942,7 @@ }, "entities" : { "type" : "array", - "description" : "Recognized biomedical entities in the document.", + "description" : "Recognized healthcare entities in the document.", "readOnly" : true, "items" : { "$ref" : "#/definitions/EntityRecord" @@ -945,7 +950,7 @@ }, "relations" : { "type" : "array", - "description" : "Relations of recognized biomedical entities in the document.", + "description" : "Relations of recognized healthcare entities in the document.", "readOnly" : true, "items" : { "$ref" : "#/definitions/RelationRecord" From c2ff7efa7789a7d802e917e1f713261970c688c8 Mon Sep 17 00:00:00 2001 From: Han Li Date: Fri, 13 Sep 2019 10:48:38 -0700 Subject: [PATCH 07/62] update Bioentity and entityrecord --- .../preview/v3.0-Preview.1/TextAnalytics.json | 109 +++++++++++++++--- 1 file changed, 95 insertions(+), 14 deletions(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json index d56e26c9815f..aac1375a4e1e 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json @@ -23,7 +23,7 @@ } ], "x-ms-parameterized-host": { - "hostTemplate": "{Endpoint}/text/analytics/v2.1-preview", + "hostTemplate": "{Endpoint}/text/analytics/v3.0-preview.1", "useSchemePrefix": false, "parameters": [ { @@ -711,7 +711,7 @@ "readOnly" : true, "$ref" : "#/definitions/RequestStatistics" } - }, + } }, "DocumentSentiment" : { "type" : "object", @@ -905,6 +905,14 @@ "type" : "number", "format" : "double", "description" : "Confidence score of the extracted entity." + }, + "url" : { + "type" : "string", + "description" : "(Optional) URL for the product info from Skills Model (TBD)." + }, + "name" : { + "type" : "string", + "description" : "(Optional) Name of Entity from Skills Model (TBD)." } } }, @@ -945,7 +953,7 @@ "description" : "Recognized healthcare entities in the document.", "readOnly" : true, "items" : { - "$ref" : "#/definitions/EntityRecord" + "$ref" : "#/definitions/BioEntityRecord" } }, "relations" : { @@ -962,20 +970,91 @@ } } }, - "RelationRecord" : { + "BioEntityRecord" : { "type" : "object", "properties" : { - "target" : { + "text" : { "type" : "string", - "description" : "TBD" + "description" : "Entity text as appears in the request." }, - "source" : { + "type" : { "type" : "string", - "description" : "TBD" + "description" : "Entity type, such as DOSAGE/FREQUENCY etc." + }, + "category" : { + "type" : "string", + "description" : "Entity category, such as MEDICATION etc -- (TBD)." + }, + "offset" : { + "type" : "integer", + "format" : "int32", + "description" : "Start position (in Unicode characters) for the entity text." }, + "length" : { + "type" : "integer", + "format" : "int32", + "description" : "Length (in Unicode characters) for the entity text." + }, + "score" : { + "type" : "number", + "format" : "double", + "description" : "Confidence score of the extracted entity." + }, + "umlsId" : { + "type" : "string", + "description" : "(Optional) Id from the Unified Medical Language System (UMLS)." + } + } + }, + "RelationRecord" : { + "type" : "object", + "properties" : { "relationType" : { "type" : "string", - "description" : "TBD" + "description" : "Relation types of the related entities, such as DOSAGE_OF_MEDICATION etc." + }, + "score" : { + "type" : "string", + "description" : "Confidence score of the relation." + }, + "entityInfo" : { + "type" : "array", + "description" : "Related entities. // To-do: entity info? Or just BioEntityRecord?", + "items" : { + "$ref" : "#/definitions/EntityInfo" + } + } + } + }, + "EntityInfo" : { + "type" : "object", + "properties" : { + "text" : { + "type" : "string", + "description" : "Entity text as appears in the request." + }, + "type" : { + "type" : "string", + "description" : "Entity type, such as DOSAGE/FREQUENCY etc." + }, + "category" : { + "type" : "string", + "description" : "Entity category, such as MEDICATION etc -- (TBD)." + }, + "offset" : { + "type" : "integer", + "format" : "int32", + "description" : "Start position (in Unicode characters) for the entity text." + }, + "length" : { + "type" : "integer", + "format" : "int32", + "description" : "Length (in Unicode characters) for the entity text." + }, + "score" : { + "type" : "number", + "format" : "double", + "description" : "Confidence score of the extracted entity." } } }, @@ -1163,8 +1242,9 @@ } ] } - }, - "LanguageInput" : { + } + }, + "LanguageInput" : { "type" : "object", "properties" : { "countryHint" : { @@ -1178,8 +1258,8 @@ "type" : "string" } } - }, - "LanguageBatchResult" : { + }, + "LanguageBatchResult" : { "type" : "object", "properties" : { "documents" : { @@ -1242,7 +1322,7 @@ } } } - }, + }, "parameters": { "Endpoint": { "name": "Endpoint", @@ -1255,3 +1335,4 @@ } } } + From 51ce3ac210e22511c922323a8754759006ce3cac Mon Sep 17 00:00:00 2001 From: Han Li Date: Tue, 17 Sep 2019 15:51:16 -0700 Subject: [PATCH 08/62] temp --- .../preview/v3.0-Preview.1/TextAnalytics.json | 35 +++++++++++++------ 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json index aac1375a4e1e..4ea45a664316 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json @@ -906,13 +906,13 @@ "format" : "double", "description" : "Confidence score of the extracted entity." }, - "url" : { - "type" : "string", - "description" : "(Optional) URL for the product info from Skills Model (TBD)." - }, - "name" : { - "type" : "string", - "description" : "(Optional) Name of Entity from Skills Model (TBD)." + //"url" : { + // "type" : "string", + // "description" : "(Optional) URL for the product info from Skills Model (TBD)." + //}, + //"name" : { + // "type" : "string", + // "description" : "(Optional) Name of Entity from Skills Model (TBD)." } } }, @@ -970,7 +970,7 @@ } } }, - "BioEntityRecord" : { + "BioEntityRecord" : { // HealthcareEntity "type" : "object", "properties" : { "text" : { @@ -1055,6 +1055,11 @@ "type" : "number", "format" : "double", "description" : "Confidence score of the extracted entity." + }, + "role" : { + "type" : "number", + "format" : "double", + "description" : "Role of the extracted entity." } } }, @@ -1118,6 +1123,16 @@ "$ref" : "#/definitions/MatchRecord" } }, + "language" : "en", + "id" : "id", + "url": "url", + "datasource": "wikipedia", + + "language" : "en", + "id" : "id", + "url": "url", + "datasource": "skills", + "wikipediaLanguage" : { "type" : "string", "description" : "Wikipedia language for which the WikipediaId and WikipediaUrl refers to." @@ -1131,7 +1146,7 @@ "description" : "URL for the entity's Wikipedia page.", "readOnly" : true }, - "bingId" : { + "bingId" : { // "optional id" "type" : "string", "description" : "Bing unique identifier of the recognized entity." } @@ -1140,7 +1155,7 @@ "MatchRecord" : { "type" : "object", "properties" : { - "wikipediaScore" : { + "wikipediaScore" : { // score "type" : "number", "format" : "double", "description" : "(optional) If a well-known item with Wikipedia link is recognized, a decimal number denoting the confidence level of the Wikipedia info will be returned." From b6b317302ebdea688d7a127b368a3fc3703599a6 Mon Sep 17 00:00:00 2001 From: Han Li Date: Tue, 17 Sep 2019 16:23:57 -0700 Subject: [PATCH 09/62] update api changes based on meeting discussions --- .../preview/v3.0-Preview.1/TextAnalytics.json | 180 ++++++++++-------- 1 file changed, 97 insertions(+), 83 deletions(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json index 4ea45a664316..43feb5519665 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json @@ -32,7 +32,7 @@ ] }, "paths" : { - "/entities" : { + "/entities/recognition" : { "post" : { "summary" : "Entities from open domain", "description" : "The API returns a list of general named entities in a given document. See the Supported Entity Types in Text Analytics API for the list of supported Entity Types. See the Supported languages in Text Analytics API for the list of enabled languages.\n", @@ -68,7 +68,8 @@ "text" : "Microsoft", "type" : "Organization", "offset" : 25, - "length" : 9 + "length" : 9, + "score" : 0.9 } ] }, { "id" : "2", @@ -76,20 +77,22 @@ "text" : "John", "type" : "Person", "offset" : 25, - "length" : 9 + "length" : 9, + "score" : 0.9 }, { "text" : 20, "type" : "Number", "subType" : "Age", "offset" : 30, - "length" : 2 + "length" : 2, + "score" : 0.8 } ] } ], "errors" : [ ] } }, "schema" : { - "$ref" : "#/definitions/EntitiesBatchResult" + "$ref" : "#/definitions/" } }, "500" : { @@ -101,7 +104,7 @@ } } }, - "/entities/healthcare" : { + "/healthcare" : { "post" : { "summary" : "Entities from healthcare domain", "description" : "The API returns a list of healthcare entities in a given document. See the Supported languages in Text Analytics API for the list of enabled languages.\n", @@ -131,35 +134,44 @@ "description" : "A successful call results in a list of recognized entities returned for each valid document", "examples" : { "application/json" : { - "documents" : [ { - "id" : "1", - "entities" : [ { - "text" : "100mg", - "type" : "Organization", - "offset" : 11, - "length" : 5 - }, { - "text" : "ibuprofen", - "type" : "Chemical", - "offset" : 17, - "length" : 9 - }, { - "text" : "twice daily", - "type" : "Frequency", - "offset" : 34, - "length" : 11 + "documents" : [ + { + "id": "48740a85-578b-4de2-a005-f932c2fe52d6", + "offset": 17, + "length": 4, + "text": "pain", + "type": "SYMPTOM_OR_SIGN", + "score": 0.9998, + "umlsId": "C0030193" + }, + { + "id": "7f6bf109-c897-418c-885a-1cf4ade2c314", + "offset": 25, + "length": 5, + "text": "lower", + "type": "DIRECTION", + "score": 0.9996 + }, + { + "id": "c6f217ed-2d48-4e4d-8f26-2299624a21a9", + "offset": 31, + "length": 3, + "text": "leg", + "type": "BODY_STRUCTURE", + "score": 0.9997, + "umlsId": "C1140621" } ], "relations" : [ { "target" : "TBD", "source" : "TBD", "relationType" : "TBD" } ] - } ], + } , "errors" : [ ] } }, "schema" : { - "$ref" : "#/definitions/BioEntitiesBatchResult" + "$ref" : "#/definitions/HealthcareBatchResult" } }, "500" : { @@ -171,7 +183,7 @@ } } }, - "/entities/pii" : { + "/entities/recognition/pii" : { "post" : { "summary" : "Entities from Personally Identifiable Information (PII) domain", "description" : "The API returns a list of pii entities (\\\"SSN\\\", \\\"Bank Account\\\", \\\"Goverment ID\\\" etc) in a given document. See the Supported languages in Text Analytics API for the list of enabled languages.\n", @@ -710,6 +722,11 @@ "statistics" : { "readOnly" : true, "$ref" : "#/definitions/RequestStatistics" + }, + "modelVersion" : { + "readOnly" : true, + "type" : "string", + "description" : "(Optional) if modelVersion=true was specified in the request this field will indicate which model is used for scoring." } } }, @@ -852,6 +869,11 @@ "statistics" : { "readOnly" : true, "$ref" : "#/definitions/RequestStatistics" + }, + "modelVersion" : { + "readOnly" : true, + "type" : "string", + "description" : "(Optional) if modelVersion=true was specified in the request this field will indicate which model is used for scoring." } } }, @@ -867,7 +889,7 @@ "description" : "Recognized entities in the document.", "readOnly" : true, "items" : { - "$ref" : "#/definitions/EntityRecord" + "$ref" : "#/definitions/Entity" } }, "statistics" : { @@ -876,7 +898,7 @@ } } }, - "EntityRecord" : { + "Entity" : { "type" : "object", "properties" : { "text" : { @@ -905,18 +927,10 @@ "type" : "number", "format" : "double", "description" : "Confidence score of the extracted entity." - }, - //"url" : { - // "type" : "string", - // "description" : "(Optional) URL for the product info from Skills Model (TBD)." - //}, - //"name" : { - // "type" : "string", - // "description" : "(Optional) Name of Entity from Skills Model (TBD)." } } }, - "BioEntitiesBatchResult" : { + "HealthcareBatchResult" : { "type" : "object", "properties" : { "documents" : { @@ -924,7 +938,7 @@ "description" : "Response by document", "readOnly" : true, "items" : { - "$ref" : "#/definitions/BioEntitiesBatchResultItem" + "$ref" : "#/definitions/HealthcareBatchResultItem" } }, "errors" : { @@ -938,10 +952,15 @@ "statistics" : { "readOnly" : true, "$ref" : "#/definitions/RequestStatistics" + }, + "modelVersion" : { + "readOnly" : true, + "type" : "string", + "description" : "(Optional) if modelVersion=true was specified in the request this field will indicate which model is used for scoring." } } }, - "BioEntitiesBatchResultItem" : { + "HealthcareBatchResultItem" : { "type" : "object", "properties" : { "id" : { @@ -953,7 +972,7 @@ "description" : "Recognized healthcare entities in the document.", "readOnly" : true, "items" : { - "$ref" : "#/definitions/BioEntityRecord" + "$ref" : "#/definitions/HealthcareEntity" } }, "relations" : { @@ -961,7 +980,7 @@ "description" : "Relations of recognized healthcare entities in the document.", "readOnly" : true, "items" : { - "$ref" : "#/definitions/RelationRecord" + "$ref" : "#/definitions/HealthcareRelation" } }, "statistics" : { @@ -970,20 +989,20 @@ } } }, - "BioEntityRecord" : { // HealthcareEntity + "HealthcareEntity" : { "type" : "object", "properties" : { "text" : { "type" : "string", "description" : "Entity text as appears in the request." }, - "type" : { + "id" : { "type" : "string", - "description" : "Entity type, such as DOSAGE/FREQUENCY etc." + "description" : "Unique Id of the entity (used for matching between relation and entity results)." }, - "category" : { + "type" : { "type" : "string", - "description" : "Entity category, such as MEDICATION etc -- (TBD)." + "description" : "Entity type, such as DOSAGE/FREQUENCY etc." }, "offset" : { "type" : "integer", @@ -1003,62 +1022,42 @@ "umlsId" : { "type" : "string", "description" : "(Optional) Id from the Unified Medical Language System (UMLS)." + }, + "category" : { + "type" : "string", + "description" : "(Optional) Entity category, such as MEDICATION etc -- (TBD)." } } }, - "RelationRecord" : { + "HealthcareRelation" : { "type" : "object", "properties" : { "relationType" : { "type" : "string", - "description" : "Relation types of the related entities, such as DOSAGE_OF_MEDICATION etc." + "description" : "Relation types of the related entities, such as DOSAGE_OF_MEDICATION/TIME_OF_MEDICATION etc." }, "score" : { "type" : "string", "description" : "Confidence score of the relation." }, - "entityInfo" : { + "entities" : { "type" : "array", - "description" : "Related entities. // To-do: entity info? Or just BioEntityRecord?", + "description" : "Related entities", "items" : { - "$ref" : "#/definitions/EntityInfo" + "$ref" : "#/definitions/EntityRole" } } } }, - "EntityInfo" : { + "EntityRole" : { "type" : "object", "properties" : { - "text" : { - "type" : "string", - "description" : "Entity text as appears in the request." - }, - "type" : { - "type" : "string", - "description" : "Entity type, such as DOSAGE/FREQUENCY etc." - }, - "category" : { + "id" : { "type" : "string", - "description" : "Entity category, such as MEDICATION etc -- (TBD)." - }, - "offset" : { - "type" : "integer", - "format" : "int32", - "description" : "Start position (in Unicode characters) for the entity text." - }, - "length" : { - "type" : "integer", - "format" : "int32", - "description" : "Length (in Unicode characters) for the entity text." - }, - "score" : { - "type" : "number", - "format" : "double", - "description" : "Confidence score of the extracted entity." + "description" : "Unique Id of the entity (used for matching between relation and entity results)." }, "role" : { - "type" : "number", - "format" : "double", + "type" : "string", "description" : "Role of the extracted entity." } } @@ -1085,6 +1084,11 @@ "statistics" : { "readOnly" : true, "$ref" : "#/definitions/RequestStatistics" + }, + "modelVersion" : { + "readOnly" : true, + "type" : "string", + "description" : "(Optional) if modelVersion=true was specified in the request this field will indicate which model is used for scoring." } } }, @@ -1100,7 +1104,7 @@ "description" : "Recognized well-known entities in the document.", "readOnly" : true, "items" : { - "$ref" : "#/definitions/EntityLinkingRecord" + "$ref" : "#/definitions/EntityLinking" } }, "statistics" : { @@ -1109,7 +1113,7 @@ } } }, - "EntityLinkingRecord" : { + "EntityLinking" : { "type" : "object", "properties" : { "name" : { @@ -1120,7 +1124,7 @@ "type" : "array", "description" : "List of instances this entity appears in the text.", "items" : { - "$ref" : "#/definitions/MatchRecord" + "$ref" : "#/definitions/Match" } }, "language" : "en", @@ -1152,7 +1156,7 @@ } } }, - "MatchRecord" : { + "Match" : { "type" : "object", "properties" : { "wikipediaScore" : { // score @@ -1198,6 +1202,11 @@ "statistics" : { "readOnly" : true, "$ref" : "#/definitions/RequestStatistics" + }, + "modelVersion" : { + "readOnly" : true, + "type" : "string", + "description" : "(Optional) if modelVersion=true was specified in the request this field will indicate which model is used for scoring." } } }, @@ -1296,6 +1305,11 @@ "statistics" : { "readOnly" : true, "$ref" : "#/definitions/RequestStatistics" + }, + "modelVersion" : { + "readOnly" : true, + "type" : "string", + "description" : "(Optional) if modelVersion=true was specified in the request this field will indicate which model is used for scoring." } } }, From f43427e9cf02064d568e115aa6e68c99ebe9e65a Mon Sep 17 00:00:00 2001 From: Han Li Date: Tue, 17 Sep 2019 16:28:35 -0700 Subject: [PATCH 10/62] update healthcare --- .../preview/v3.0-Preview.1/TextAnalytics.json | 88 ++++++++++++------- 1 file changed, 56 insertions(+), 32 deletions(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json index 43feb5519665..92b6d896e529 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json @@ -134,39 +134,63 @@ "description" : "A successful call results in a list of recognized entities returned for each valid document", "examples" : { "application/json" : { - "documents" : [ + "documents" : + [ { - "id": "48740a85-578b-4de2-a005-f932c2fe52d6", - "offset": 17, - "length": 4, - "text": "pain", - "type": "SYMPTOM_OR_SIGN", - "score": 0.9998, - "umlsId": "C0030193" - }, - { - "id": "7f6bf109-c897-418c-885a-1cf4ade2c314", - "offset": 25, - "length": 5, - "text": "lower", - "type": "DIRECTION", - "score": 0.9996 - }, - { - "id": "c6f217ed-2d48-4e4d-8f26-2299624a21a9", - "offset": 31, - "length": 3, - "text": "leg", - "type": "BODY_STRUCTURE", - "score": 0.9997, - "umlsId": "C1140621" - } ], - "relations" : [ { - "target" : "TBD", - "source" : "TBD", - "relationType" : "TBD" - } ] - } , + "id": "1", + "entities": [ + { + "id": "24d1116e-8b0f-4a91-a3a2-05ff499ec26a", + "offset": 11, + "length": 4, + "text": "oral", + "type": "ROUTE_OR_MODE", + "score": 0.9671 + }, + { + "id": "73acd11a-3289-4813-815c-34340f6394ec", + "offset": 16, + "length": 11, + "text": "antibiotics", + "type": "MEDICATION_CLASS", + "score": 0.9988, + "umlsId": "C0003232" + }, + { + "id": "97ac0c51-ab50-45cc-b832-9a2d074eda59", + "offset": 32, + "length": 7, + "text": "10 days", + "type": "TIME", + "score": 0.9965 + }, + { + "id": "96c4a5d9-0f53-41f8-9c93-0bfa7ee3a75d", + "offset": 48, + "length": 9, + "text": "infection", + "type": "DIAGNOSIS", + "score": 0.9724, + "umlsId": "C3714514" + } + ], + "relations": [ + { + "relationType": "DIRECTION_OF_BODY_STRUCTURE", + "score": 1, + "entities": [ + { + "id": "7f6bf109-c897-418c-885a-1cf4ade2c314", + "role": "ATTRIBUTE" + }, + { + "id": "c6f217ed-2d48-4e4d-8f26-2299624a21a9", + "role": "ENTITY" + } + ] + } + ] + } ], "errors" : [ ] } }, From 927619e7c618cb8968b54feeec58aeb3415c3ce7 Mon Sep 17 00:00:00 2001 From: Han Li Date: Tue, 17 Sep 2019 17:43:57 -0700 Subject: [PATCH 11/62] update entity linking --- .../preview/v3.0-Preview.1/TextAnalytics.json | 32 +++++++------------ 1 file changed, 11 insertions(+), 21 deletions(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json index 92b6d896e529..15fcb50d2c8b 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json @@ -92,7 +92,7 @@ } }, "schema" : { - "$ref" : "#/definitions/" + "$ref": "#/definitions/EntitiesBatchResult" } }, "500" : { @@ -1151,42 +1151,32 @@ "$ref" : "#/definitions/Match" } }, - "language" : "en", - "id" : "id", - "url": "url", - "datasource": "wikipedia", - - "language" : "en", - "id" : "id", - "url": "url", - "datasource": "skills", - - "wikipediaLanguage" : { + "language" : { "type" : "string", - "description" : "Wikipedia language for which the WikipediaId and WikipediaUrl refers to." + "description" : "Language used in the data source." }, - "wikipediaId" : { + "id" : { "type" : "string", - "description" : "Wikipedia unique identifier of the recognized entity." + "description" : "Unique identifier of the recognized entity from the data source." }, - "wikipediaUrl" : { + "url" : { "type" : "string", - "description" : "URL for the entity's Wikipedia page.", + "description" : "URL for the entity's page from the data source.", "readOnly" : true }, - "bingId" : { // "optional id" + "datasource" : { "type" : "string", - "description" : "Bing unique identifier of the recognized entity." + "description" : "Datasource used to extract entity linking, such as Wiki/Bing etc." } } }, "Match" : { "type" : "object", "properties" : { - "wikipediaScore" : { // score + "score" : { "type" : "number", "format" : "double", - "description" : "(optional) If a well-known item with Wikipedia link is recognized, a decimal number denoting the confidence level of the Wikipedia info will be returned." + "description" : "(optional) If a well-known item is recognized, a decimal number denoting the confidence level will be returned." }, "text" : { "type" : "string", From a97b65c82a423c99f75b8fac2da3fed5c52e88eb Mon Sep 17 00:00:00 2001 From: Han Li Date: Wed, 18 Sep 2019 14:48:19 -0700 Subject: [PATCH 12/62] update naming/description --- .../preview/v3.0-Preview.1/TextAnalytics.json | 171 +++++++----------- 1 file changed, 69 insertions(+), 102 deletions(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json index 15fcb50d2c8b..e1bd3771c13d 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json @@ -32,17 +32,17 @@ ] }, "paths" : { - "/entities/recognition" : { + "/entities/recognition/general" : { "post" : { "summary" : "Entities from open domain", - "description" : "The API returns a list of general named entities in a given document. See the Supported Entity Types in Text Analytics API for the list of supported Entity Types. See the Supported languages in Text Analytics API for the list of enabled languages.\n", + "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. For the list of enabled languages, check Supported languages in Text Analytics API.\n", "operationId" : "5ac4251d5b4ccd1554da7631", "consumes" : [ "application/json", "text/json" ], "produces" : [ "application/json", "text/json" ], "parameters" : [ { "name" : "modelVersion", "in" : "query", - "description" : "(optional) This value indicates which model be used for scoring.", + "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" }, { "name" : "showStats", @@ -69,7 +69,7 @@ "type" : "Organization", "offset" : 25, "length" : 9, - "score" : 0.9 + "score" : 0.99 } ] }, { "id" : "2", @@ -78,21 +78,21 @@ "type" : "Person", "offset" : 25, "length" : 9, - "score" : 0.9 + "score" : 0.99 }, { "text" : 20, "type" : "Number", "subType" : "Age", "offset" : 30, "length" : 2, - "score" : 0.8 + "score" : 0.88 } ] } ], "errors" : [ ] } }, "schema" : { - "$ref": "#/definitions/EntitiesBatchResult" + "$ref": "#/definitions/EntitiesResult" } }, "500" : { @@ -114,7 +114,7 @@ "parameters" : [ { "name" : "modelVersion", "in" : "query", - "description" : "(optional) This value indicates which model be used for scoring .", + "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" }, { "name" : "showStats", @@ -195,7 +195,7 @@ } }, "schema" : { - "$ref" : "#/definitions/HealthcareBatchResult" + "$ref" : "#/definitions/HealthcareResult" } }, "500" : { @@ -217,7 +217,7 @@ "parameters" : [ { "name" : "modelVersion", "in" : "query", - "description" : "(optional) This value indicates which model be used for scoring .", + "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" }, { "name" : "showStats", @@ -244,19 +244,13 @@ "type" : "SSN", "offset" : 22, "length" : 11 - }, { - "text" : "23902039I23J902RJ32", - "type" : "National_ID", - "subType" : "Country_ID", - "offset" : 20, - "length" : 55 - } ] + }] } ], "errors" : [ ] } }, "schema" : { - "$ref" : "#/definitions/EntitiesBatchResult" + "$ref" : "#/definitions/EntitiesResult" } }, "500" : { @@ -278,7 +272,7 @@ "parameters" : [ { "name" : "modelVersion", "in" : "query", - "description" : "(optional) This value indicates which model be used for scoring .", + "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" }, { "name" : "showStats", @@ -303,66 +297,39 @@ "entities" : [ { "name" : "Microsoft", "matches" : [ { - "wikipediaScore" : 0.9, + "score" : 0.88, "text" : "MSFT", "offset" : 0, "length" : 4 }, { - "wikipediaScore" : 0.8, + "score" : 0.99, "text" : "Microsoft", "offset" : 25, "length" : 9 } ], - "wikipediaLanguage" : "en", - "wikipediaId" : "Microsoft", - "wikipediaUrl" : "https://en.wikipedia.org/wiki/Microsoft", - "bingId" : "a093e9b9-90f5-a3d5-c4b8-5855e1b01f85" + "language" : "en", + "id" : "Microsoft", + "url" : "https://en.wikipedia.org/wiki/Microsoft", + "dataSource" : "Wikipedia" }, { "name" : "Windows 10", "matches" : [ { - "wikipediaScore" : 0.8, + "score" : 0.88, "text" : "Windows 10", "offset" : 44, "length" : 10 } ], - "wikipediaLanguage" : "en", - "wikipediaId" : "Windows 10", - "wikipediaUrl" : "https://en.wikipedia.org/wiki/Windows_10", - "bingId" : "5f9fbd03-49c4-39ef-cc95-de83ab897b94" + "language" : "en", + "id" : "Windows 10", + "url" : "https://en.wikipedia.org/wiki/Windows_10", + "dataSource" : "Wikipedia" } ] - }, { - "id" : "2", - "entities" : [ { - "name" : "Application programming interface", - "matches" : [ { - "wikipediaScore" : 0.8, - "text" : "API", - "offset" : 31, - "length" : 3 - } ], - "wikipediaLanguage" : "en", - "wikipediaId" : "Application programming interface", - "wikipediaUrl" : "https://en.wikipedia.org/wiki/Application_programming_interface", - "bingId" : "e8c1a257-7315-a482-c81d-202a0260e4ed" - }, { - "name" : "Microsoft", - "matches" : [ { - "wikipediaScore" : 0.8, - "text" : "Microsoft", - "offset" : 40, - "length" : 9 - } ], - "wikipediaLanguage" : "en", - "wikipediaId" : "Microsoft", - "wikipediaUrl" : "https://en.wikipedia.org/wiki/Microsoft", - "bingId" : "a093e9b9-90f5-a3d5-c4b8-5855e1b01f85" - } ] - } ], + }], "errors" : [ ] } }, "schema" : { - "$ref" : "#/definitions/EntityLinkingBatchResult" + "$ref" : "#/definitions/EntityLinkingResult" } }, "500" : { @@ -384,7 +351,7 @@ "parameters" : [ { "name" : "modelVersion", "in" : "query", - "description" : "(optional) This value indicates which model be used for scoring .", + "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" }, { "name" : "showStats", @@ -418,7 +385,7 @@ } }, "schema" : { - "$ref" : "#/definitions/KeyPhraseBatchResult" + "$ref" : "#/definitions/KeyPhraseResult" } }, "500" : { @@ -440,7 +407,7 @@ "parameters" : [ { "name" : "modelVersion", "in" : "query", - "description" : "(optional) This value indicates which model be used for scoring .", + "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" }, { "name" : "showStats", @@ -493,7 +460,7 @@ } }, "schema" : { - "$ref" : "#/definitions/LanguageBatchResult" + "$ref" : "#/definitions/LanguageResult" } }, "500" : { @@ -515,7 +482,7 @@ "parameters" : [ { "name" : "modelVersion", "in" : "query", - "description" : "(optional) This value indicates which model be used for scoring .", + "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" }, { "name" : "showStats", @@ -684,30 +651,30 @@ "properties": { "code": { "type": "string", - "description" : "One of a server-defined set of error codes." + "description" : "Error code." }, "message": { "type": "string", - "description" : "A human-readable representation of the error." + "description" : "Error message." }, "target": { "type": "string", - "description" : "(Optional) The target of the error." + "description" : "(Optional) Error target." }, "innerError": { - "$ref": "#/definitions/InternalError", - "description" : "(Optional) An object containing more specific information than the current object about the error." + "$ref": "#/definitions/InnerError", + "description" : "(Optional) InnerError contains more specific information." }, "details": { "type": "array", - "description" : "(Optional) An array of details about specific errors that led to this reported error.", + "description" : "(Optional) Details about specific errors that led to this reported error.", "items" : { "$ref" : "#/definitions/ErrorResponse" } } } }, - "InternalError": { + "InnerError": { "type": "object", "properties": { "code": { @@ -871,7 +838,7 @@ } } }, - "EntitiesBatchResult" : { + "EntitiesResult" : { "type" : "object", "properties" : { "documents" : { @@ -879,7 +846,7 @@ "description" : "Response by document", "readOnly" : true, "items" : { - "$ref" : "#/definitions/EntitiesBatchResultItem" + "$ref" : "#/definitions/DocumentEntities" } }, "errors" : { @@ -901,7 +868,7 @@ } } }, - "EntitiesBatchResultItem" : { + "DocumentEntities" : { "type" : "object", "properties" : { "id" : { @@ -954,7 +921,7 @@ } } }, - "HealthcareBatchResult" : { + "HealthcareResult" : { "type" : "object", "properties" : { "documents" : { @@ -962,7 +929,7 @@ "description" : "Response by document", "readOnly" : true, "items" : { - "$ref" : "#/definitions/HealthcareBatchResultItem" + "$ref" : "#/definitions/DocumentHealthcareEntities" } }, "errors" : { @@ -984,7 +951,7 @@ } } }, - "HealthcareBatchResultItem" : { + "DocumentHealthcareEntities" : { "type" : "object", "properties" : { "id" : { @@ -1086,7 +1053,7 @@ } } }, - "EntityLinkingBatchResult" : { + "EntityLinkingResult" : { "type" : "object", "properties" : { "documents" : { @@ -1094,7 +1061,7 @@ "description" : "Response by document", "readOnly" : true, "items" : { - "$ref" : "#/definitions/EntityLinkingBatchResultItem" + "$ref" : "#/definitions/DocumentLinkedEntities" } }, "errors" : { @@ -1116,7 +1083,7 @@ } } }, - "EntityLinkingBatchResultItem" : { + "DocumentLinkedEntities" : { "type" : "object", "properties" : { "id" : { @@ -1128,7 +1095,7 @@ "description" : "Recognized well-known entities in the document.", "readOnly" : true, "items" : { - "$ref" : "#/definitions/EntityLinking" + "$ref" : "#/definitions/LinkedEntity" } }, "statistics" : { @@ -1137,7 +1104,7 @@ } } }, - "EntityLinking" : { + "LinkedEntity" : { "type" : "object", "properties" : { "name" : { @@ -1164,9 +1131,9 @@ "description" : "URL for the entity's page from the data source.", "readOnly" : true }, - "datasource" : { + "dataSource" : { "type" : "string", - "description" : "Datasource used to extract entity linking, such as Wiki/Bing etc." + "description" : "Data source used to extract entity linking, such as Wiki/Bing etc." } } }, @@ -1194,7 +1161,7 @@ } } }, - "KeyPhraseBatchResult" : { + "KeyPhraseResult" : { "type" : "object", "properties" : { "documents" : { @@ -1202,7 +1169,7 @@ "description" : "Response by document", "readOnly" : true, "items" : { - "$ref" : "#/definitions/KeyPhraseBatchResultItem" + "$ref" : "#/definitions/DocumentKeyPhrases" } }, "errors" : { @@ -1224,7 +1191,7 @@ } } }, - "KeyPhraseBatchResultItem" : { + "DocumentKeyPhrases" : { "type" : "object", "properties" : { "id" : { @@ -1259,24 +1226,24 @@ "application/json" : { "documents": [ { - "countryHint": "US", - "id": "1", - "text": "Hello world" + "id": "1", + "text": "Hello world", + "countryHint": "US" }, { - "countryHint": "US", "id": "2", - "text": "Bonjour tout le monde" + "text": "Bonjour tout le monde", + "countryHint": "US" }, { - "countryHint": "US", "id": "3", - "text": "La carretera estaba atascada. Había mucho tráfico el día de ayer." + "text": "La carretera estaba atascada. Había mucho tráfico el día de ayer.", + "countryHint": "US" }, { - "countryHint": "US", "id": "4", - "text": ":) :( :D" + "text": ":) :( :D", + "countryHint": "US" } ] } @@ -1285,19 +1252,19 @@ "LanguageInput" : { "type" : "object", "properties" : { - "countryHint" : { - "type" : "string" - }, "id" : { "type" : "string", "description" : "Unique, non-empty document identifier." }, "text" : { "type" : "string" + }, + "countryHint" : { + "type" : "string" } } }, - "LanguageBatchResult" : { + "LanguageResult" : { "type" : "object", "properties" : { "documents" : { @@ -1305,7 +1272,7 @@ "description" : "Response by document", "readOnly" : true, "items" : { - "$ref" : "#/definitions/LanguageBatchResultItem" + "$ref" : "#/definitions/DocumentLanguage" } }, "errors" : { @@ -1327,7 +1294,7 @@ } } }, - "LanguageBatchResultItem" : { + "DocumentLanguage" : { "type" : "object", "properties" : { "id" : { From e06334d3d9ade0755b98bced795888436e25d474 Mon Sep 17 00:00:00 2001 From: Han Li Date: Wed, 18 Sep 2019 15:02:07 -0700 Subject: [PATCH 13/62] update pii --- .../preview/v3.0-Preview.1/TextAnalytics.json | 21 ++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json index e1bd3771c13d..5d3bf13a57bb 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json @@ -240,12 +240,23 @@ "documents" : [ { "id" : "1", "entities" : [ { - "text" : "111-22-5555", - "type" : "SSN", - "offset" : 22, - "length" : 11 + "text": "897-09-9876", + "type": "U.S. Social Security Number (SSN)", + "offset": 10, + "length": 11, + "Score": 0.65 }] - } ], + }, { + "id" : "1", + "entities" : [ { + "text": "111000025", + "type": "ABA Routing Number", + "offset": 18, + "length": 9, + "score": 0.75 + }] + } + ], "errors" : [ ] } }, From ada1080ccc1c011374d478c7ebe4fa8e22c179a3 Mon Sep 17 00:00:00 2001 From: Han Li Date: Wed, 18 Sep 2019 17:18:45 -0700 Subject: [PATCH 14/62] update required --- .../preview/v3.0-Preview.1/TextAnalytics.json | 187 +++++++++++++++--- 1 file changed, 156 insertions(+), 31 deletions(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json index 5d3bf13a57bb..fbc9c7e19d06 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json @@ -53,6 +53,7 @@ "in" : "body", "name" : "multiLanguageBatchInput", "description" : "Collection of documents to analyze.", + "required": true, "schema" : { "$ref" : "#/definitions/MultiLanguageBatchInput" } @@ -125,6 +126,7 @@ "in" : "body", "name" : "multiLanguageBatchInput", "description" : "Collection of documents to analyze.", + "required": true, "schema" : { "$ref" : "#/definitions/MultiLanguageBatchInput" } @@ -228,6 +230,7 @@ "in" : "body", "name" : "multiLanguageBatchInput", "description" : "Collection of documents to analyze.", + "required": true, "schema" : { "$ref" : "#/definitions/MultiLanguageBatchInput" } @@ -294,6 +297,7 @@ "in" : "body", "name" : "multiLanguageBatchInput", "description" : "Collection of documents to analyze.", + "required": true, "schema" : { "$ref" : "#/definitions/MultiLanguageBatchInput" } @@ -373,6 +377,7 @@ "in" : "body", "name" : "multiLanguageBatchInput", "description" : "Collection of documents to analyze. Documents can now contain a language field to indicate the text language", + "required": true, "schema" : { "$ref" : "#/definitions/MultiLanguageBatchInput" } @@ -429,6 +434,7 @@ "in" : "body", "name" : "languageBatchInput", "description" : "Collection of documents to analyze.", + "required": true, "schema" : { "$ref" : "#/definitions/LanguageBatchInput" } @@ -504,6 +510,7 @@ "in" : "body", "name" : "multiLanguageBatchInput", "description" : "Collection of documents to analyze.", + "required": true, "schema" : { "$ref" : "#/definitions/MultiLanguageBatchInput" } @@ -606,11 +613,13 @@ "definitions" : { "MultiLanguageBatchInput" : { "type" : "object", + "required" : [ + "documents" + ], "properties" : { "documents" : { "type" : "array", "description" : "The set of documents to process as part of this batch.", - "readOnly" : true, "items" : { "$ref" : "#/definitions/MultiLanguageInput" } @@ -641,11 +650,11 @@ }, "MultiLanguageInput" : { "type" : "object", + "required" : [ + "id", + "text" + ], "properties" : { - "language" : { - "type" : "string", - "description" : "This is the 2 letter ISO 639-1 representation of a language. For example, use \"en\" for English; \"es\" for Spanish etc.,." - }, "id" : { "type" : "string", "description" : "A unique, non-empty document identifier." @@ -653,12 +662,20 @@ "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." }, "ErrorResponse": { "type": "object", + "required" : [ + "code", + "message" + ], "properties": { "code": { "type": "string", @@ -687,23 +704,31 @@ }, "InnerError": { "type": "object", + "required" : [ + "code", + "message" + ], "properties": { "code": { "type": "string", - "description" : "One of a server-defined set of error codes." + "description" : "Error code." }, "message": { "type": "string", - "description" : "A human-readable representation of the error." + "description" : "Error message." }, "target": { "type": "string", - "description" : "(Optional) The target of the error." + "description" : "(Optional) Error target." } } }, "SentimentResponse" : { "type" : "object", + "required" : [ + "documents", + "errors" + ], "properties" : { "documents" : { "type" : "array", @@ -734,6 +759,12 @@ }, "DocumentSentiment" : { "type" : "object", + "required" : [ + "id", + "sentiment", + "documentScores", + "sentences" + ], "properties" : { "id" : { "type" : "string", @@ -761,6 +792,12 @@ }, "RequestStatistics" : { "type" : "object", + "required" : [ + "documentsCount", + "validDocumentsCount", + "erroneousDocumentsCount", + "transactionsCount" + ], "properties" : { "documentsCount" : { "type" : "integer", @@ -787,6 +824,10 @@ }, "DocumentStatistics" : { "type" : "object", + "required" : [ + "charactersCount", + "transactionsCount" + ], "properties" : { "charactersCount" : { "type" : "integer", @@ -803,6 +844,11 @@ }, "SentimentConfidenceScorePerLabel" : { "type" : "object", + "required" : [ + "positive", + "neutral", + "negative" + ], "properties" : { "positive" : { "type" : "number", @@ -821,6 +867,13 @@ }, "SentenceSentiment" : { "type" : "object", + "required" : [ + "sentiment", + "sentenceScores", + "offset", + "length", + "warnings" + ], "properties" : { "sentiment" : { "type" : "string", @@ -851,11 +904,14 @@ }, "EntitiesResult" : { "type" : "object", + "required" : [ + "documents", + "errors" + ], "properties" : { "documents" : { "type" : "array", "description" : "Response by document", - "readOnly" : true, "items" : { "$ref" : "#/definitions/DocumentEntities" } @@ -863,17 +919,14 @@ "errors" : { "type" : "array", "description" : "Errors and Warnings by document", - "readOnly" : true, "items" : { "$ref" : "#/definitions/ErrorResponse" } }, "statistics" : { - "readOnly" : true, "$ref" : "#/definitions/RequestStatistics" }, "modelVersion" : { - "readOnly" : true, "type" : "string", "description" : "(Optional) if modelVersion=true was specified in the request this field will indicate which model is used for scoring." } @@ -881,6 +934,10 @@ }, "DocumentEntities" : { "type" : "object", + "required" : [ + "id", + "entities" + ], "properties" : { "id" : { "type" : "string", @@ -889,7 +946,6 @@ "entities" : { "type" : "array", "description" : "Recognized entities in the document.", - "readOnly" : true, "items" : { "$ref" : "#/definitions/Entity" } @@ -902,6 +958,13 @@ }, "Entity" : { "type" : "object", + "required" : [ + "text", + "type", + "offset", + "length", + "score" + ], "properties" : { "text" : { "type" : "string", @@ -913,7 +976,7 @@ }, "subType" : { "type" : "string", - "description" : "Entity sub type, such as Age/Year/TimeRange etc" + "description" : "(Optional) Entity sub type, such as Age/Year/TimeRange etc" }, "offset" : { "type" : "integer", @@ -934,6 +997,10 @@ }, "HealthcareResult" : { "type" : "object", + "required" : [ + "documents", + "errors" + ], "properties" : { "documents" : { "type" : "array", @@ -964,6 +1031,10 @@ }, "DocumentHealthcareEntities" : { "type" : "object", + "required" : [ + "id", + "entities" + ], "properties" : { "id" : { "type" : "string", @@ -979,7 +1050,7 @@ }, "relations" : { "type" : "array", - "description" : "Relations of recognized healthcare entities in the document.", + "description" : "(Optional) Relations of recognized healthcare entities in the document.", "readOnly" : true, "items" : { "$ref" : "#/definitions/HealthcareRelation" @@ -993,6 +1064,14 @@ }, "HealthcareEntity" : { "type" : "object", + "required" : [ + "text", + "id", + "type", + "offset", + "length", + "score" + ], "properties" : { "text" : { "type" : "string", @@ -1033,6 +1112,11 @@ }, "HealthcareRelation" : { "type" : "object", + "required" : [ + "relationType", + "score", + "entities" + ], "properties" : { "relationType" : { "type" : "string", @@ -1053,6 +1137,10 @@ }, "EntityRole" : { "type" : "object", + "required" : [ + "id", + "role" + ], "properties" : { "id" : { "type" : "string", @@ -1066,11 +1154,14 @@ }, "EntityLinkingResult" : { "type" : "object", + "required" : [ + "documents", + "errors" + ], "properties" : { "documents" : { "type" : "array", "description" : "Response by document", - "readOnly" : true, "items" : { "$ref" : "#/definitions/DocumentLinkedEntities" } @@ -1078,17 +1169,14 @@ "errors" : { "type" : "array", "description" : "Errors and Warnings by document", - "readOnly" : true, "items" : { "$ref" : "#/definitions/ErrorResponse" } }, "statistics" : { - "readOnly" : true, "$ref" : "#/definitions/RequestStatistics" }, "modelVersion" : { - "readOnly" : true, "type" : "string", "description" : "(Optional) if modelVersion=true was specified in the request this field will indicate which model is used for scoring." } @@ -1096,6 +1184,10 @@ }, "DocumentLinkedEntities" : { "type" : "object", + "required" : [ + "id", + "entities" + ], "properties" : { "id" : { "type" : "string", @@ -1117,6 +1209,15 @@ }, "LinkedEntity" : { "type" : "object", + "required" : [ + "name", + "matches", + "language", + "id", + "url", + "dataSource" + ], + "properties" : { "name" : { "type" : "string", @@ -1140,7 +1241,6 @@ "url" : { "type" : "string", "description" : "URL for the entity's page from the data source.", - "readOnly" : true }, "dataSource" : { "type" : "string", @@ -1150,6 +1250,12 @@ }, "Match" : { "type" : "object", + "required" : [ + "score", + "text", + "offset", + "length" + ], "properties" : { "score" : { "type" : "number", @@ -1174,11 +1280,14 @@ }, "KeyPhraseResult" : { "type" : "object", + "required" : [ + "documents", + "errors" + ], "properties" : { "documents" : { "type" : "array", "description" : "Response by document", - "readOnly" : true, "items" : { "$ref" : "#/definitions/DocumentKeyPhrases" } @@ -1186,17 +1295,14 @@ "errors" : { "type" : "array", "description" : "Errors and Warnings by document", - "readOnly" : true, "items" : { "$ref" : "#/definitions/ErrorResponse" } }, "statistics" : { - "readOnly" : true, "$ref" : "#/definitions/RequestStatistics" }, "modelVersion" : { - "readOnly" : true, "type" : "string", "description" : "(Optional) if modelVersion=true was specified in the request this field will indicate which model is used for scoring." } @@ -1204,6 +1310,10 @@ }, "DocumentKeyPhrases" : { "type" : "object", + "required" : [ + "id", + "keyPhrases" + ], "properties" : { "id" : { "type" : "string", @@ -1212,7 +1322,6 @@ "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.", - "readOnly" : true, "items" : { "type" : "string" } @@ -1225,6 +1334,9 @@ }, "LanguageBatchInput" : { "type" : "object", + "required" : [ + "documents" + ], "properties" : { "documents" : { "type" : "array", @@ -1262,6 +1374,10 @@ }, "LanguageInput" : { "type" : "object", + "required" : [ + "id", + "text" + ], "properties" : { "id" : { "type" : "string", @@ -1277,11 +1393,14 @@ }, "LanguageResult" : { "type" : "object", + "required" : [ + "documents", + "errors" + ], "properties" : { "documents" : { "type" : "array", "description" : "Response by document", - "readOnly" : true, "items" : { "$ref" : "#/definitions/DocumentLanguage" } @@ -1289,17 +1408,14 @@ "errors" : { "type" : "array", "description" : "Errors and Warnings by document", - "readOnly" : true, "items" : { "$ref" : "#/definitions/ErrorResponse" } }, "statistics" : { - "readOnly" : true, "$ref" : "#/definitions/RequestStatistics" }, "modelVersion" : { - "readOnly" : true, "type" : "string", "description" : "(Optional) if modelVersion=true was specified in the request this field will indicate which model is used for scoring." } @@ -1307,12 +1423,16 @@ }, "DocumentLanguage" : { "type" : "object", + "required" : [ + "id", + "detectedLanguage" + ], "properties" : { "id" : { "type" : "string", "description" : "Unique, non-empty document identifier." }, - "detectedLanguages" : { + "detectedLanguage" : { "type" : "array", "description" : "A list of extracted languages.", "items" : { @@ -1327,6 +1447,11 @@ }, "DetectedLanguage" : { "type" : "object", + "required" : [ + "name", + "iso6391Name", + "score" + ], "properties" : { "name" : { "type" : "string", From a15045c3b1b1cbb14015cf13be197d16d02838cd Mon Sep 17 00:00:00 2001 From: Han Li Date: Thu, 19 Sep 2019 01:14:32 -0700 Subject: [PATCH 15/62] udpate required --> still need kv pair for details inside innererror --- .../preview/v3.0-Preview.1/TextAnalytics.json | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json index fbc9c7e19d06..24510d927c80 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json @@ -720,6 +720,10 @@ "target": { "type": "string", "description" : "(Optional) Error target." + }, + "innerError": { + "$ref": "#/definitions/InnerError", + "description" : "(Optional) InnerError contains more specific information." } } }, @@ -733,7 +737,6 @@ "documents" : { "type" : "array", "description" : "Sentiment analysis per document.", - "readOnly" : true, "items" : { "$ref" : "#/definitions/DocumentSentiment" } @@ -741,17 +744,14 @@ "errors" : { "type" : "array", "description" : "Errors by document id.", - "readOnly" : true, "items" : { "$ref" : "#/definitions/ErrorResponse" } }, "statistics" : { - "readOnly" : true, "$ref" : "#/definitions/RequestStatistics" }, "modelVersion" : { - "readOnly" : true, "type" : "string", "description" : "(Optional) if modelVersion=true was specified in the request this field will indicate which model is used for scoring." } @@ -1005,7 +1005,6 @@ "documents" : { "type" : "array", "description" : "Response by document", - "readOnly" : true, "items" : { "$ref" : "#/definitions/DocumentHealthcareEntities" } @@ -1013,17 +1012,14 @@ "errors" : { "type" : "array", "description" : "Errors and Warnings by document", - "readOnly" : true, "items" : { "$ref" : "#/definitions/ErrorResponse" } }, "statistics" : { - "readOnly" : true, "$ref" : "#/definitions/RequestStatistics" }, "modelVersion" : { - "readOnly" : true, "type" : "string", "description" : "(Optional) if modelVersion=true was specified in the request this field will indicate which model is used for scoring." } @@ -1043,7 +1039,6 @@ "entities" : { "type" : "array", "description" : "Recognized healthcare entities in the document.", - "readOnly" : true, "items" : { "$ref" : "#/definitions/HealthcareEntity" } @@ -1051,7 +1046,6 @@ "relations" : { "type" : "array", "description" : "(Optional) Relations of recognized healthcare entities in the document.", - "readOnly" : true, "items" : { "$ref" : "#/definitions/HealthcareRelation" } @@ -1196,7 +1190,6 @@ "entities" : { "type" : "array", "description" : "Recognized well-known entities in the document.", - "readOnly" : true, "items" : { "$ref" : "#/definitions/LinkedEntity" } @@ -1240,7 +1233,7 @@ }, "url" : { "type" : "string", - "description" : "URL for the entity's page from the data source.", + "description" : "URL for the entity's page from the data source." }, "dataSource" : { "type" : "string", From 5fa917ccea1b6a11109c97ffcbb814afb029b0e3 Mon Sep 17 00:00:00 2001 From: Han Li Date: Fri, 20 Sep 2019 00:21:33 -0700 Subject: [PATCH 16/62] update summary and description --- .../preview/v3.0-Preview.1/TextAnalytics.json | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json index 24510d927c80..691c5d7b6a3b 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json @@ -3,7 +3,7 @@ "info" : { "description" : "The Text Analytics API is a suite of text analytics web services built with best-in-class Microsoft machine learning algorithms. \nThe API can be used to analyze unstructured text for tasks such as sentiment analysis, key phrase and entity extraction as well as language detection. \nNo training data is needed to use this API; just bring your text data. \nThis API uses advanced natural language processing techniques to deliver best in class predictions.\n\nFurther documentation can be found in https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/overview\n\nThis API is currently available in:\n\n* Australia East - australiaeast.api.cognitive.microsoft.com\n* Brazil South - brazilsouth.api.cognitive.microsoft.com\n* Canada Central - canadacentral.api.cognitive.microsoft.com\n* Central India - centralindia.api.cognitive.microsoft.com\n* Central US - centralus.api.cognitive.microsoft.com\n* East Asia - eastasia.api.cognitive.microsoft.com\n* East US - eastus.api.cognitive.microsoft.com\n* East US 2 - eastus2.api.cognitive.microsoft.com\n* France Central - francecentral.api.cognitive.microsoft.com\n* Japan East - japaneast.api.cognitive.microsoft.com\n* Japan West - japanwest.api.cognitive.microsoft.com\n* Korea Central - koreacentral.api.cognitive.microsoft.com\n* North Central US - northcentralus.api.cognitive.microsoft.com\n* North Europe - northeurope.api.cognitive.microsoft.com\n* South Africa North - southafricanorth.api.cognitive.microsoft.com\n* South Central US - southcentralus.api.cognitive.microsoft.com\n* Southeast Asia - southeastasia.api.cognitive.microsoft.com\n* UK South - uksouth.api.cognitive.microsoft.com\n* West Central US - westcentralus.api.cognitive.microsoft.com\n* West Europe - westeurope.api.cognitive.microsoft.com\n* West US - westus.api.cognitive.microsoft.com\n* West US 2 - westus2.api.cognitive.microsoft.com", "version" : "V3.0-Preview.1", - "title" : "Text Analytics API (V3.0-Preview.1)", + "title" : "Text Analytics API", "contact": { "name": "Microsoft Cognitive Services", "url": "https://azure.microsoft.com/en-us/services/cognitive-services/text-analytics/", @@ -115,7 +115,7 @@ "parameters" : [ { "name" : "modelVersion", "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. ", + "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" }, { "name" : "showStats", @@ -212,7 +212,7 @@ "/entities/recognition/pii" : { "post" : { "summary" : "Entities from Personally Identifiable Information (PII) domain", - "description" : "The API returns a list of pii entities (\\\"SSN\\\", \\\"Bank Account\\\", \\\"Goverment ID\\\" etc) in a given document. See the Supported languages in Text Analytics API for the list of enabled languages.\n", + "description" : "The API returns a list of personally identifiable information (PII) entities (\\\"SSN\\\", \\\"Bank Account\\\" etc) in the document. See the <a href=\"https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/text-analytics-supported-languages\">Supported languages in Text Analytics API</a> for the list of enabled languages.\n", "operationId" : "5ac4251d5b4ccd1554da7633", "consumes" : [ "application/json", "text/json" ], "produces" : [ "application/json", "text/json" ], @@ -278,8 +278,8 @@ }, "/entities/linking" : { "post" : { - "summary" : "Entities from Well-Known domain", - "description" : "The API returns a list of recognized entities in a given document. To get even more information on each recognized entity we recommend using the Bing Entity Search API by querying for the recognized entities names. See the Supported languages in Text Analytics API.\n", + "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 <a href=\"https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/text-analytics-supported-languages\">Supported languages in Text Analytics API.\n", "operationId" : "5ac4251d5b4ccd1554da7635", "consumes" : [ "application/json", "text/json" ], "produces" : [ "application/json", "text/json" ], @@ -359,7 +359,7 @@ "/keyPhrases" : { "post" : { "summary" : "Key Phrases", - "description" : "The API returns a list of strings denoting the key talking points in the input text. See the Supported languages in Text Analytics API for the list of enabled languages.", + "description" : "The API returns a list of strings denoting the key phrases in the input text. See the <a href=\"https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/text-analytics-supported-languages\">Supported languages in Text Analytics API</a> for the list of enabled languages.", "operationId" : "56f30ceeeda5650db055a3c6", "consumes" : [ "application/json", "text/json" ], "produces" : [ "application/json", "text/json" ], @@ -492,7 +492,7 @@ "/sentiment" : { "post" : { "summary" : "Sentiment", - "description" : "The API returns a document sentiment prediction, as well as sentiment scores for each sentiment class (Positive, Negative, and Neutral).In addition, sentence level sentiment predictions are returned. See the Supported languages in Text Analytics API for the list of enabled languages.", + "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 <a href=\"https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/text-analytics-supported-languages\">Supported languages in Text Analytics API</a> for the list of enabled languages.", "operationId" : "56f30ceeeda5650db055a3c9", "consumes" : [ "application/json", "text/json" ], "produces" : [ "application/json", "text/json" ], @@ -637,7 +637,7 @@ { "language": "en", "id": "2", - "text": "It's incredibly sunny outside! I'm so happy." + "text": "It's sunny outside! I'm so happy." }, { "language": "en", @@ -1206,7 +1206,6 @@ "name", "matches", "language", - "id", "url", "dataSource" ], From e09f68d115f9475f5fe17bdb4161eeb925cb07d5 Mon Sep 17 00:00:00 2001 From: Han Li Date: Mon, 23 Sep 2019 14:44:53 -0700 Subject: [PATCH 17/62] resolve comments -- update opreationid, model-version, errors, etc --- .../preview/v3.0-Preview.1/TextAnalytics.json | 79 ++++++++++--------- 1 file changed, 42 insertions(+), 37 deletions(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json index 691c5d7b6a3b..fdd7a901d393 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json @@ -36,11 +36,11 @@ "post" : { "summary" : "Entities from open domain", "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. For the list of enabled languages, check Supported languages in Text Analytics API.\n", - "operationId" : "5ac4251d5b4ccd1554da7631", + "operationId" : "/entities/recognition/general", "consumes" : [ "application/json", "text/json" ], "produces" : [ "application/json", "text/json" ], "parameters" : [ { - "name" : "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" @@ -109,11 +109,11 @@ "post" : { "summary" : "Entities from healthcare domain", "description" : "The API returns a list of healthcare entities in a given document. See the Supported languages in Text Analytics API for the list of enabled languages.\n", - "operationId" : "5ac4251d5b4ccd1554da7632", + "operationId" : "/healthcare", "consumes" : [ "application/json", "text/json" ], "produces" : [ "application/json", "text/json" ], "parameters" : [ { - "name" : "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" @@ -142,7 +142,7 @@ "id": "1", "entities": [ { - "id": "24d1116e-8b0f-4a91-a3a2-05ff499ec26a", + "id": "1", "offset": 11, "length": 4, "text": "oral", @@ -150,7 +150,7 @@ "score": 0.9671 }, { - "id": "73acd11a-3289-4813-815c-34340f6394ec", + "id": "2", "offset": 16, "length": 11, "text": "antibiotics", @@ -159,7 +159,7 @@ "umlsId": "C0003232" }, { - "id": "97ac0c51-ab50-45cc-b832-9a2d074eda59", + "id": "3", "offset": 32, "length": 7, "text": "10 days", @@ -167,7 +167,7 @@ "score": 0.9965 }, { - "id": "96c4a5d9-0f53-41f8-9c93-0bfa7ee3a75d", + "id": "4", "offset": 48, "length": 9, "text": "infection", @@ -178,15 +178,15 @@ ], "relations": [ { - "relationType": "DIRECTION_OF_BODY_STRUCTURE", + "relationType": "ROUTE_OR_MODE_OF_MEDICATION", "score": 1, - "entities": [ + "entityInfo": [ { - "id": "7f6bf109-c897-418c-885a-1cf4ade2c314", + "id": "1", "role": "ATTRIBUTE" }, { - "id": "c6f217ed-2d48-4e4d-8f26-2299624a21a9", + "id": "2", "role": "ENTITY" } ] @@ -213,11 +213,11 @@ "post" : { "summary" : "Entities from Personally Identifiable Information (PII) domain", "description" : "The API returns a list of personally identifiable information (PII) entities (\\\"SSN\\\", \\\"Bank Account\\\" etc) in the document. See the <a href=\"https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/text-analytics-supported-languages\">Supported languages in Text Analytics API</a> for the list of enabled languages.\n", - "operationId" : "5ac4251d5b4ccd1554da7633", + "operationId" : "/entities/recognition/pii", "consumes" : [ "application/json", "text/json" ], "produces" : [ "application/json", "text/json" ], "parameters" : [ { - "name" : "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" @@ -280,11 +280,11 @@ "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 <a href=\"https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/text-analytics-supported-languages\">Supported languages in Text Analytics API.\n", - "operationId" : "5ac4251d5b4ccd1554da7635", + "operationId" : "/entities/linking", "consumes" : [ "application/json", "text/json" ], "produces" : [ "application/json", "text/json" ], "parameters" : [ { - "name" : "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" @@ -360,11 +360,11 @@ "post" : { "summary" : "Key Phrases", "description" : "The API returns a list of strings denoting the key phrases in the input text. See the <a href=\"https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/text-analytics-supported-languages\">Supported languages in Text Analytics API</a> for the list of enabled languages.", - "operationId" : "56f30ceeeda5650db055a3c6", + "operationId" : "/keyPhrases", "consumes" : [ "application/json", "text/json" ], "produces" : [ "application/json", "text/json" ], "parameters" : [ { - "name" : "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" @@ -417,11 +417,11 @@ "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. A total of 120 languages are supported.", - "operationId" : "56f30ceeeda5650db055a3c7", + "operationId" : "/languages", "consumes" : [ "application/json", "text/json" ], "produces" : [ "application/json", "text/json" ], "parameters" : [ { - "name" : "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" @@ -493,11 +493,11 @@ "post" : { "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 <a href=\"https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/text-analytics-supported-languages\">Supported languages in Text Analytics API</a> for the list of enabled languages.", - "operationId" : "56f30ceeeda5650db055a3c9", + "operationId" : "/sentiment", "consumes" : [ "application/json", "text/json" ], "produces" : [ "application/json", "text/json" ], "parameters" : [ { - "name" : "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" @@ -673,10 +673,15 @@ "ErrorResponse": { "type": "object", "required" : [ + "id", "code", "message" ], "properties": { + "id": { + "type": "string", + "description" : "Document Id." + }, "code": { "type": "string", "description" : "Error code." @@ -689,9 +694,9 @@ "type": "string", "description" : "(Optional) Error target." }, - "innerError": { + "innererror": { "$ref": "#/definitions/InnerError", - "description" : "(Optional) InnerError contains more specific information." + "description" : "(Optional) Innererror contains more specific information." }, "details": { "type": "array", @@ -721,7 +726,7 @@ "type": "string", "description" : "(Optional) Error target." }, - "innerError": { + "innererror": { "$ref": "#/definitions/InnerError", "description" : "(Optional) InnerError contains more specific information." } @@ -751,9 +756,9 @@ "statistics" : { "$ref" : "#/definitions/RequestStatistics" }, - "modelVersion" : { + "model-version" : { "type" : "string", - "description" : "(Optional) if modelVersion=true was specified in the request this field will indicate which model is used for scoring." + "description" : "(Optional) if model-version=true was specified in the request this field will indicate which model is used for scoring." } } }, @@ -926,9 +931,9 @@ "statistics" : { "$ref" : "#/definitions/RequestStatistics" }, - "modelVersion" : { + "model-version" : { "type" : "string", - "description" : "(Optional) if modelVersion=true was specified in the request this field will indicate which model is used for scoring." + "description" : "(Optional) if model-version=true was specified in the request this field will indicate which model is used for scoring." } } }, @@ -1019,9 +1024,9 @@ "statistics" : { "$ref" : "#/definitions/RequestStatistics" }, - "modelVersion" : { + "model-version" : { "type" : "string", - "description" : "(Optional) if modelVersion=true was specified in the request this field will indicate which model is used for scoring." + "description" : "(Optional) if model-version=true was specified in the request this field will indicate which model is used for scoring." } } }, @@ -1170,9 +1175,9 @@ "statistics" : { "$ref" : "#/definitions/RequestStatistics" }, - "modelVersion" : { + "model-version" : { "type" : "string", - "description" : "(Optional) if modelVersion=true was specified in the request this field will indicate which model is used for scoring." + "description" : "(Optional) if model-version=true was specified in the request this field will indicate which model is used for scoring." } } }, @@ -1294,9 +1299,9 @@ "statistics" : { "$ref" : "#/definitions/RequestStatistics" }, - "modelVersion" : { + "model-version" : { "type" : "string", - "description" : "(Optional) if modelVersion=true was specified in the request this field will indicate which model is used for scoring." + "description" : "(Optional) if model-version=true was specified in the request this field will indicate which model is used for scoring." } } }, @@ -1407,9 +1412,9 @@ "statistics" : { "$ref" : "#/definitions/RequestStatistics" }, - "modelVersion" : { + "model-version" : { "type" : "string", - "description" : "(Optional) if modelVersion=true was specified in the request this field will indicate which model is used for scoring." + "description" : "(Optional) if model-version=true was specified in the request this field will indicate which model is used for scoring." } } }, From b92d4bc36c3de3188c80fd0a0e59affa5526a8a1 Mon Sep 17 00:00:00 2001 From: Han Li Date: Mon, 23 Sep 2019 15:12:20 -0700 Subject: [PATCH 18/62] update error --- .../preview/v3.0-Preview.1/TextAnalytics.json | 21 ++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json index fdd7a901d393..7f86e4976882 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json @@ -416,7 +416,7 @@ "/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. A total of 120 languages are supported.", + "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 <a href=\"https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/text-analytics-supported-languages\">Supported languages in Text Analytics API</a> for the list of enabled languages.", "operationId" : "/languages", "consumes" : [ "application/json", "text/json" ], "produces" : [ "application/json", "text/json" ], @@ -674,14 +674,29 @@ "type": "object", "required" : [ "id", - "code", - "message" + "error" ], "properties": { "id": { "type": "string", "description" : "Document Id." }, + "error": { + "type": "string", + "description" : "Document Error.", + "items" : { + "$ref" : "#/definitions/DocumentError" + } + } + } + }, + "DocumentError": { + "type": "object", + "required" : [ + "code", + "message" + ], + "properties": { "code": { "type": "string", "description" : "Error code." From cf87dd7916fd34880d097dc525ea35662986040d Mon Sep 17 00:00:00 2001 From: Han Li Date: Mon, 23 Sep 2019 16:10:11 -0700 Subject: [PATCH 19/62] update error --- .../preview/v3.0-Preview.1/TextAnalytics.json | 52 +++++++++---------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json index 7f86e4976882..12f5bac59769 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json @@ -99,7 +99,7 @@ "500" : { "description" : "Error Response", "schema" : { - "$ref" : "#/definitions/ErrorResponse" + "$ref" : "#/definitions/Error" } } } @@ -203,7 +203,7 @@ "500" : { "description" : "Error Response", "schema" : { - "$ref" : "#/definitions/ErrorResponse" + "$ref" : "#/definitions/Error" } } } @@ -270,7 +270,7 @@ "500" : { "description" : "Error Response", "schema" : { - "$ref" : "#/definitions/ErrorResponse" + "$ref" : "#/definitions/Error" } } } @@ -350,7 +350,7 @@ "500" : { "description" : "Error Response", "schema" : { - "$ref" : "#/definitions/ErrorResponse" + "$ref" : "#/definitions/Error" } } } @@ -407,7 +407,7 @@ "500" : { "description" : "Error Response", "schema" : { - "$ref" : "#/definitions/ErrorResponse" + "$ref" : "#/definitions/Error" } } } @@ -483,7 +483,7 @@ "500" : { "description" : "Error Response", "schema" : { - "$ref" : "#/definitions/ErrorResponse" + "$ref" : "#/definitions/Error" } } } @@ -603,7 +603,7 @@ "500" : { "description" : "Error Response", "schema" : { - "$ref" : "#/definitions/ErrorResponse" + "$ref" : "#/definitions/Error" } } } @@ -665,12 +665,12 @@ }, "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" : "(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." }, - "ErrorResponse": { + "DocumentError": { "type": "object", "required" : [ "id", @@ -682,15 +682,15 @@ "description" : "Document Id." }, "error": { - "type": "string", + "type": "object", "description" : "Document Error.", "items" : { - "$ref" : "#/definitions/DocumentError" + "$ref" : "#/definitions/Error" } } } }, - "DocumentError": { + "Error": { "type": "object", "required" : [ "code", @@ -711,13 +711,13 @@ }, "innererror": { "$ref": "#/definitions/InnerError", - "description" : "(Optional) Innererror contains more specific information." + "description" : "(Optional) Inner error contains more specific information." }, "details": { "type": "array", "description" : "(Optional) Details about specific errors that led to this reported error.", "items" : { - "$ref" : "#/definitions/ErrorResponse" + "$ref" : "#/definitions/Error" } } } @@ -743,7 +743,7 @@ }, "innererror": { "$ref": "#/definitions/InnerError", - "description" : "(Optional) InnerError contains more specific information." + "description" : "(Optional) Innererror contains more specific information." } } }, @@ -765,7 +765,7 @@ "type" : "array", "description" : "Errors by document id.", "items" : { - "$ref" : "#/definitions/ErrorResponse" + "$ref" : "#/definitions/DocumentError" } }, "statistics" : { @@ -938,9 +938,9 @@ }, "errors" : { "type" : "array", - "description" : "Errors and Warnings by document", + "description" : "Errors by document id.", "items" : { - "$ref" : "#/definitions/ErrorResponse" + "$ref" : "#/definitions/DocumentError" } }, "statistics" : { @@ -1031,9 +1031,9 @@ }, "errors" : { "type" : "array", - "description" : "Errors and Warnings by document", + "description" : "Errors by document id.", "items" : { - "$ref" : "#/definitions/ErrorResponse" + "$ref" : "#/definitions/DocumentError" } }, "statistics" : { @@ -1182,9 +1182,9 @@ }, "errors" : { "type" : "array", - "description" : "Errors and Warnings by document", + "description" : "Errors by document id.", "items" : { - "$ref" : "#/definitions/ErrorResponse" + "$ref" : "#/definitions/DocumentError" } }, "statistics" : { @@ -1306,9 +1306,9 @@ }, "errors" : { "type" : "array", - "description" : "Errors and Warnings by document", + "description" : "Errors by document id.", "items" : { - "$ref" : "#/definitions/ErrorResponse" + "$ref" : "#/definitions/DocumentError" } }, "statistics" : { @@ -1419,9 +1419,9 @@ }, "errors" : { "type" : "array", - "description" : "Errors and Warnings by document", + "description" : "Errors by document id.", "items" : { - "$ref" : "#/definitions/ErrorResponse" + "$ref" : "#/definitions/DocumentError" } }, "statistics" : { From b6301f299673b9278a48e2b51f410c2624ae3197 Mon Sep 17 00:00:00 2001 From: Han Li Date: Mon, 23 Sep 2019 16:11:04 -0700 Subject: [PATCH 20/62] remove optional in response, update uppercase of Optional in requests --- .../preview/v3.0-Preview.1/TextAnalytics.json | 76 +++++++++---------- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json index 12f5bac59769..8ffc542aa9a9 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json @@ -42,12 +42,12 @@ "parameters" : [ { "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. ", + "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" }, { "name" : "showStats", "in" : "query", - "description" : "(optional) if set to true, response will contain input and document level statistics.", + "description" : "(Optional) if set to true, response will contain input and document level statistics.", "type" : "boolean" }, { "in" : "body", @@ -115,12 +115,12 @@ "parameters" : [ { "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. ", + "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" }, { "name" : "showStats", "in" : "query", - "description" : "(optional) if set to true, response will contain input and document level statistics.", + "description" : "(Optional) if set to true, response will contain input and document level statistics.", "type" : "boolean" }, { "in" : "body", @@ -219,12 +219,12 @@ "parameters" : [ { "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. ", + "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" }, { "name" : "showStats", "in" : "query", - "description" : "(optional) if set to true, response will contain input and document level statistics.", + "description" : "(Optional) if set to true, response will contain input and document level statistics.", "type" : "boolean" }, { "in" : "body", @@ -286,12 +286,12 @@ "parameters" : [ { "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. ", + "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" }, { "name" : "showStats", "in" : "query", - "description" : "(optional) if set to true, response will contain input and document level statistics.", + "description" : "(Optional) if set to true, response will contain input and document level statistics.", "type" : "boolean" }, { "in" : "body", @@ -366,12 +366,12 @@ "parameters" : [ { "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. ", + "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" }, { "name" : "showStats", "in" : "query", - "description" : "(optional) if set to true, response will contain input and document level statistics.", + "description" : "(Optional) if set to true, response will contain input and document level statistics.", "type" : "boolean" }, { "in" : "body", @@ -423,12 +423,12 @@ "parameters" : [ { "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. ", + "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" }, { "name" : "showStats", "in" : "query", - "description" : "(optional) if set to true, response will contain input and document level statistics.", + "description" : "(Optional) if set to true, response will contain input and document level statistics.", "type" : "boolean" }, { "in" : "body", @@ -499,12 +499,12 @@ "parameters" : [ { "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. ", + "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" }, { "name" : "showStats", "in" : "query", - "description" : "(optional) if set to true, response will contain input and document level statistics.", + "description" : "(Optional) if set to true, response will contain input and document level statistics.", "type" : "boolean" }, { "in" : "body", @@ -665,7 +665,7 @@ }, "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" : "(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." @@ -707,15 +707,15 @@ }, "target": { "type": "string", - "description" : "(Optional) Error target." + "description" : "Error target." }, "innererror": { "$ref": "#/definitions/InnerError", - "description" : "(Optional) Inner error contains more specific information." + "description" : "Inner error contains more specific information." }, "details": { "type": "array", - "description" : "(Optional) Details about specific errors that led to this reported error.", + "description" : "Details about specific errors that led to this reported error.", "items" : { "$ref" : "#/definitions/Error" } @@ -739,11 +739,11 @@ }, "target": { "type": "string", - "description" : "(Optional) Error target." + "description" : "Error target." }, "innererror": { "$ref": "#/definitions/InnerError", - "description" : "(Optional) Innererror contains more specific information." + "description" : "Innererror contains more specific information." } } }, @@ -773,7 +773,7 @@ }, "model-version" : { "type" : "string", - "description" : "(Optional) if model-version=true was specified in the request this field will indicate which model is used for scoring." + "description" : "if model-version=true was specified in the request this field will indicate which model is used for scoring." } } }, @@ -840,7 +840,7 @@ "description" : "Number of transactions for the request." } }, - "description" : "(Optional) if showStats=true was specified in the request this field will contain information about the request payload." + "description" : "if showStats=true was specified in the request this field will contain information about the request payload." }, "DocumentStatistics" : { "type" : "object", @@ -860,7 +860,7 @@ "description" : "Number of transactions for the document." } }, - "description" : "(Optional) if showStats=true was specified in the request this field will contain information about the document payload." + "description" : "if showStats=true was specified in the request this field will contain information about the document payload." }, "SentimentConfidenceScorePerLabel" : { "type" : "object", @@ -948,7 +948,7 @@ }, "model-version" : { "type" : "string", - "description" : "(Optional) if model-version=true was specified in the request this field will indicate which model is used for scoring." + "description" : "if model-version=true was specified in the request this field will indicate which model is used for scoring." } } }, @@ -971,7 +971,7 @@ } }, "statistics" : { - "description" : "(Optional) if showStats=true was specified in the request this field will contain information about the document payload.", + "description" : "if showStats=true was specified in the request this field will contain information about the document payload.", "$ref" : "#/definitions/DocumentStatistics" } } @@ -996,7 +996,7 @@ }, "subType" : { "type" : "string", - "description" : "(Optional) Entity sub type, such as Age/Year/TimeRange etc" + "description" : "Entity sub type, such as Age/Year/TimeRange etc" }, "offset" : { "type" : "integer", @@ -1041,7 +1041,7 @@ }, "model-version" : { "type" : "string", - "description" : "(Optional) if model-version=true was specified in the request this field will indicate which model is used for scoring." + "description" : "if model-version=true was specified in the request this field will indicate which model is used for scoring." } } }, @@ -1065,13 +1065,13 @@ }, "relations" : { "type" : "array", - "description" : "(Optional) Relations of recognized healthcare entities in the document.", + "description" : "Relations of recognized healthcare entities in the document.", "items" : { "$ref" : "#/definitions/HealthcareRelation" } }, "statistics" : { - "description" : "(Optional) if showStats=true was specified in the request this field will contain information about the document payload.", + "description" : "if showStats=true was specified in the request this field will contain information about the document payload.", "$ref" : "#/definitions/DocumentStatistics" } } @@ -1116,11 +1116,11 @@ }, "umlsId" : { "type" : "string", - "description" : "(Optional) Id from the Unified Medical Language System (UMLS)." + "description" : "Id from the Unified Medical Language System (UMLS)." }, "category" : { "type" : "string", - "description" : "(Optional) Entity category, such as MEDICATION etc -- (TBD)." + "description" : "Entity category, such as MEDICATION etc -- (TBD)." } } }, @@ -1192,7 +1192,7 @@ }, "model-version" : { "type" : "string", - "description" : "(Optional) if model-version=true was specified in the request this field will indicate which model is used for scoring." + "description" : "if model-version=true was specified in the request this field will indicate which model is used for scoring." } } }, @@ -1215,7 +1215,7 @@ } }, "statistics" : { - "description" : "(Optional) if showStats=true was specified in the request this field will contain information about the document payload.", + "description" : "if showStats=true was specified in the request this field will contain information about the document payload.", "$ref" : "#/definitions/DocumentStatistics" } } @@ -1272,7 +1272,7 @@ "score" : { "type" : "number", "format" : "double", - "description" : "(optional) If a well-known item is recognized, a decimal number denoting the confidence level will be returned." + "description" : "(Optional) If a well-known item is recognized, a decimal number denoting the confidence level will be returned." }, "text" : { "type" : "string", @@ -1316,7 +1316,7 @@ }, "model-version" : { "type" : "string", - "description" : "(Optional) if model-version=true was specified in the request this field will indicate which model is used for scoring." + "description" : "if model-version=true was specified in the request this field will indicate which model is used for scoring." } } }, @@ -1339,7 +1339,7 @@ } }, "statistics" : { - "description" : "(Optional) if showStats=true was specified in the request this field will contain information about the document payload.", + "description" : "if showStats=true was specified in the request this field will contain information about the document payload.", "$ref" : "#/definitions/DocumentStatistics" } } @@ -1429,7 +1429,7 @@ }, "model-version" : { "type" : "string", - "description" : "(Optional) if model-version=true was specified in the request this field will indicate which model is used for scoring." + "description" : "if model-version=true was specified in the request this field will indicate which model is used for scoring." } } }, @@ -1452,7 +1452,7 @@ } }, "statistics" : { - "description" : "(Optional) if showStats=true was specified in the request this field will contain information about the document payload.", + "description" : "if showStats=true was specified in the request this field will contain information about the document payload.", "$ref" : "#/definitions/DocumentStatistics" } } From d18d4f3b23c8e0c186537ca954d215edbefd0ce3 Mon Sep 17 00:00:00 2001 From: Han Li Date: Mon, 23 Sep 2019 16:28:39 -0700 Subject: [PATCH 21/62] update space --- .../TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json index 8ffc542aa9a9..d3f7ad06e51d 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json @@ -743,7 +743,7 @@ }, "innererror": { "$ref": "#/definitions/InnerError", - "description" : "Innererror contains more specific information." + "description" : "Inner error contains more specific information." } } }, From 2c363981d2df8c9eb42e9760f8310aaf4fd3592c Mon Sep 17 00:00:00 2001 From: Han Li Date: Wed, 23 Oct 2019 16:35:06 -0700 Subject: [PATCH 22/62] resolve comments --- .../preview/v3.0-Preview.1/TextAnalytics.json | 33 +++++++++++-------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json index d3f7ad06e51d..17cd8e8842ab 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json @@ -89,7 +89,8 @@ "score" : 0.88 } ] } ], - "errors" : [ ] + "errors" : [ ], + "modelVersion": "2019-10-01" } }, "schema" : { @@ -193,7 +194,8 @@ } ] } ], - "errors" : [ ] + "errors" : [ ], + "modelVersion": "2019-10-01" } }, "schema" : { @@ -260,7 +262,8 @@ }] } ], - "errors" : [ ] + "errors" : [ ], + "modelVersion": "2019-10-01" } }, "schema" : { @@ -340,7 +343,8 @@ "dataSource" : "Wikipedia" } ] }], - "errors" : [ ] + "errors" : [ ], + "modelVersion": "2019-10-01" } }, "schema" : { @@ -397,7 +401,8 @@ "id" : "3", "keyPhrases" : [ "carretera", "tráfico", "día" ] } ], - "errors" : [ ] + "errors" : [ ], + "modelVersion": "2019-10-01" } }, "schema" : { @@ -473,7 +478,8 @@ "score" : 0 } ] } ], - "errors" : [ ] + "errors" : [ ], + "modelVersion": "2019-10-01" } }, "schema" : { @@ -593,7 +599,8 @@ "length" : 52 } ] } ], - "errors" : [ ] + "errors" : [ ], + "modelVersion": "2019-10-01" } }, "schema" : { @@ -773,7 +780,7 @@ }, "model-version" : { "type" : "string", - "description" : "if model-version=true was specified in the request this field will indicate which model is used for scoring." + "description" : "This field indicates which model is used for scoring." } } }, @@ -948,7 +955,7 @@ }, "model-version" : { "type" : "string", - "description" : "if model-version=true was specified in the request this field will indicate which model is used for scoring." + "description" : "This field indicates which model is used for scoring." } } }, @@ -1041,7 +1048,7 @@ }, "model-version" : { "type" : "string", - "description" : "if model-version=true was specified in the request this field will indicate which model is used for scoring." + "description" : "This field indicates which model is used for scoring." } } }, @@ -1192,7 +1199,7 @@ }, "model-version" : { "type" : "string", - "description" : "if model-version=true was specified in the request this field will indicate which model is used for scoring." + "description" : "This field indicates which model is used for scoring." } } }, @@ -1316,7 +1323,7 @@ }, "model-version" : { "type" : "string", - "description" : "if model-version=true was specified in the request this field will indicate which model is used for scoring." + "description" : "This field indicates which model is used for scoring." } } }, @@ -1429,7 +1436,7 @@ }, "model-version" : { "type" : "string", - "description" : "if model-version=true was specified in the request this field will indicate which model is used for scoring." + "description" : "This field indicates which model is used for scoring." } } }, From 31eb2a1511cf1a891932af418e47f4620a1ea9ae Mon Sep 17 00:00:00 2001 From: Han Li Date: Thu, 24 Oct 2019 12:38:05 -0700 Subject: [PATCH 23/62] revole comments --- .../preview/v3.0-Preview.1/TextAnalytics.json | 30 +++++++++++-------- 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json index 17cd8e8842ab..d82b652aea9c 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json @@ -758,7 +758,8 @@ "type" : "object", "required" : [ "documents", - "errors" + "errors", + "modelVersion" ], "properties" : { "documents" : { @@ -778,7 +779,7 @@ "statistics" : { "$ref" : "#/definitions/RequestStatistics" }, - "model-version" : { + "modelVersion" : { "type" : "string", "description" : "This field indicates which model is used for scoring." } @@ -933,7 +934,8 @@ "type" : "object", "required" : [ "documents", - "errors" + "errors", + "modelVersion" ], "properties" : { "documents" : { @@ -953,7 +955,7 @@ "statistics" : { "$ref" : "#/definitions/RequestStatistics" }, - "model-version" : { + "modelVersion" : { "type" : "string", "description" : "This field indicates which model is used for scoring." } @@ -1026,7 +1028,8 @@ "type" : "object", "required" : [ "documents", - "errors" + "errors", + "modelVersion" ], "properties" : { "documents" : { @@ -1046,7 +1049,7 @@ "statistics" : { "$ref" : "#/definitions/RequestStatistics" }, - "model-version" : { + "modelVersion" : { "type" : "string", "description" : "This field indicates which model is used for scoring." } @@ -1177,7 +1180,8 @@ "type" : "object", "required" : [ "documents", - "errors" + "errors", + "modelVersion" ], "properties" : { "documents" : { @@ -1197,7 +1201,7 @@ "statistics" : { "$ref" : "#/definitions/RequestStatistics" }, - "model-version" : { + "modelVersion" : { "type" : "string", "description" : "This field indicates which model is used for scoring." } @@ -1301,7 +1305,8 @@ "type" : "object", "required" : [ "documents", - "errors" + "errors", + "modelVersion" ], "properties" : { "documents" : { @@ -1321,7 +1326,7 @@ "statistics" : { "$ref" : "#/definitions/RequestStatistics" }, - "model-version" : { + "modelVersion" : { "type" : "string", "description" : "This field indicates which model is used for scoring." } @@ -1414,7 +1419,8 @@ "type" : "object", "required" : [ "documents", - "errors" + "errors", + "modelVersion" ], "properties" : { "documents" : { @@ -1434,7 +1440,7 @@ "statistics" : { "$ref" : "#/definitions/RequestStatistics" }, - "model-version" : { + "modelVersion" : { "type" : "string", "description" : "This field indicates which model is used for scoring." } From e951023bac752d735677e9f9954c38981f93a196 Mon Sep 17 00:00:00 2001 From: Han Li Date: Thu, 24 Oct 2019 17:31:58 -0700 Subject: [PATCH 24/62] remove /healthcare --- .../preview/v3.0-Preview.1/TextAnalytics.json | 257 ------------------ 1 file changed, 257 deletions(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json index d82b652aea9c..2c094c6ff910 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json @@ -106,111 +106,6 @@ } } }, - "/healthcare" : { - "post" : { - "summary" : "Entities from healthcare domain", - "description" : "The API returns a list of healthcare entities in a given document. See the Supported languages in Text Analytics API for the list of enabled languages.\n", - "operationId" : "/healthcare", - "consumes" : [ "application/json", "text/json" ], - "produces" : [ "application/json", "text/json" ], - "parameters" : [ { - "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" - }, { - "name" : "showStats", - "in" : "query", - "description" : "(Optional) if set to true, response will contain input and document level statistics.", - "type" : "boolean" - }, { - "in" : "body", - "name" : "multiLanguageBatchInput", - "description" : "Collection of documents to analyze.", - "required": true, - "schema" : { - "$ref" : "#/definitions/MultiLanguageBatchInput" - } - } ], - "responses" : { - "200" : { - "description" : "A successful call results in a list of recognized entities returned for each valid document", - "examples" : { - "application/json" : { - "documents" : - [ - { - "id": "1", - "entities": [ - { - "id": "1", - "offset": 11, - "length": 4, - "text": "oral", - "type": "ROUTE_OR_MODE", - "score": 0.9671 - }, - { - "id": "2", - "offset": 16, - "length": 11, - "text": "antibiotics", - "type": "MEDICATION_CLASS", - "score": 0.9988, - "umlsId": "C0003232" - }, - { - "id": "3", - "offset": 32, - "length": 7, - "text": "10 days", - "type": "TIME", - "score": 0.9965 - }, - { - "id": "4", - "offset": 48, - "length": 9, - "text": "infection", - "type": "DIAGNOSIS", - "score": 0.9724, - "umlsId": "C3714514" - } - ], - "relations": [ - { - "relationType": "ROUTE_OR_MODE_OF_MEDICATION", - "score": 1, - "entityInfo": [ - { - "id": "1", - "role": "ATTRIBUTE" - }, - { - "id": "2", - "role": "ENTITY" - } - ] - } - ] - } ], - "errors" : [ ], - "modelVersion": "2019-10-01" - } - }, - "schema" : { - "$ref" : "#/definitions/HealthcareResult" - } - }, - "500" : { - "description" : "Error Response", - "schema" : { - "$ref" : "#/definitions/Error" - } - } - } - } - }, "/entities/recognition/pii" : { "post" : { "summary" : "Entities from Personally Identifiable Information (PII) domain", @@ -1024,158 +919,6 @@ } } }, - "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" - ], - "properties" : { - "id" : { - "type" : "string", - "description" : "Unique, non-empty document identifier." - }, - "entities" : { - "type" : "array", - "description" : "Recognized healthcare entities in the document.", - "items" : { - "$ref" : "#/definitions/HealthcareEntity" - } - }, - "relations" : { - "type" : "array", - "description" : "Relations of recognized healthcare entities in the document.", - "items" : { - "$ref" : "#/definitions/HealthcareRelation" - } - }, - "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", - "required" : [ - "text", - "id", - "type", - "offset", - "length", - "score" - ], - "properties" : { - "text" : { - "type" : "string", - "description" : "Entity text as appears in the request." - }, - "id" : { - "type" : "string", - "description" : "Unique Id of the entity (used for matching between relation and entity results)." - }, - "type" : { - "type" : "string", - "description" : "Entity type, such as DOSAGE/FREQUENCY etc." - }, - "offset" : { - "type" : "integer", - "format" : "int32", - "description" : "Start position (in Unicode characters) for the entity text." - }, - "length" : { - "type" : "integer", - "format" : "int32", - "description" : "Length (in Unicode characters) for the entity text." - }, - "score" : { - "type" : "number", - "format" : "double", - "description" : "Confidence score of the extracted entity." - }, - "umlsId" : { - "type" : "string", - "description" : "Id from the Unified Medical Language System (UMLS)." - }, - "category" : { - "type" : "string", - "description" : "Entity category, such as MEDICATION etc -- (TBD)." - } - } - }, - "HealthcareRelation" : { - "type" : "object", - "required" : [ - "relationType", - "score", - "entities" - ], - "properties" : { - "relationType" : { - "type" : "string", - "description" : "Relation types of the related entities, such as DOSAGE_OF_MEDICATION/TIME_OF_MEDICATION etc." - }, - "score" : { - "type" : "string", - "description" : "Confidence score of the relation." - }, - "entities" : { - "type" : "array", - "description" : "Related entities", - "items" : { - "$ref" : "#/definitions/EntityRole" - } - } - } - }, - "EntityRole" : { - "type" : "object", - "required" : [ - "id", - "role" - ], - "properties" : { - "id" : { - "type" : "string", - "description" : "Unique Id of the entity (used for matching between relation and entity results)." - }, - "role" : { - "type" : "string", - "description" : "Role of the extracted entity." - } - } - }, "EntityLinkingResult" : { "type" : "object", "required" : [ From 74b36b915acb15ea96320f3bd9fd05dd38254064 Mon Sep 17 00:00:00 2001 From: Han Li Date: Thu, 24 Oct 2019 22:11:57 -0700 Subject: [PATCH 25/62] update score range in description --- .../preview/v3.0-Preview.1/TextAnalytics.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json index 2c094c6ff910..58fe4ba94f21 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json @@ -702,7 +702,7 @@ "$ref" : "#/definitions/DocumentStatistics" }, "documentScores" : { - "description" : "Document level sentiment confidence scores for each sentiment class." + "description" : "Document level sentiment confidence scores between 0 and 1 for each sentiment class." }, "sentences" : { "type" : "array", @@ -786,7 +786,7 @@ "format" : "double" } }, - "description" : "Represents the confidence scores across all sentiment classes: positive, neutral, negative." + "description" : "Represents the confidence scores between 0 and 1 across all sentiment classes: positive, neutral, negative." }, "SentenceSentiment" : { "type" : "object", @@ -804,7 +804,7 @@ "enum" : [ "positive", "neutral", "negative" ] }, "sentenceScores" : { - "description" : "The sentiment confidence score for the sentence for all classes." + "description" : "The sentiment confidence score between 0 and 1 for the sentence for all classes." }, "offset" : { "type" : "integer", @@ -915,7 +915,7 @@ "score" : { "type" : "number", "format" : "double", - "description" : "Confidence score of the extracted entity." + "description" : "Confidence score between 0 and 1 of the extracted entity." } } }, @@ -1026,7 +1026,7 @@ "score" : { "type" : "number", "format" : "double", - "description" : "(Optional) If a well-known item is recognized, a decimal number denoting the confidence level will be returned." + "description" : "(Optional) If a well-known item is recognized, a decimal number denoting the confidence level between 0 and 1 will be returned." }, "text" : { "type" : "string", From 93cf1891a1db757bb74bf3942ef8a1620fe4aace Mon Sep 17 00:00:00 2001 From: Han Li Date: Thu, 24 Oct 2019 22:22:03 -0700 Subject: [PATCH 26/62] update description --- .../preview/v3.0-Preview.1/TextAnalytics.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json index 58fe4ba94f21..9fd4e6c4b724 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json @@ -34,7 +34,7 @@ "paths" : { "/entities/recognition/general" : { "post" : { - "summary" : "Entities from open domain", + "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. For the list of enabled languages, check Supported languages in Text Analytics API.\n", "operationId" : "/entities/recognition/general", "consumes" : [ "application/json", "text/json" ], @@ -108,7 +108,7 @@ }, "/entities/recognition/pii" : { "post" : { - "summary" : "Entities from Personally Identifiable Information (PII) domain", + "summary" : "Entities containing Personally Identifiable Information (PII)", "description" : "The API returns a list of personally identifiable information (PII) entities (\\\"SSN\\\", \\\"Bank Account\\\" etc) in the document. See the <a href=\"https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/text-analytics-supported-languages\">Supported languages in Text Analytics API</a> for the list of enabled languages.\n", "operationId" : "/entities/recognition/pii", "consumes" : [ "application/json", "text/json" ], @@ -134,7 +134,7 @@ } ], "responses" : { "200" : { - "description" : "A successful call results in a list of recognized entities returned for each valid document", + "description" : "A successful call results in a list of entities containing personally identifiable information returned for each valid document", "examples" : { "application/json" : { "documents" : [ { @@ -202,7 +202,7 @@ } ], "responses" : { "200" : { - "description" : "A successful call results in a list of recognized entities returned for each valid document", + "description" : "A successful call results in a list of recognized entities with links to a well-known knowledge base returned for each valid document", "examples" : { "application/json" : { "documents" : [ { From 519cb6be8e2de204b165615317d6e5f4d65340b6 Mon Sep 17 00:00:00 2001 From: Han Li Date: Fri, 25 Oct 2019 12:53:30 -0700 Subject: [PATCH 27/62] update aka.ms links --- .../preview/v3.0-Preview.1/TextAnalytics.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json index 9fd4e6c4b724..38a029aaff47 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json @@ -35,7 +35,7 @@ "/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. For the list of enabled languages, check Supported languages in Text Analytics API.\n", + "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. For the list of enabled languages, check Supported languages in Text Analytics API.\n", "operationId" : "/entities/recognition/general", "consumes" : [ "application/json", "text/json" ], "produces" : [ "application/json", "text/json" ], @@ -109,7 +109,7 @@ "/entities/recognition/pii" : { "post" : { "summary" : "Entities containing Personally Identifiable Information (PII)", - "description" : "The API returns a list of personally identifiable information (PII) entities (\\\"SSN\\\", \\\"Bank Account\\\" etc) in the document. See the <a href=\"https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/text-analytics-supported-languages\">Supported languages in Text Analytics API</a> for the list of enabled languages.\n", + "description" : "The API returns a list of personally identifiable information (PII) entities (\\\"SSN\\\", \\\"Bank Account\\\" etc) in the document. See the <a href=\"https://aka.ms/talangs\">Supported languages in Text Analytics API</a> for the list of enabled languages.\n", "operationId" : "/entities/recognition/pii", "consumes" : [ "application/json", "text/json" ], "produces" : [ "application/json", "text/json" ], @@ -177,7 +177,7 @@ "/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 <a href=\"https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/text-analytics-supported-languages\">Supported languages in Text Analytics API.\n", + "description" : "The API returns a list of recognized entities with links to a well-known knowledge base. See the <a href=\"https://aka.ms/talangs\">Supported languages in Text Analytics API.\n", "operationId" : "/entities/linking", "consumes" : [ "application/json", "text/json" ], "produces" : [ "application/json", "text/json" ], @@ -258,7 +258,7 @@ "/keyPhrases" : { "post" : { "summary" : "Key Phrases", - "description" : "The API returns a list of strings denoting the key phrases in the input text. See the <a href=\"https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/text-analytics-supported-languages\">Supported languages in Text Analytics API</a> for the list of enabled languages.", + "description" : "The API returns a list of strings denoting the key phrases in the input text. See the <a href=\"https://aka.ms/talangs\">Supported languages in Text Analytics API</a> for the list of enabled languages.", "operationId" : "/keyPhrases", "consumes" : [ "application/json", "text/json" ], "produces" : [ "application/json", "text/json" ], @@ -316,7 +316,7 @@ "/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 <a href=\"https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/text-analytics-supported-languages\">Supported languages in Text Analytics API</a> for the list of enabled languages.", + "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 <a href=\"https://aka.ms/talangs\">Supported languages in Text Analytics API</a> for the list of enabled languages.", "operationId" : "/languages", "consumes" : [ "application/json", "text/json" ], "produces" : [ "application/json", "text/json" ], @@ -393,7 +393,7 @@ "/sentiment" : { "post" : { "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 <a href=\"https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/text-analytics-supported-languages\">Supported languages in Text Analytics API</a> for the list of enabled languages.", + "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 <a href=\"https://aka.ms/talangs\">Supported languages in Text Analytics API</a> for the list of enabled languages.", "operationId" : "/sentiment", "consumes" : [ "application/json", "text/json" ], "produces" : [ "application/json", "text/json" ], From 875b9efa876672fdbdf19e3644e024af9f420f76 Mon Sep 17 00:00:00 2001 From: Han Li Date: Fri, 25 Oct 2019 16:10:47 -0700 Subject: [PATCH 28/62] update pii description to use personal information --- .../TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json index 38a029aaff47..07606042aa02 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json @@ -108,8 +108,8 @@ }, "/entities/recognition/pii" : { "post" : { - "summary" : "Entities containing Personally Identifiable Information (PII)", - "description" : "The API returns a list of personally identifiable information (PII) entities (\\\"SSN\\\", \\\"Bank Account\\\" etc) in the document. See the <a href=\"https://aka.ms/talangs\">Supported languages in Text Analytics API</a> for the list of enabled languages.\n", + "summary" : "Entities containing personal information", + "description" : "The API returns a list of personal information entities (\\\"SSN\\\", \\\"Bank Account\\\" etc) in the document. See the <a href=\"https://aka.ms/talangs\">Supported languages in Text Analytics API</a> for the list of enabled languages.\n", "operationId" : "/entities/recognition/pii", "consumes" : [ "application/json", "text/json" ], "produces" : [ "application/json", "text/json" ], @@ -134,7 +134,7 @@ } ], "responses" : { "200" : { - "description" : "A successful call results in a list of entities containing personally identifiable information returned for each valid document", + "description" : "A successful call results in a list of entities containing personal information returned for each valid document", "examples" : { "application/json" : { "documents" : [ { From c690a5ef0bc5fa277239903b13df9884d3d46b4d Mon Sep 17 00:00:00 2001 From: Han Li Date: Mon, 4 Nov 2019 18:03:52 -0800 Subject: [PATCH 29/62] resolve comments -- updte detectedLnauges & operationId --- .../preview/v3.0-Preview.1/TextAnalytics.json | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json index 07606042aa02..483c3839638d 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json @@ -36,7 +36,7 @@ "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. For the list of enabled languages, check Supported languages in Text Analytics API.\n", - "operationId" : "/entities/recognition/general", + "operationId" : "EntitiesRecognitionGeneral", "consumes" : [ "application/json", "text/json" ], "produces" : [ "application/json", "text/json" ], "parameters" : [ { @@ -109,8 +109,8 @@ "/entities/recognition/pii" : { "post" : { "summary" : "Entities containing personal information", - "description" : "The API returns a list of personal information entities (\\\"SSN\\\", \\\"Bank Account\\\" etc) in the document. See the <a href=\"https://aka.ms/talangs\">Supported languages in Text Analytics API</a> for the list of enabled languages.\n", - "operationId" : "/entities/recognition/pii", + "description" : "The API returns a list of entities with personal information (\\\"SSN\\\", \\\"Bank Account\\\" etc) in the document. See the <a href=\"https://aka.ms/talangs\">Supported languages in Text Analytics API</a> for the list of enabled languages.\n", + "operationId" : "EntitiesRecognitionPii", "consumes" : [ "application/json", "text/json" ], "produces" : [ "application/json", "text/json" ], "parameters" : [ { @@ -178,7 +178,7 @@ "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 <a href=\"https://aka.ms/talangs\">Supported languages in Text Analytics API.\n", - "operationId" : "/entities/linking", + "operationId" : "EntitiesLinking", "consumes" : [ "application/json", "text/json" ], "produces" : [ "application/json", "text/json" ], "parameters" : [ { @@ -259,7 +259,7 @@ "post" : { "summary" : "Key Phrases", "description" : "The API returns a list of strings denoting the key phrases in the input text. See the <a href=\"https://aka.ms/talangs\">Supported languages in Text Analytics API</a> for the list of enabled languages.", - "operationId" : "/keyPhrases", + "operationId" : "KeyPhrases", "consumes" : [ "application/json", "text/json" ], "produces" : [ "application/json", "text/json" ], "parameters" : [ { @@ -317,7 +317,7 @@ "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 <a href=\"https://aka.ms/talangs\">Supported languages in Text Analytics API</a> for the list of enabled languages.", - "operationId" : "/languages", + "operationId" : "Languages", "consumes" : [ "application/json", "text/json" ], "produces" : [ "application/json", "text/json" ], "parameters" : [ { @@ -394,7 +394,7 @@ "post" : { "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 <a href=\"https://aka.ms/talangs\">Supported languages in Text Analytics API</a> for the list of enabled languages.", - "operationId" : "/sentiment", + "operationId" : "Sentiment", "consumes" : [ "application/json", "text/json" ], "produces" : [ "application/json", "text/json" ], "parameters" : [ { @@ -1026,7 +1026,7 @@ "score" : { "type" : "number", "format" : "double", - "description" : "(Optional) If a well-known item is recognized, a decimal number denoting the confidence level between 0 and 1 will be returned." + "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", @@ -1193,14 +1193,14 @@ "type" : "object", "required" : [ "id", - "detectedLanguage" + "detectedLanguages" ], "properties" : { "id" : { "type" : "string", "description" : "Unique, non-empty document identifier." }, - "detectedLanguage" : { + "detectedLanguages" : { "type" : "array", "description" : "A list of extracted languages.", "items" : { From c0df36f7dc54756ffc44305877ddd0834131aaf5 Mon Sep 17 00:00:00 2001 From: Han Li Date: Sun, 10 Nov 2019 20:50:15 -0800 Subject: [PATCH 30/62] update error enum --- .../preview/v3.0-Preview.1/TextAnalytics.json | 24 +++++++++++++------ 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json index 483c3839638d..fdf6438df333 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json @@ -365,13 +365,6 @@ "iso6391Name" : "es", "score" : 1 } ] - }, { - "id" : "4", - "detectedLanguages" : [ { - "name" : "(Unknown)", - "iso6391Name" : "(Unknown)", - "score" : 0 - } ] } ], "errors" : [ ], "modelVersion": "2019-10-01" @@ -601,6 +594,12 @@ "properties": { "code": { "type": "string", + "enum":[ + "invalidRequest", + "invalidArgument", + "internalServerError", + "serviceUnavailable" + ], "description" : "Error code." }, "message": { @@ -633,6 +632,17 @@ "properties": { "code": { "type": "string", + "enum": [ + "invalidParameterValue", + "invalidRequestBodyFormat", + "emptyRequest", + "missingInputRecords", + "invalidDocument", + "modelVersionIncorrect", + "invalidDocumentBatch", + "unsupportedLanguageCode", + "invalidCountryHint" + ], "description" : "Error code." }, "message": { From 71fca83f681ba7807b94a012e81e16b812539d04 Mon Sep 17 00:00:00 2001 From: Han Li Date: Thu, 14 Nov 2019 15:08:39 -0800 Subject: [PATCH 31/62] update /readme.md --- .../data-plane/TextAnalytics/readme.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/readme.md b/specification/cognitiveservices/data-plane/TextAnalytics/readme.md index 60e5b6ad8d9d..6fb44b9365f4 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/readme.md +++ b/specification/cognitiveservices/data-plane/TextAnalytics/readme.md @@ -149,6 +149,15 @@ input-file: preview/v2.1/TextAnalytics.json log-file: logs/log.txt ``` +### Release 3.0-Preview.1 + +These settings apply only when `--tag=release_3_0_preview.1` is specified on the command line. + +``` yaml $(tag) == 'release_3_0_preview.1' +input-file: preview/v3.0-Preview.1/TextAnalytics.json +log-file: logs/log.txt +``` + ## Swagger to SDK This section describes what SDK should be generated by the automatic system. @@ -244,6 +253,7 @@ input-file: - $(this-folder)/stable/v2.0/TextAnalytics.json - $(this-folder)/stable/v2.1/TextAnalytics.json - $(this-folder)/preview/v2.1/TextAnalytics.json + - $(this-folder)/preview/v3.0-Preview.1/TextAnalytics.json ``` From 084b2b8e72c8bc34383a429d086434e74e393d8a Mon Sep 17 00:00:00 2001 From: Han Li Date: Thu, 14 Nov 2019 15:21:47 -0800 Subject: [PATCH 32/62] update aka.ms links --- .../TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json index fdf6438df333..96f0d69e3e06 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json @@ -35,7 +35,7 @@ "/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. For the list of enabled languages, check Supported languages in Text Analytics API.\n", + "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 <a href=\"https://aka.ms/talangs\">Supported languages in Text Analytics API</a> for the list of enabled languages.", "operationId" : "EntitiesRecognitionGeneral", "consumes" : [ "application/json", "text/json" ], "produces" : [ "application/json", "text/json" ], @@ -109,7 +109,7 @@ "/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. See the <a href=\"https://aka.ms/talangs\">Supported languages in Text Analytics API</a> for the list of enabled languages.\n", + "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 <a href=\"https://aka.ms/talangs\">Supported languages in Text Analytics API</a> for the list of enabled languages.\n", "operationId" : "EntitiesRecognitionPii", "consumes" : [ "application/json", "text/json" ], "produces" : [ "application/json", "text/json" ], From a49e68f02223a3165a9829b8b3ddf0127b0f8610 Mon Sep 17 00:00:00 2001 From: Han Li Date: Thu, 14 Nov 2019 15:29:57 -0800 Subject: [PATCH 33/62] update aka.ms links --- .../preview/v3.0-Preview.1/TextAnalytics.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json index 96f0d69e3e06..d5d6dec667e8 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json @@ -35,7 +35,7 @@ "/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 <a href=\"https://aka.ms/talangs\">Supported languages in Text Analytics API</a> for the list of enabled languages.", + "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" ], @@ -109,7 +109,7 @@ "/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 <a href=\"https://aka.ms/talangs\">Supported languages in Text Analytics API</a> for the list of enabled languages.\n", + "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" ], @@ -177,7 +177,7 @@ "/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 <a href=\"https://aka.ms/talangs\">Supported languages in Text Analytics API.\n", + "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" ], @@ -258,7 +258,7 @@ "/keyPhrases" : { "post" : { "summary" : "Key Phrases", - "description" : "The API returns a list of strings denoting the key phrases in the input text. See the <a href=\"https://aka.ms/talangs\">Supported languages in Text Analytics API</a> for the list of enabled languages.", + "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" ], @@ -316,7 +316,7 @@ "/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 <a href=\"https://aka.ms/talangs\">Supported languages in Text Analytics API</a> for the list of enabled languages.", + "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" ], @@ -386,7 +386,7 @@ "/sentiment" : { "post" : { "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 <a href=\"https://aka.ms/talangs\">Supported languages in Text Analytics API</a> for the list of enabled languages.", + "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" ], From 11d3be1141e845881a3d238603a4f7cf29b10102 Mon Sep 17 00:00:00 2001 From: Han Li Date: Thu, 14 Nov 2019 15:44:39 -0800 Subject: [PATCH 34/62] update preview read me name & descrition --- .../preview/v3.0-Preview.1/TextAnalytics.json | 12 ++++++------ .../data-plane/TextAnalytics/readme.md | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json index d5d6dec667e8..f0b61bf4df9c 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json @@ -1,14 +1,14 @@ { - "swagger" : "2.0", - "info" : { - "description" : "The Text Analytics API is a suite of text analytics web services built with best-in-class Microsoft machine learning algorithms. \nThe API can be used to analyze unstructured text for tasks such as sentiment analysis, key phrase and entity extraction as well as language detection. \nNo training data is needed to use this API; just bring your text data. \nThis API uses advanced natural language processing techniques to deliver best in class predictions.\n\nFurther documentation can be found in https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/overview\n\nThis API is currently available in:\n\n* Australia East - australiaeast.api.cognitive.microsoft.com\n* Brazil South - brazilsouth.api.cognitive.microsoft.com\n* Canada Central - canadacentral.api.cognitive.microsoft.com\n* Central India - centralindia.api.cognitive.microsoft.com\n* Central US - centralus.api.cognitive.microsoft.com\n* East Asia - eastasia.api.cognitive.microsoft.com\n* East US - eastus.api.cognitive.microsoft.com\n* East US 2 - eastus2.api.cognitive.microsoft.com\n* France Central - francecentral.api.cognitive.microsoft.com\n* Japan East - japaneast.api.cognitive.microsoft.com\n* Japan West - japanwest.api.cognitive.microsoft.com\n* Korea Central - koreacentral.api.cognitive.microsoft.com\n* North Central US - northcentralus.api.cognitive.microsoft.com\n* North Europe - northeurope.api.cognitive.microsoft.com\n* South Africa North - southafricanorth.api.cognitive.microsoft.com\n* South Central US - southcentralus.api.cognitive.microsoft.com\n* Southeast Asia - southeastasia.api.cognitive.microsoft.com\n* UK South - uksouth.api.cognitive.microsoft.com\n* West Central US - westcentralus.api.cognitive.microsoft.com\n* West Europe - westeurope.api.cognitive.microsoft.com\n* West US - westus.api.cognitive.microsoft.com\n* West US 2 - westus2.api.cognitive.microsoft.com", - "version" : "V3.0-Preview.1", - "title" : "Text Analytics API", + "swagger": "2.0", + "info": { + "version": "v3.0-preview.1", "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 text analytics web 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. No training data is needed to use this API; just bring your text data. This API uses advanced natural language processing techniques to deliver best in class predictions. Further documentation can be found in https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/overview" }, "securityDefinitions": { "apim_key": { diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/readme.md b/specification/cognitiveservices/data-plane/TextAnalytics/readme.md index 6fb44b9365f4..aaa4fc2829e7 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/readme.md +++ b/specification/cognitiveservices/data-plane/TextAnalytics/readme.md @@ -154,7 +154,7 @@ log-file: logs/log.txt These settings apply only when `--tag=release_3_0_preview.1` is specified on the command line. ``` yaml $(tag) == 'release_3_0_preview.1' -input-file: preview/v3.0-Preview.1/TextAnalytics.json +input-file: preview/v3.0-preview.1/TextAnalytics.json log-file: logs/log.txt ``` @@ -253,7 +253,7 @@ input-file: - $(this-folder)/stable/v2.0/TextAnalytics.json - $(this-folder)/stable/v2.1/TextAnalytics.json - $(this-folder)/preview/v2.1/TextAnalytics.json - - $(this-folder)/preview/v3.0-Preview.1/TextAnalytics.json + - $(this-folder)/preview/v3.0-preview.1/TextAnalytics.json ``` From 0584564aadaa80035f96e715a48be4c1f2425905 Mon Sep 17 00:00:00 2001 From: Han Li Date: Thu, 14 Nov 2019 16:56:59 -0800 Subject: [PATCH 35/62] update all examples to /examples --- .../preview/v3.0-Preview.1/TextAnalytics.json | 279 +++--------------- .../examples/SuccessfulEntitiesRequest.json | 88 ++++++ .../SuccessfulEntityLinkingRequest.json | 96 ++++++ .../examples/SuccessfulEntityPIIRequest.json | 75 +++++ .../examples/SuccessfulKeyPhrasesRequest.json | 57 ++++ .../examples/SuccessfulLanguagesRequest.json | 64 ++++ .../examples/SuccessfulSentimentRequest.json | 128 ++++++++ 7 files changed, 552 insertions(+), 235 deletions(-) create mode 100644 specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/examples/SuccessfulEntitiesRequest.json create mode 100644 specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/examples/SuccessfulEntityLinkingRequest.json create mode 100644 specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/examples/SuccessfulEntityPIIRequest.json create mode 100644 specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/examples/SuccessfulKeyPhrasesRequest.json create mode 100644 specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/examples/SuccessfulLanguagesRequest.json create mode 100644 specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/examples/SuccessfulSentimentRequest.json diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json index f0b61bf4df9c..95e9fc39c16d 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json @@ -61,38 +61,6 @@ "responses" : { "200" : { "description" : "A successful call results in a list of recognized entities returned for each valid document.", - "examples" : { - "application/json" : { - "documents" : [ { - "id" : "1", - "entities" : [ { - "text" : "Microsoft", - "type" : "Organization", - "offset" : 25, - "length" : 9, - "score" : 0.99 - } ] - }, { - "id" : "2", - "entities" : [ { - "text" : "John", - "type" : "Person", - "offset" : 25, - "length" : 9, - "score" : 0.99 - }, { - "text" : 20, - "type" : "Number", - "subType" : "Age", - "offset" : 30, - "length" : 2, - "score" : 0.88 - } ] - } ], - "errors" : [ ], - "modelVersion": "2019-10-01" - } - }, "schema" : { "$ref": "#/definitions/EntitiesResult" } @@ -103,7 +71,13 @@ "$ref" : "#/definitions/Error" } } - } + }, + "x-ms-examples": { + "Successful Entities request": { + "$ref": ".//examples//SuccessfulEntitiesRequest.json" + } + }, + "deprecated": false } }, "/entities/recognition/pii" : { @@ -135,32 +109,6 @@ "responses" : { "200" : { "description" : "A successful call results in a list of entities containing personal information returned for each valid document", - "examples" : { - "application/json" : { - "documents" : [ { - "id" : "1", - "entities" : [ { - "text": "897-09-9876", - "type": "U.S. Social Security Number (SSN)", - "offset": 10, - "length": 11, - "Score": 0.65 - }] - }, { - "id" : "1", - "entities" : [ { - "text": "111000025", - "type": "ABA Routing Number", - "offset": 18, - "length": 9, - "score": 0.75 - }] - } - ], - "errors" : [ ], - "modelVersion": "2019-10-01" - } - }, "schema" : { "$ref" : "#/definitions/EntitiesResult" } @@ -171,7 +119,13 @@ "$ref" : "#/definitions/Error" } } - } + }, + "x-ms-examples": { + "Successful Entity PII request": { + "$ref": ".//examples//SuccessfulEntityPIIRequest.json" + } + }, + "deprecated": false } }, "/entities/linking" : { @@ -203,45 +157,6 @@ "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", - "examples" : { - "application/json" : { - "documents" : [ { - "id" : "1", - "entities" : [ { - "name" : "Microsoft", - "matches" : [ { - "score" : 0.88, - "text" : "MSFT", - "offset" : 0, - "length" : 4 - }, { - "score" : 0.99, - "text" : "Microsoft", - "offset" : 25, - "length" : 9 - } ], - "language" : "en", - "id" : "Microsoft", - "url" : "https://en.wikipedia.org/wiki/Microsoft", - "dataSource" : "Wikipedia" - }, { - "name" : "Windows 10", - "matches" : [ { - "score" : 0.88, - "text" : "Windows 10", - "offset" : 44, - "length" : 10 - } ], - "language" : "en", - "id" : "Windows 10", - "url" : "https://en.wikipedia.org/wiki/Windows_10", - "dataSource" : "Wikipedia" - } ] - }], - "errors" : [ ], - "modelVersion": "2019-10-01" - } - }, "schema" : { "$ref" : "#/definitions/EntityLinkingResult" } @@ -252,7 +167,13 @@ "$ref" : "#/definitions/Error" } } - } + }, + "x-ms-examples": { + "Successful Entity Linking request": { + "$ref": ".//examples//SuccessfulEntityLinkingRequest.json" + } + }, + "deprecated": false } }, "/keyPhrases" : { @@ -284,22 +205,6 @@ "responses" : { "200" : { "description" : "A successful response results in 0 or more key phrases identified in each valid document", - "examples" : { - "application/json" : { - "documents" : [ { - "id" : "1", - "keyPhrases" : [ "world", "input text" ] - }, { - "id" : "2", - "keyPhrases" : [ "monde" ] - }, { - "id" : "3", - "keyPhrases" : [ "carretera", "tráfico", "día" ] - } ], - "errors" : [ ], - "modelVersion": "2019-10-01" - } - }, "schema" : { "$ref" : "#/definitions/KeyPhraseResult" } @@ -310,7 +215,13 @@ "$ref" : "#/definitions/Error" } } - } + }, + "x-ms-examples": { + "Successful Detect Language request": { + "$ref": ".//examples//SuccessfulKeyPhrasesRequest.json" + } + }, + "deprecated": false } }, "/languages" : { @@ -342,34 +253,6 @@ "responses" : { "200" : { "description" : "A successful call results in the detected language with the highest probability for each valid document", - "examples" : { - "application/json" : { - "documents" : [ { - "id" : "1", - "detectedLanguages" : [ { - "name" : "English", - "iso6391Name" : "en", - "score" : 1 - } ] - }, { - "id" : "2", - "detectedLanguages" : [ { - "name" : "French", - "iso6391Name" : "fr", - "score" : 1 - } ] - }, { - "id" : "3", - "detectedLanguages" : [ { - "name" : "Spanish", - "iso6391Name" : "es", - "score" : 1 - } ] - } ], - "errors" : [ ], - "modelVersion": "2019-10-01" - } - }, "schema" : { "$ref" : "#/definitions/LanguageResult" } @@ -380,7 +263,13 @@ "$ref" : "#/definitions/Error" } } - } + }, + "x-ms-examples": { + "Successful Detect Language request": { + "$ref": ".//examples//SuccessfulLanguagesRequest.json" + } + }, + "deprecated": false } }, "/sentiment" : { @@ -412,85 +301,6 @@ "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)", - "examples" : { - "application/json" : { - "documents" : [ { - "id" : "1", - "sentiment" : "positive", - "documentScores" : { - "positive" : 0.998519241809845, - "neutral" : 9.635657188483E-4, - "negative" : 5.17153472174E-4 - }, - "sentences" : [ { - "sentiment" : "neutral", - "sentenceScores" : { - "positive" : 0.070910170674324, - "neutral" : 0.9124033451080322, - "negative" : 0.0166865326464176 - }, - "offset" : 0, - "length" : 12 - }, { - "sentiment" : "positive", - "sentenceScores" : { - "positive" : 0.998519241809845, - "neutral" : 9.635657188483E-4, - "negative" : 5.17153472174E-4 - }, - "offset" : 13, - "length" : 36 - } ] - }, { - "id" : "2", - "sentiment" : "positive", - "documentScores" : { - "positive" : 0.9954571723937988, - "neutral" : 0.0034653299953789, - "negative" : 0.0010774657130241 - }, - "sentences" : [ { - "sentiment" : "neutral", - "sentenceScores" : { - "positive" : 0.0499138832092285, - "neutral" : 0.9387012720108032, - "negative" : 0.0113849258050323 - }, - "offset" : 0, - "length" : 30 - }, { - "sentiment" : "positive", - "sentenceScores" : { - "positive" : 0.9954571723937988, - "neutral" : 0.0034653299953789, - "negative" : 0.0010774657130241 - }, - "offset" : 31, - "length" : 13 - } ] - }, { - "id" : "3", - "sentiment" : "positive", - "documentScores" : { - "positive" : 0.9965128302574158, - "neutral" : 0.0018965365597978, - "negative" : 0.0015906029148027 - }, - "sentences" : [ { - "sentiment" : "positive", - "sentenceScores" : { - "positive" : 0.9965128302574158, - "neutral" : 0.0018965365597978, - "negative" : 0.0015906029148027 - }, - "offset" : 0, - "length" : 52 - } ] - } ], - "errors" : [ ], - "modelVersion": "2019-10-01" - } - }, "schema" : { "$ref" : "#/definitions/SentimentResponse" } @@ -501,7 +311,13 @@ "$ref" : "#/definitions/Error" } } - } + }, + "x-ms-examples": { + "Successful Detect Language request": { + "$ref": ".//examples//SuccessfulSentimentRequest.json" + } + }, + "deprecated": false } } }, @@ -1132,18 +948,11 @@ }, { "id": "2", - "text": "Bonjour tout le monde", - "countryHint": "US" + "text": "Bonjour tout le monde" }, { "id": "3", - "text": "La carretera estaba atascada. Había mucho tráfico el día de ayer.", - "countryHint": "US" - }, - { - "id": "4", - "text": ":) :( :D", - "countryHint": "US" + "text": "La carretera estaba atascada. Había mucho tráfico el día de ayer." } ] } diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/examples/SuccessfulEntitiesRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/examples/SuccessfulEntitiesRequest.json new file mode 100644 index 000000000000..42fff041a464 --- /dev/null +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/examples/SuccessfulEntitiesRequest.json @@ -0,0 +1,88 @@ +{ + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "Endpoint": "{Endpoint}", + "input": { + "documents": [ + { + "language": "en", + "id": "1", + "text": "I had a wonderful trip to Seattle last week." + }, + { + "language": "en", + "id": "2", + "text": "I work at Microsoft." + }, + { + "language": "en", + "id": "3", + "text": "I visited Space Needle 2 times." + } + ] + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "documents": [ + { + "id": "1", + "entities": [ + { + "text": "Seattle", + "type": "Location", + "offset": 26, + "length": 7, + "score": 0.8062429428100586 + }, + { + "text": "last week", + "type": "DateTime", + "subtype": "DateRange", + "offset": 34, + "length": 9, + "score": 0.8 + } + ] + }, + { + "id": "2", + "entities": [ + { + "text": "Microsoft", + "type": "Organization", + "offset": 10, + "length": 9, + "score": 0.9998359680175781 + } + ] + }, + { + "id": "3", + "entities": [ + { + "text": "Space Needle", + "type": "Organization", + "offset": 10, + "length": 12, + "score": 0.7599651217460632 + }, + { + "text": "2", + "type": "Quantity", + "subtype": "Number", + "offset": 23, + "length": 1, + "score": 0.8 + } + ] + } + ], + "errors": [], + "modelVersion": "2019-10-01" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/examples/SuccessfulEntityLinkingRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/examples/SuccessfulEntityLinkingRequest.json new file mode 100644 index 000000000000..c58af39167b9 --- /dev/null +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/examples/SuccessfulEntityLinkingRequest.json @@ -0,0 +1,96 @@ +{ + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "Endpoint": "{Endpoint}", + "input": { + "documents": [ + { + "language": "en", + "id": "1", + "text": "I had a wonderful trip to Seattle last week." + }, + { + "language": "en", + "id": "2", + "text": "I work at Microsoft." + }, + { + "language": "en", + "id": "3", + "text": "I visited Space Needle 2 times." + } + ] + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "documents": [ + { + "id": "1", + "entities": [ + { + "name": "Seattle", + "matches": [ + { + "text": "Seattle", + "offset": 26, + "length": 7, + "score": 0.15046201222847677 + } + ], + "language": "en", + "id": "Seattle", + "url": "https://en.wikipedia.org/wiki/Seattle", + "dataSource": "Wikipedia" + } + ] + }, + { + "id": "2", + "entities": [ + { + "name": "Microsoft", + "matches": [ + { + "text": "Microsoft", + "offset": 10, + "length": 9, + "score": 0.1869365971673207 + } + ], + "language": "en", + "id": "Microsoft", + "url": "https://en.wikipedia.org/wiki/Microsoft", + "dataSource": "Wikipedia" + } + ] + }, + { + "id": "3", + "entities": [ + { + "name": "Space Needle", + "matches": [ + { + "text": "Space Needle", + "offset": 10, + "length": 12, + "score": 0.155903620065595 + } + ], + "language": "en", + "id": "Space Needle", + "url": "https://en.wikipedia.org/wiki/Space_Needle", + "dataSource": "Wikipedia" + } + ] + } + ], + "errors": [], + "modelVersion": "2019-10-01" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/examples/SuccessfulEntityPIIRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/examples/SuccessfulEntityPIIRequest.json new file mode 100644 index 000000000000..9bbb8a7ec4eb --- /dev/null +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/examples/SuccessfulEntityPIIRequest.json @@ -0,0 +1,75 @@ +{ + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "Endpoint": "{Endpoint}", + "input": { + "Documents": [ + { + "Language": "en", + "Id": "0", + "Text": "Microsoft employee with ssn 859-98-0987 is using our awesome API's." + }, + { + "Language": "en", + "Id": "1", + "Text": "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check." + }, + { + "Language": "en", + "Id": "2", + "Text": "Is 998.214.865-68 your Brazilian CPF number?" + } + ] + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "documents":[ + { + "id":"0", + "entities":[ + { + "text":"859-98-0987", + "type":"U.S. Social Security Number (SSN)", + "subtype":"", + "offset":28, + "length":11, + "score":0.65 + } + ] + }, + { + "id":"1", + "entities":[ + { + "text":"111000025", + "type":"ABA Routing Number", + "subtype":"", + "offset":18, + "length":9, + "score":0.75 + } + ] + }, + { + "id":"2", + "entities":[ + { + "text":"998.214.865-68", + "type":"Brazil CPF Number", + "subtype":"", + "offset":3, + "length":14, + "score":0.85 + } + ] + } + ], + "errors":[], + "modelVersion":"2019-10-01" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/examples/SuccessfulKeyPhrasesRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/examples/SuccessfulKeyPhrasesRequest.json new file mode 100644 index 000000000000..f8dd689f4892 --- /dev/null +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/examples/SuccessfulKeyPhrasesRequest.json @@ -0,0 +1,57 @@ +{ + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "Endpoint": "{Endpoint}", + "input": { + "documents": [ + { + "language": "en", + "id": "1", + "text": "Hello world. This is some input text that I love." + }, + { + "language": "fr", + "id": "2", + "text": "Bonjour tout le monde" + }, + { + "language": "es", + "id": "3", + "text": "La carretera estaba atascada. Había mucho tráfico el día de ayer." + } + ] + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "documents": [ + { + "id": "1", + "keyPhrases": [ + "world", + "input text" + ] + }, + { + "id": "2", + "keyPhrases": [ + "monde" + ] + }, + { + "id": "3", + "keyPhrases": [ + "carretera", + "tráfico", + "día" + ] + } + ], + "errors": [], + "modelVersion":"2019-10-01" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/examples/SuccessfulLanguagesRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/examples/SuccessfulLanguagesRequest.json new file mode 100644 index 000000000000..112aae5c410c --- /dev/null +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/examples/SuccessfulLanguagesRequest.json @@ -0,0 +1,64 @@ +{ + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "Endpoint": "{Endpoint}", + "input": { + "documents": [ + { + "countryHint": "US", + "id": "1", + "text": "Hello world" + }, + { + "id": "2", + "text": "Bonjour tout le monde" + }, + { + "id": "3", + "text": "La carretera estaba atascada. Había mucho tráfico el día de ayer." + } + ] + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "documents": [ + { + "id": "1", + "detectedLanguages": [ + { + "name": "English", + "iso6391Name": "en", + "score": 1 + } + ] + }, + { + "id": "2", + "detectedLanguages": [ + { + "name": "French", + "iso6391Name": "fr", + "score": 1 + } + ] + }, + { + "id": "3", + "detectedLanguages": [ + { + "name": "Spanish", + "iso6391Name": "es", + "score": 1 + } + ] + } + ], + "errors": [], + "modelVersion":"2019-10-01" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/examples/SuccessfulSentimentRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/examples/SuccessfulSentimentRequest.json new file mode 100644 index 000000000000..813b62404353 --- /dev/null +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/examples/SuccessfulSentimentRequest.json @@ -0,0 +1,128 @@ +{ + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "Endpoint": "{Endpoint}", + "input": { + "documents": [ + { + "language": "en", + "id": "1", + "text": "Hello world. This is some input text that I love." + }, + { + "language": "en", + "id": "2", + "text": "It's incredibly sunny outside! I'm so happy." + }, + { + "language": "en", + "id": "3", + "text": "Pike place market is my favorite Seattle attraction." + } + ] + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + + "documents": [ + { + "id": "1", + "sentiment": "positive", + "documentScores": + { + "positive": 0.998519241809845, + "neutral": 0.0009635657188483, + "negative": 0.000517153472174 + }, + "sentences": [ + { + "sentiment": "neutral", + "sentenceScores": + { + "positive": 0.070910170674324, + "neutral": 0.91240334510803223, + "negative": 0.0166865326464176 + }, + "offset": 0, + "length": 12 + }, + { + "sentiment": "positive", + "sentenceScores": + { + "positive": 0.998519241809845, + "neutral": 0.0009635657188483, + "negative": 0.000517153472174 + }, + "offset": 13, + "length": 36 + } + ] + }, + { + "id": "2", + "sentiment": "positive", + "documentScores": + { + "positive": 0.99545717239379883, + "neutral": 0.0034653299953789, + "negative": 0.0010774657130241 + }, + "sentences": [ + { + "sentiment": "neutral", + "sentenceScores": + { + "positive": 0.0499138832092285, + "neutral": 0.93870127201080322, + "negative": 0.0113849258050323 + }, + "offset": 0, + "length": 30 + }, + { + "sentiment": "positive", + "sentenceScores": + { + "positive": 0.99545717239379883, + "neutral": 0.0034653299953789, + "negative": 0.0010774657130241 + }, + "offset": 31, + "length": 13 + } + ] + }, + { + "id": "3", + "sentiment": "positive", + "documentScores": + { + "positive": 0.99651283025741577, + "neutral": 0.0018965365597978, + "negative": 0.0015906029148027 + }, + "sentences": [ + { + "sentiment": "positive", + "sentenceScores": + { + "positive": 0.99651283025741577, + "neutral": 0.0018965365597978, + "negative": 0.0015906029148027 + }, + "offset": 0, + "length": 52 + } + ] + } + ], + "errors": [], + "modelVersion": "2019-10-01" + } + } + } +} From 8f65113f2f5356021d188d50e98cb88a560d21ca Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 15 Nov 2019 06:48:47 +0000 Subject: [PATCH 36/62] update unkown word to custom-word.txt --- custom-words.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/custom-words.txt b/custom-words.txt index a55779efd30b..1d1e4072821d 100644 --- a/custom-words.txt +++ b/custom-words.txt @@ -104,6 +104,7 @@ Asns aspnet asyncinfo asyncoperation +atascada australiaeast australiasoutheast authenticatable @@ -219,6 +220,7 @@ canceldelete cancelpipelinerun canonicalized Carbonite +carretera catenate catenated caverphone @@ -456,6 +458,7 @@ environmentsettings errordetail errored Español +estaba Etag Ethereum evaluateautoscale @@ -570,6 +573,7 @@ GUID GUIDs GZRS haase +Había hadoop hana hanaonazure @@ -845,6 +849,7 @@ MSGETACLSTATUS MSGETFILESTATUS MSLISTSTATUS MSMCAZR +mucho multiapi Multiclass MULTIJSON @@ -1430,6 +1435,7 @@ tooltips trafficmanager trafficmanageranalytics trafficmanagerprofiles +tráfico transcoding transcriptmoderationresult translatortext From 07fd4178264e9e0c8927120bf82542bbc00be929 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 15 Nov 2019 06:52:30 +0000 Subject: [PATCH 37/62] git update folder case name --- .../preview/{v3.0-Preview.1 => v3.0-preview.1}/TextAnalytics.json | 0 .../examples/SuccessfulEntitiesRequest.json | 0 .../examples/SuccessfulEntityLinkingRequest.json | 0 .../examples/SuccessfulEntityPIIRequest.json | 0 .../examples/SuccessfulKeyPhrasesRequest.json | 0 .../examples/SuccessfulLanguagesRequest.json | 0 .../examples/SuccessfulSentimentRequest.json | 0 7 files changed, 0 insertions(+), 0 deletions(-) rename specification/cognitiveservices/data-plane/TextAnalytics/preview/{v3.0-Preview.1 => v3.0-preview.1}/TextAnalytics.json (100%) rename specification/cognitiveservices/data-plane/TextAnalytics/preview/{v3.0-Preview.1 => v3.0-preview.1}/examples/SuccessfulEntitiesRequest.json (100%) rename specification/cognitiveservices/data-plane/TextAnalytics/preview/{v3.0-Preview.1 => v3.0-preview.1}/examples/SuccessfulEntityLinkingRequest.json (100%) rename specification/cognitiveservices/data-plane/TextAnalytics/preview/{v3.0-Preview.1 => v3.0-preview.1}/examples/SuccessfulEntityPIIRequest.json (100%) rename specification/cognitiveservices/data-plane/TextAnalytics/preview/{v3.0-Preview.1 => v3.0-preview.1}/examples/SuccessfulKeyPhrasesRequest.json (100%) rename specification/cognitiveservices/data-plane/TextAnalytics/preview/{v3.0-Preview.1 => v3.0-preview.1}/examples/SuccessfulLanguagesRequest.json (100%) rename specification/cognitiveservices/data-plane/TextAnalytics/preview/{v3.0-Preview.1 => v3.0-preview.1}/examples/SuccessfulSentimentRequest.json (100%) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/TextAnalytics.json similarity index 100% rename from specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/TextAnalytics.json rename to specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/TextAnalytics.json diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/examples/SuccessfulEntitiesRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulEntitiesRequest.json similarity index 100% rename from specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/examples/SuccessfulEntitiesRequest.json rename to specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulEntitiesRequest.json diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/examples/SuccessfulEntityLinkingRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulEntityLinkingRequest.json similarity index 100% rename from specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/examples/SuccessfulEntityLinkingRequest.json rename to specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulEntityLinkingRequest.json diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/examples/SuccessfulEntityPIIRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulEntityPIIRequest.json similarity index 100% rename from specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/examples/SuccessfulEntityPIIRequest.json rename to specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulEntityPIIRequest.json diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/examples/SuccessfulKeyPhrasesRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulKeyPhrasesRequest.json similarity index 100% rename from specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/examples/SuccessfulKeyPhrasesRequest.json rename to specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulKeyPhrasesRequest.json diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/examples/SuccessfulLanguagesRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulLanguagesRequest.json similarity index 100% rename from specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/examples/SuccessfulLanguagesRequest.json rename to specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulLanguagesRequest.json diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/examples/SuccessfulSentimentRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulSentimentRequest.json similarity index 100% rename from specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-Preview.1/examples/SuccessfulSentimentRequest.json rename to specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulSentimentRequest.json From 7cbc912105ea08a24384db91c0b27db6b3c32de6 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 15 Nov 2019 07:09:07 +0000 Subject: [PATCH 38/62] update input name to match with example json files --- .../preview/v3.0-preview.1/TextAnalytics.json | 14 ++++++------- .../examples/SuccessfulEntityPIIRequest.json | 20 +++++++++---------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/TextAnalytics.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/TextAnalytics.json index 95e9fc39c16d..889a4f68559e 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/TextAnalytics.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/TextAnalytics.json @@ -51,7 +51,7 @@ "type" : "boolean" }, { "in" : "body", - "name" : "multiLanguageBatchInput", + "name" : "input", "description" : "Collection of documents to analyze.", "required": true, "schema" : { @@ -99,7 +99,7 @@ "type" : "boolean" }, { "in" : "body", - "name" : "multiLanguageBatchInput", + "name" : "input", "description" : "Collection of documents to analyze.", "required": true, "schema" : { @@ -147,7 +147,7 @@ "type" : "boolean" }, { "in" : "body", - "name" : "multiLanguageBatchInput", + "name" : "input", "description" : "Collection of documents to analyze.", "required": true, "schema" : { @@ -195,7 +195,7 @@ "type" : "boolean" }, { "in" : "body", - "name" : "multiLanguageBatchInput", + "name" : "input", "description" : "Collection of documents to analyze. Documents can now contain a language field to indicate the text language", "required": true, "schema" : { @@ -243,7 +243,7 @@ "type" : "boolean" }, { "in" : "body", - "name" : "languageBatchInput", + "name" : "input", "description" : "Collection of documents to analyze.", "required": true, "schema" : { @@ -291,7 +291,7 @@ "type" : "boolean" }, { "in" : "body", - "name" : "multiLanguageBatchInput", + "name" : "input", "description" : "Collection of documents to analyze.", "required": true, "schema" : { @@ -724,7 +724,7 @@ "type" : "string", "description" : "Entity type, such as Person/Location/Org/SSN etc" }, - "subType" : { + "subtype" : { "type" : "string", "description" : "Entity sub type, such as Age/Year/TimeRange etc" }, diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulEntityPIIRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulEntityPIIRequest.json index 9bbb8a7ec4eb..71f2cadce05d 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulEntityPIIRequest.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulEntityPIIRequest.json @@ -3,21 +3,21 @@ "Ocp-Apim-Subscription-Key": "{API key}", "Endpoint": "{Endpoint}", "input": { - "Documents": [ + "documents": [ { - "Language": "en", - "Id": "0", - "Text": "Microsoft employee with ssn 859-98-0987 is using our awesome API's." + "language": "en", + "id": "0", + "text": "Microsoft employee with ssn 859-98-0987 is using our awesome API's." }, { - "Language": "en", - "Id": "1", - "Text": "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check." + "language": "en", + "id": "1", + "text": "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check." }, { - "Language": "en", - "Id": "2", - "Text": "Is 998.214.865-68 your Brazilian CPF number?" + "language": "en", + "id": "2", + "text": "Is 998.214.865-68 your Brazilian CPF number?" } ] } From f81bb0d2fd27fb3df5dcf42e1fb9c8e992fbc21b Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 15 Nov 2019 07:20:13 +0000 Subject: [PATCH 39/62] update 500 to default --> same as previous version .json files --- .../preview/v3.0-preview.1/TextAnalytics.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/TextAnalytics.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/TextAnalytics.json index 889a4f68559e..5d673e08342b 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/TextAnalytics.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/TextAnalytics.json @@ -65,7 +65,7 @@ "$ref": "#/definitions/EntitiesResult" } }, - "500" : { + "default" : { "description" : "Error Response", "schema" : { "$ref" : "#/definitions/Error" @@ -113,7 +113,7 @@ "$ref" : "#/definitions/EntitiesResult" } }, - "500" : { + "default" : { "description" : "Error Response", "schema" : { "$ref" : "#/definitions/Error" @@ -161,7 +161,7 @@ "$ref" : "#/definitions/EntityLinkingResult" } }, - "500" : { + "default" : { "description" : "Error Response", "schema" : { "$ref" : "#/definitions/Error" @@ -209,7 +209,7 @@ "$ref" : "#/definitions/KeyPhraseResult" } }, - "500" : { + "default" : { "description" : "Error Response", "schema" : { "$ref" : "#/definitions/Error" @@ -257,7 +257,7 @@ "$ref" : "#/definitions/LanguageResult" } }, - "500" : { + "default" : { "description" : "Error Response", "schema" : { "$ref" : "#/definitions/Error" @@ -305,7 +305,7 @@ "$ref" : "#/definitions/SentimentResponse" } }, - "500" : { + "default" : { "description" : "Error Response", "schema" : { "$ref" : "#/definitions/Error" From 8802acd1e93c6dd8f8f0b88bb9d268492a16a99f Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 15 Nov 2019 07:27:17 +0000 Subject: [PATCH 40/62] update MultiLanguageBatchInput --- .../preview/v3.0-preview.1/TextAnalytics.json | 36 +++++++++---------- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/TextAnalytics.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/TextAnalytics.json index 5d673e08342b..777b5d58e889 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/TextAnalytics.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/TextAnalytics.json @@ -338,25 +338,23 @@ }, "description" : "Contains a set of input documents to be analyzed by the service.", "example" : { - "application/json" : { - "documents": [ - { - "language": "en", - "id": "1", - "text": "Hello world. This is some input text that I love." - }, - { - "language": "en", - "id": "2", - "text": "It's sunny outside! I'm so happy." - }, - { - "language": "en", - "id": "3", - "text": "Pike place market is my favorite Seattle attraction." - } - ] - } + "documents": [ + { + "language": "en", + "id": "1", + "text": "Hello world. This is some input text that I love." + }, + { + "language": "en", + "id": "2", + "text": "It's sunny outside! I'm so happy." + }, + { + "language": "en", + "id": "3", + "text": "Pike place market is my favorite Seattle attraction." + } + ] } }, "MultiLanguageInput" : { From 2d19905c6c2a8055eab9212da4c40c9ed4293653 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 15 Nov 2019 07:32:52 +0000 Subject: [PATCH 41/62] update examples formatting --- .../examples/SuccessfulEntitiesRequest.json | 112 +++++++++--------- .../examples/SuccessfulEntityPIIRequest.json | 66 +++++------ .../examples/SuccessfulSentimentRequest.json | 1 - 3 files changed, 89 insertions(+), 90 deletions(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulEntitiesRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulEntitiesRequest.json index 42fff041a464..babd6e22d296 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulEntitiesRequest.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulEntitiesRequest.json @@ -26,62 +26,62 @@ "200": { "headers": {}, "body": { - "documents": [ - { - "id": "1", - "entities": [ - { - "text": "Seattle", - "type": "Location", - "offset": 26, - "length": 7, - "score": 0.8062429428100586 - }, - { - "text": "last week", - "type": "DateTime", - "subtype": "DateRange", - "offset": 34, - "length": 9, - "score": 0.8 - } - ] - }, - { - "id": "2", - "entities": [ - { - "text": "Microsoft", - "type": "Organization", - "offset": 10, - "length": 9, - "score": 0.9998359680175781 - } - ] - }, - { - "id": "3", - "entities": [ - { - "text": "Space Needle", - "type": "Organization", - "offset": 10, - "length": 12, - "score": 0.7599651217460632 - }, - { - "text": "2", - "type": "Quantity", - "subtype": "Number", - "offset": 23, - "length": 1, - "score": 0.8 - } - ] - } - ], - "errors": [], - "modelVersion": "2019-10-01" + "documents": [ + { + "id": "1", + "entities": [ + { + "text": "Seattle", + "type": "Location", + "offset": 26, + "length": 7, + "score": 0.8062429428100586 + }, + { + "text": "last week", + "type": "DateTime", + "subtype": "DateRange", + "offset": 34, + "length": 9, + "score": 0.8 + } + ] + }, + { + "id": "2", + "entities": [ + { + "text": "Microsoft", + "type": "Organization", + "offset": 10, + "length": 9, + "score": 0.9998359680175781 + } + ] + }, + { + "id": "3", + "entities": [ + { + "text": "Space Needle", + "type": "Organization", + "offset": 10, + "length": 12, + "score": 0.7599651217460632 + }, + { + "text": "2", + "type": "Quantity", + "subtype": "Number", + "offset": 23, + "length": 1, + "score": 0.8 + } + ] + } + ], + "errors": [], + "modelVersion": "2019-10-01" } } } diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulEntityPIIRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulEntityPIIRequest.json index 71f2cadce05d..0bdef5227623 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulEntityPIIRequest.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulEntityPIIRequest.json @@ -28,43 +28,43 @@ "body": { "documents":[ { - "id":"0", - "entities":[ - { - "text":"859-98-0987", - "type":"U.S. Social Security Number (SSN)", - "subtype":"", - "offset":28, - "length":11, - "score":0.65 - } - ] + "id":"0", + "entities":[ + { + "text":"859-98-0987", + "type":"U.S. Social Security Number (SSN)", + "subtype":"", + "offset":28, + "length":11, + "score":0.65 + } + ] }, { - "id":"1", - "entities":[ - { - "text":"111000025", - "type":"ABA Routing Number", - "subtype":"", - "offset":18, - "length":9, - "score":0.75 - } - ] + "id":"1", + "entities":[ + { + "text":"111000025", + "type":"ABA Routing Number", + "subtype":"", + "offset":18, + "length":9, + "score":0.75 + } + ] }, { - "id":"2", - "entities":[ - { - "text":"998.214.865-68", - "type":"Brazil CPF Number", - "subtype":"", - "offset":3, - "length":14, - "score":0.85 - } - ] + "id":"2", + "entities":[ + { + "text":"998.214.865-68", + "type":"Brazil CPF Number", + "subtype":"", + "offset":3, + "length":14, + "score":0.85 + } + ] } ], "errors":[], diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulSentimentRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulSentimentRequest.json index 813b62404353..0e228085c59d 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulSentimentRequest.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulSentimentRequest.json @@ -26,7 +26,6 @@ "200": { "headers": {}, "body": { - "documents": [ { "id": "1", From 670660d041ad6fc7f2845392bb2767321a34cde6 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 15 Nov 2019 07:41:18 +0000 Subject: [PATCH 42/62] update formatting of .json --- .../preview/v3.0-preview.1/TextAnalytics.json | 40 +++++++++---------- .../examples/SuccessfulSentimentRequest.json | 2 +- 2 files changed, 20 insertions(+), 22 deletions(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/TextAnalytics.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/TextAnalytics.json index 777b5d58e889..3a411158112f 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/TextAnalytics.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/TextAnalytics.json @@ -937,26 +937,24 @@ } }, "example" : { - "application/json" : { - "documents": [ - { - "id": "1", - "text": "Hello world", - "countryHint": "US" - }, - { - "id": "2", - "text": "Bonjour tout le monde" - }, - { - "id": "3", - "text": "La carretera estaba atascada. Había mucho tráfico el día de ayer." - } - ] - } - } - }, - "LanguageInput" : { + "documents": [ + { + "id": "1", + "text": "Hello world", + "countryHint": "US" + }, + { + "id": "2", + "text": "Bonjour tout le monde" + }, + { + "id": "3", + "text": "La carretera estaba atascada. Había mucho tráfico el día de ayer." + } + ] + } + }, + "LanguageInput" : { "type" : "object", "required" : [ "id", @@ -974,7 +972,7 @@ "type" : "string" } } - }, + }, "LanguageResult" : { "type" : "object", "required" : [ diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulSentimentRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulSentimentRequest.json index 0e228085c59d..aed2fc982023 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulSentimentRequest.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulSentimentRequest.json @@ -121,7 +121,7 @@ ], "errors": [], "modelVersion": "2019-10-01" - } + } } } } From ad658be6048d275f2d6fe99f5ab2fd451b809a56 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 15 Nov 2019 07:44:56 +0000 Subject: [PATCH 43/62] update x-ms-examples descriptions --- .../preview/v3.0-preview.1/TextAnalytics.json | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/TextAnalytics.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/TextAnalytics.json index 3a411158112f..8968b4aca1ac 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/TextAnalytics.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/TextAnalytics.json @@ -217,7 +217,7 @@ } }, "x-ms-examples": { - "Successful Detect Language request": { + "Successful Key Phrase request": { "$ref": ".//examples//SuccessfulKeyPhrasesRequest.json" } }, @@ -313,7 +313,7 @@ } }, "x-ms-examples": { - "Successful Detect Language request": { + "Successful Sentiment request": { "$ref": ".//examples//SuccessfulSentimentRequest.json" } }, @@ -618,8 +618,7 @@ "sentiment", "sentenceScores", "offset", - "length", - "warnings" + "length" ], "properties" : { "sentiment" : { From f6fad8e3a55aebebcc7368fb9f2a35b882911d17 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 15 Nov 2019 07:51:57 +0000 Subject: [PATCH 44/62] test required false for model-version&showStats --- .../TextAnalytics/preview/v3.0-preview.1/TextAnalytics.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/TextAnalytics.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/TextAnalytics.json index 8968b4aca1ac..855f4d8913ce 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/TextAnalytics.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/TextAnalytics.json @@ -43,12 +43,14 @@ "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" + "type" : "string", + "required": false }, { "name" : "showStats", "in" : "query", "description" : "(Optional) if set to true, response will contain input and document level statistics.", - "type" : "boolean" + "type" : "boolean", + "required": false }, { "in" : "body", "name" : "input", From f3e2cbce675586a13ae5b04b6242d3de640ba71d Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 15 Nov 2019 07:59:09 +0000 Subject: [PATCH 45/62] update model-version and showStats --- .../TextAnalytics/preview/v3.0-preview.1/TextAnalytics.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/TextAnalytics.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/TextAnalytics.json index 855f4d8913ce..672db3e11f79 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/TextAnalytics.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/TextAnalytics.json @@ -44,13 +44,15 @@ "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 + "required": false, + "default": "latest" }, { "name" : "showStats", "in" : "query", "description" : "(Optional) if set to true, response will contain input and document level statistics.", "type" : "boolean", - "required": false + "required": false, + "default": false }, { "in" : "body", "name" : "input", From 5daf4482997192b5121547184e1c056b57a86433 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 15 Nov 2019 08:05:40 +0000 Subject: [PATCH 46/62] update formatting --- .../preview/v3.0-preview.1/TextAnalytics.json | 6 +- .../examples/SuccessfulEntityPIIRequest.json | 36 ++++----- .../examples/SuccessfulSentimentRequest.json | 80 +++++++++---------- 3 files changed, 60 insertions(+), 62 deletions(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/TextAnalytics.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/TextAnalytics.json index 672db3e11f79..855f4d8913ce 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/TextAnalytics.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/TextAnalytics.json @@ -44,15 +44,13 @@ "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, - "default": "latest" + "required": false }, { "name" : "showStats", "in" : "query", "description" : "(Optional) if set to true, response will contain input and document level statistics.", "type" : "boolean", - "required": false, - "default": false + "required": false }, { "in" : "body", "name" : "input", diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulEntityPIIRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulEntityPIIRequest.json index 0bdef5227623..1389138319ea 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulEntityPIIRequest.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulEntityPIIRequest.json @@ -31,12 +31,12 @@ "id":"0", "entities":[ { - "text":"859-98-0987", - "type":"U.S. Social Security Number (SSN)", - "subtype":"", - "offset":28, - "length":11, - "score":0.65 + "text":"859-98-0987", + "type":"U.S. Social Security Number (SSN)", + "subtype":"", + "offset":28, + "length":11, + "score":0.65 } ] }, @@ -44,12 +44,12 @@ "id":"1", "entities":[ { - "text":"111000025", - "type":"ABA Routing Number", - "subtype":"", - "offset":18, - "length":9, - "score":0.75 + "text":"111000025", + "type":"ABA Routing Number", + "subtype":"", + "offset":18, + "length":9, + "score":0.75 } ] }, @@ -57,12 +57,12 @@ "id":"2", "entities":[ { - "text":"998.214.865-68", - "type":"Brazil CPF Number", - "subtype":"", - "offset":3, - "length":14, - "score":0.85 + "text":"998.214.865-68", + "type":"Brazil CPF Number", + "subtype":"", + "offset":3, + "length":14, + "score":0.85 } ] } diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulSentimentRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulSentimentRequest.json index aed2fc982023..545cf9e72eb7 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulSentimentRequest.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulSentimentRequest.json @@ -31,31 +31,31 @@ "id": "1", "sentiment": "positive", "documentScores": - { - "positive": 0.998519241809845, - "neutral": 0.0009635657188483, - "negative": 0.000517153472174 - }, + { + "positive": 0.998519241809845, + "neutral": 0.0009635657188483, + "negative": 0.000517153472174 + }, "sentences": [ { "sentiment": "neutral", "sentenceScores": - { - "positive": 0.070910170674324, - "neutral": 0.91240334510803223, - "negative": 0.0166865326464176 - }, + { + "positive": 0.070910170674324, + "neutral": 0.91240334510803223, + "negative": 0.0166865326464176 + }, "offset": 0, "length": 12 }, { "sentiment": "positive", "sentenceScores": - { - "positive": 0.998519241809845, - "neutral": 0.0009635657188483, - "negative": 0.000517153472174 - }, + { + "positive": 0.998519241809845, + "neutral": 0.0009635657188483, + "negative": 0.000517153472174 + }, "offset": 13, "length": 36 } @@ -65,31 +65,31 @@ "id": "2", "sentiment": "positive", "documentScores": - { - "positive": 0.99545717239379883, - "neutral": 0.0034653299953789, - "negative": 0.0010774657130241 - }, + { + "positive": 0.99545717239379883, + "neutral": 0.0034653299953789, + "negative": 0.0010774657130241 + }, "sentences": [ { "sentiment": "neutral", "sentenceScores": - { - "positive": 0.0499138832092285, - "neutral": 0.93870127201080322, - "negative": 0.0113849258050323 - }, + { + "positive": 0.0499138832092285, + "neutral": 0.93870127201080322, + "negative": 0.0113849258050323 + }, "offset": 0, "length": 30 }, { "sentiment": "positive", "sentenceScores": - { - "positive": 0.99545717239379883, - "neutral": 0.0034653299953789, - "negative": 0.0010774657130241 - }, + { + "positive": 0.99545717239379883, + "neutral": 0.0034653299953789, + "negative": 0.0010774657130241 + }, "offset": 31, "length": 13 } @@ -99,20 +99,20 @@ "id": "3", "sentiment": "positive", "documentScores": - { - "positive": 0.99651283025741577, - "neutral": 0.0018965365597978, - "negative": 0.0015906029148027 - }, + { + "positive": 0.99651283025741577, + "neutral": 0.0018965365597978, + "negative": 0.0015906029148027 + }, "sentences": [ { "sentiment": "positive", "sentenceScores": - { - "positive": 0.99651283025741577, - "neutral": 0.0018965365597978, - "negative": 0.0015906029148027 - }, + { + "positive": 0.99651283025741577, + "neutral": 0.0018965365597978, + "negative": 0.0015906029148027 + }, "offset": 0, "length": 52 } From 28232f73bc51423fe2d995bb980e32b717727679 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 15 Nov 2019 08:09:37 +0000 Subject: [PATCH 47/62] add x-nullabletrue --- .../TextAnalytics/preview/v3.0-preview.1/TextAnalytics.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/TextAnalytics.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/TextAnalytics.json index 855f4d8913ce..5e5709d2dfce 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/TextAnalytics.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/TextAnalytics.json @@ -44,13 +44,15 @@ "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 + "required": false, + "x-nullable": true }, { "name" : "showStats", "in" : "query", "description" : "(Optional) if set to true, response will contain input and document level statistics.", "type" : "boolean", - "required": false + "required": false, + "x-nullable": true }, { "in" : "body", "name" : "input", From f5cbe7280edc726aae43ac650803a66774f0b0ce Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 15 Nov 2019 08:15:46 +0000 Subject: [PATCH 48/62] update formmating --- .../preview/v3.0-preview.1/TextAnalytics.json | 40 ++++++++++--------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/TextAnalytics.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/TextAnalytics.json index 5e5709d2dfce..ec20d9680361 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/TextAnalytics.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/TextAnalytics.json @@ -39,29 +39,31 @@ "operationId" : "EntitiesRecognitionGeneral", "consumes" : [ "application/json", "text/json" ], "produces" : [ "application/json", "text/json" ], - "parameters" : [ { - "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-nullable": true - }, { + "parameters" : [ + { + "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 + }, + { "name" : "showStats", "in" : "query", "description" : "(Optional) if set to true, response will contain input and document level statistics.", "type" : "boolean", - "required": false, - "x-nullable": true - }, { - "in" : "body", - "name" : "input", - "description" : "Collection of documents to analyze.", - "required": true, - "schema" : { - "$ref" : "#/definitions/MultiLanguageBatchInput" - } - } ], + "required": false + }, + { + "in" : "body", + "name" : "input", + "description" : "Collection of documents to analyze.", + "required": true, + "schema" : { + "$ref" : "#/definitions/MultiLanguageBatchInput" + } + } + ], "responses" : { "200" : { "description" : "A successful call results in a list of recognized entities returned for each valid document.", From 57e5e4173ca67ad57bb623bb7af1aa5af4a6c230 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 15 Nov 2019 08:17:59 +0000 Subject: [PATCH 49/62] update pii example forammating --- .../v3.0-preview.1/examples/SuccessfulEntityPIIRequest.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulEntityPIIRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulEntityPIIRequest.json index 1389138319ea..7b91757c7512 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulEntityPIIRequest.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulEntityPIIRequest.json @@ -66,9 +66,9 @@ } ] } - ], - "errors":[], - "modelVersion":"2019-10-01" + ], + "errors":[], + "modelVersion":"2019-10-01" } } } From 2b057c699d22ca02c4b138b1854a79d1f6897571 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 15 Nov 2019 08:23:19 +0000 Subject: [PATCH 50/62] update formaating --- .../preview/v3.0-preview.1/TextAnalytics.json | 10 +-- .../examples/SuccessfulEntitiesRequest.json | 1 + .../examples/SuccessfulEntityPIIRequest.json | 68 +++++++++---------- .../examples/SuccessfulKeyPhrasesRequest.json | 2 +- .../examples/SuccessfulLanguagesRequest.json | 2 +- 5 files changed, 42 insertions(+), 41 deletions(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/TextAnalytics.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/TextAnalytics.json index ec20d9680361..b2f07ed0e891 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/TextAnalytics.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/TextAnalytics.json @@ -48,11 +48,11 @@ "required": false }, { - "name" : "showStats", - "in" : "query", - "description" : "(Optional) if set to true, response will contain input and document level statistics.", - "type" : "boolean", - "required": false + "name" : "showStats", + "in" : "query", + "description" : "(Optional) if set to true, response will contain input and document level statistics.", + "type" : "boolean", + "required": false }, { "in" : "body", diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulEntitiesRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulEntitiesRequest.json index babd6e22d296..99de747f3c96 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulEntitiesRequest.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulEntitiesRequest.json @@ -2,6 +2,7 @@ "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", "Endpoint": "{Endpoint}", + "model-version": "2019-10-01", "input": { "documents": [ { diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulEntityPIIRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulEntityPIIRequest.json index 7b91757c7512..29cba30d10b6 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulEntityPIIRequest.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulEntityPIIRequest.json @@ -26,50 +26,50 @@ "200": { "headers": {}, "body": { - "documents":[ - { - "id":"0", - "entities":[ - { - "text":"859-98-0987", - "type":"U.S. Social Security Number (SSN)", - "subtype":"", - "offset":28, - "length":11, - "score":0.65 + "documents": [ + { + "id": "0", + "entities": [ + { + "text": "859-98-0987", + "type": "U.S. Social Security Number (SSN)", + "subtype": "", + "offset": 28, + "length": 11, + "score": 0.65 } ] }, - { - "id":"1", - "entities":[ - { - "text":"111000025", - "type":"ABA Routing Number", - "subtype":"", - "offset":18, - "length":9, - "score":0.75 + { + "id": "1", + "entities": [ + { + "text": "111000025", + "type": "ABA Routing Number", + "subtype": "", + "offset": 18, + "length": 9, + "score": 0.75 } ] }, - { - "id":"2", - "entities":[ - { - "text":"998.214.865-68", - "type":"Brazil CPF Number", - "subtype":"", - "offset":3, - "length":14, - "score":0.85 + { + "id": "2", + "entities": [ + { + "text": "998.214.865-68", + "type": "Brazil CPF Number", + "subtype": "", + "offset": 3, + "length": 14, + "score": 0.85 } ] } ], - "errors":[], - "modelVersion":"2019-10-01" - } + "errors": [], + "modelVersion": "2019-10-01" + } } } } diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulKeyPhrasesRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulKeyPhrasesRequest.json index f8dd689f4892..31f5ab9c3201 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulKeyPhrasesRequest.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulKeyPhrasesRequest.json @@ -50,7 +50,7 @@ } ], "errors": [], - "modelVersion":"2019-10-01" + "modelVersion": "2019-10-01" } } } diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulLanguagesRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulLanguagesRequest.json index 112aae5c410c..071bf51ea8c9 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulLanguagesRequest.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulLanguagesRequest.json @@ -57,7 +57,7 @@ } ], "errors": [], - "modelVersion":"2019-10-01" + "modelVersion": "2019-10-01" } } } From 56afbc768e00c8c84fbf35a98c3a1a79c08da794 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 15 Nov 2019 08:29:36 +0000 Subject: [PATCH 51/62] update formatting --- .../examples/SuccessfulKeyPhrasesRequest.json | 4 +- .../examples/SuccessfulSentimentRequest.json | 46 ++++++++----------- 2 files changed, 21 insertions(+), 29 deletions(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulKeyPhrasesRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulKeyPhrasesRequest.json index 31f5ab9c3201..96481869f6b5 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulKeyPhrasesRequest.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulKeyPhrasesRequest.json @@ -51,7 +51,7 @@ ], "errors": [], "modelVersion": "2019-10-01" - } + } } } -} +} \ No newline at end of file diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulSentimentRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulSentimentRequest.json index 545cf9e72eb7..381bac2dab12 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulSentimentRequest.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulSentimentRequest.json @@ -30,8 +30,7 @@ { "id": "1", "sentiment": "positive", - "documentScores": - { + "documentScores": { "positive": 0.998519241809845, "neutral": 0.0009635657188483, "negative": 0.000517153472174 @@ -39,19 +38,17 @@ "sentences": [ { "sentiment": "neutral", - "sentenceScores": - { + "sentenceScores": { "positive": 0.070910170674324, - "neutral": 0.91240334510803223, + "neutral": 0.9124033451080322, "negative": 0.0166865326464176 }, "offset": 0, "length": 12 - }, + }, { "sentiment": "positive", - "sentenceScores": - { + "sentenceScores": { "positive": 0.998519241809845, "neutral": 0.0009635657188483, "negative": 0.000517153472174 @@ -60,33 +57,30 @@ "length": 36 } ] - }, + }, { "id": "2", "sentiment": "positive", - "documentScores": - { - "positive": 0.99545717239379883, + "documentScores": { + "positive": 0.9954571723937988, "neutral": 0.0034653299953789, "negative": 0.0010774657130241 }, "sentences": [ { "sentiment": "neutral", - "sentenceScores": - { + "sentenceScores": { "positive": 0.0499138832092285, - "neutral": 0.93870127201080322, + "neutral": 0.9387012720108032, "negative": 0.0113849258050323 }, "offset": 0, "length": 30 - }, + }, { "sentiment": "positive", - "sentenceScores": - { - "positive": 0.99545717239379883, + "sentenceScores": { + "positive": 0.9954571723937988, "neutral": 0.0034653299953789, "negative": 0.0010774657130241 }, @@ -94,22 +88,20 @@ "length": 13 } ] - }, + }, { "id": "3", "sentiment": "positive", - "documentScores": - { - "positive": 0.99651283025741577, + "documentScores": { + "positive": 0.9965128302574158, "neutral": 0.0018965365597978, "negative": 0.0015906029148027 }, "sentences": [ { "sentiment": "positive", - "sentenceScores": - { - "positive": 0.99651283025741577, + "sentenceScores": { + "positive": 0.9965128302574158, "neutral": 0.0018965365597978, "negative": 0.0015906029148027 }, @@ -124,4 +116,4 @@ } } } -} +} \ No newline at end of file From 6877a8430c5e8fdf88a804c2ebfddda7b6fe62eb Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 15 Nov 2019 08:30:43 +0000 Subject: [PATCH 52/62] update textanalytics.json format --- .../preview/v3.0-preview.1/TextAnalytics.json | 1341 +++++++++-------- 1 file changed, 702 insertions(+), 639 deletions(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/TextAnalytics.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/TextAnalytics.json index b2f07ed0e891..c6846bd937e1 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/TextAnalytics.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/TextAnalytics.json @@ -31,50 +31,56 @@ } ] }, - "paths" : { - "/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" : [ + "paths": { + "/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": [ { - "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", + "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 - }, + }, { - "name" : "showStats", - "in" : "query", - "description" : "(Optional) if set to true, response will contain input and document level statistics.", - "type" : "boolean", + "name": "showStats", + "in": "query", + "description": "(Optional) if set to true, response will contain input and document level statistics.", + "type": "boolean", "required": false - }, + }, { - "in" : "body", - "name" : "input", - "description" : "Collection of documents to analyze.", + "in": "body", + "name": "input", + "description": "Collection of documents to analyze.", "required": true, - "schema" : { - "$ref" : "#/definitions/MultiLanguageBatchInput" + "schema": { + "$ref": "#/definitions/MultiLanguageBatchInput" } - } + } ], - "responses" : { - "200" : { - "description" : "A successful call results in a list of recognized entities returned for each valid document.", - "schema" : { + "responses": { + "200": { + "description": "A successful call results in a list of recognized entities returned for each valid document.", + "schema": { "$ref": "#/definitions/EntitiesResult" } }, - "default" : { - "description" : "Error Response", - "schema" : { - "$ref" : "#/definitions/Error" + "default": { + "description": "Error Response", + "schema": { + "$ref": "#/definitions/Error" } } }, @@ -86,43 +92,53 @@ "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" : [ { - "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" - }, { - "name" : "showStats", - "in" : "query", - "description" : "(Optional) if set to true, response will contain input and document level statistics.", - "type" : "boolean" - }, { - "in" : "body", - "name" : "input", - "description" : "Collection of documents to analyze.", - "required": true, - "schema" : { - "$ref" : "#/definitions/MultiLanguageBatchInput" + "/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": [ + { + "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" + }, + { + "name": "showStats", + "in": "query", + "description": "(Optional) if set to true, response will contain input and document level statistics.", + "type": "boolean" + }, + { + "in": "body", + "name": "input", + "description": "Collection of documents to analyze.", + "required": true, + "schema": { + "$ref": "#/definitions/MultiLanguageBatchInput" + } } - } ], - "responses" : { - "200" : { - "description" : "A successful call results in a list of entities containing personal information returned for each valid document", - "schema" : { - "$ref" : "#/definitions/EntitiesResult" + ], + "responses": { + "200": { + "description": "A successful call results in a list of entities containing personal information returned for each valid document", + "schema": { + "$ref": "#/definitions/EntitiesResult" } }, - "default" : { - "description" : "Error Response", - "schema" : { - "$ref" : "#/definitions/Error" + "default": { + "description": "Error Response", + "schema": { + "$ref": "#/definitions/Error" } } }, @@ -134,43 +150,53 @@ "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" : [ { - "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" - }, { - "name" : "showStats", - "in" : "query", - "description" : "(Optional) if set to true, response will contain input and document level statistics.", - "type" : "boolean" - }, { - "in" : "body", - "name" : "input", - "description" : "Collection of documents to analyze.", - "required": true, - "schema" : { - "$ref" : "#/definitions/MultiLanguageBatchInput" + "/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": [ + { + "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" + }, + { + "name": "showStats", + "in": "query", + "description": "(Optional) if set to true, response will contain input and document level statistics.", + "type": "boolean" + }, + { + "in": "body", + "name": "input", + "description": "Collection of documents to analyze.", + "required": true, + "schema": { + "$ref": "#/definitions/MultiLanguageBatchInput" + } } - } ], - "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" + ], + "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" : "Error Response", - "schema" : { - "$ref" : "#/definitions/Error" + "default": { + "description": "Error Response", + "schema": { + "$ref": "#/definitions/Error" } } }, @@ -182,43 +208,53 @@ "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" : [ { - "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" - }, { - "name" : "showStats", - "in" : "query", - "description" : "(Optional) if set to true, response will contain input and document level statistics.", - "type" : "boolean" - }, { - "in" : "body", - "name" : "input", - "description" : "Collection of documents to analyze. Documents can now contain a language field to indicate the text language", - "required": true, - "schema" : { - "$ref" : "#/definitions/MultiLanguageBatchInput" + "/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": [ + { + "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" + }, + { + "name": "showStats", + "in": "query", + "description": "(Optional) if set to true, response will contain input and document level statistics.", + "type": "boolean" + }, + { + "in": "body", + "name": "input", + "description": "Collection of documents to analyze. Documents can now contain a language field to indicate the text language", + "required": true, + "schema": { + "$ref": "#/definitions/MultiLanguageBatchInput" + } } - } ], - "responses" : { - "200" : { - "description" : "A successful response results in 0 or more key phrases identified in each valid document", - "schema" : { - "$ref" : "#/definitions/KeyPhraseResult" + ], + "responses": { + "200": { + "description": "A successful response results in 0 or more key phrases identified in each valid document", + "schema": { + "$ref": "#/definitions/KeyPhraseResult" } }, - "default" : { - "description" : "Error Response", - "schema" : { - "$ref" : "#/definitions/Error" + "default": { + "description": "Error Response", + "schema": { + "$ref": "#/definitions/Error" } } }, @@ -230,43 +266,53 @@ "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" : [ { - "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" - }, { - "name" : "showStats", - "in" : "query", - "description" : "(Optional) if set to true, response will contain input and document level statistics.", - "type" : "boolean" - }, { - "in" : "body", - "name" : "input", - "description" : "Collection of documents to analyze.", - "required": true, - "schema" : { - "$ref" : "#/definitions/LanguageBatchInput" + "/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": [ + { + "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" + }, + { + "name": "showStats", + "in": "query", + "description": "(Optional) if set to true, response will contain input and document level statistics.", + "type": "boolean" + }, + { + "in": "body", + "name": "input", + "description": "Collection of documents to analyze.", + "required": true, + "schema": { + "$ref": "#/definitions/LanguageBatchInput" + } } - } ], - "responses" : { - "200" : { - "description" : "A successful call results in the detected language with the highest probability for each valid document", - "schema" : { - "$ref" : "#/definitions/LanguageResult" + ], + "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" : "Error Response", - "schema" : { - "$ref" : "#/definitions/Error" + "default": { + "description": "Error Response", + "schema": { + "$ref": "#/definitions/Error" } } }, @@ -278,43 +324,53 @@ "deprecated": false } }, - "/sentiment" : { - "post" : { - "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" ], - "parameters" : [ { - "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" - }, { - "name" : "showStats", - "in" : "query", - "description" : "(Optional) if set to true, response will contain input and document level statistics.", - "type" : "boolean" - }, { - "in" : "body", - "name" : "input", - "description" : "Collection of documents to analyze.", - "required": true, - "schema" : { - "$ref" : "#/definitions/MultiLanguageBatchInput" + "/sentiment": { + "post": { + "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" + ], + "parameters": [ + { + "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" + }, + { + "name": "showStats", + "in": "query", + "description": "(Optional) if set to true, response will contain input and document level statistics.", + "type": "boolean" + }, + { + "in": "body", + "name": "input", + "description": "Collection of documents to analyze.", + "required": true, + "schema": { + "$ref": "#/definitions/MultiLanguageBatchInput" + } } - } ], - "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" + ], + "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" : "Error Response", - "schema" : { - "$ref" : "#/definitions/Error" + "default": { + "description": "Error Response", + "schema": { + "$ref": "#/definitions/Error" } } }, @@ -327,23 +383,23 @@ } } }, - "definitions" : { - "MultiLanguageBatchInput" : { - "type" : "object", - "required" : [ + "definitions": { + "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" + "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.", - "example" : { + "description": "Contains a set of input documents to be analyzed by the service.", + "example": { "documents": [ { "language": "en", @@ -363,89 +419,89 @@ ] } }, - "MultiLanguageInput" : { - "type" : "object", - "required" : [ + "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." - } + "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." + "description": "Contains an input document to be analyzed by the service." }, "DocumentError": { "type": "object", - "required" : [ + "required": [ "id", "error" ], "properties": { "id": { "type": "string", - "description" : "Document Id." + "description": "Document Id." }, "error": { "type": "object", - "description" : "Document Error.", - "items" : { - "$ref" : "#/definitions/Error" - } + "description": "Document Error.", + "items": { + "$ref": "#/definitions/Error" + } } } }, "Error": { "type": "object", - "required" : [ + "required": [ "code", "message" ], "properties": { "code": { "type": "string", - "enum":[ + "enum": [ "invalidRequest", "invalidArgument", "internalServerError", "serviceUnavailable" - ], - "description" : "Error code." + ], + "description": "Error code." }, "message": { "type": "string", - "description" : "Error message." + "description": "Error message." }, "target": { "type": "string", - "description" : "Error target." + "description": "Error target." }, "innererror": { "$ref": "#/definitions/InnerError", - "description" : "Inner error contains more specific information." + "description": "Inner error contains more specific information." }, "details": { "type": "array", - "description" : "Details about specific errors that led to this reported error.", - "items" : { - "$ref" : "#/definitions/Error" + "description": "Details about specific errors that led to this reported error.", + "items": { + "$ref": "#/definitions/Error" } } } }, "InnerError": { "type": "object", - "required" : [ + "required": [ "code", "message" ], @@ -463,491 +519,499 @@ "unsupportedLanguageCode", "invalidCountryHint" ], - "description" : "Error code." + "description": "Error code." }, "message": { "type": "string", - "description" : "Error message." + "description": "Error message." }, "target": { "type": "string", - "description" : "Error target." + "description": "Error target." }, "innererror": { "$ref": "#/definitions/InnerError", - "description" : "Inner error contains more specific information." + "description": "Inner error contains more specific information." } } }, - "SentimentResponse" : { - "type" : "object", - "required" : [ + "SentimentResponse": { + "type": "object", + "required": [ "documents", "errors", "modelVersion" ], - "properties" : { - "documents" : { - "type" : "array", - "description" : "Sentiment analysis per document.", - "items" : { - "$ref" : "#/definitions/DocumentSentiment" + "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" + "errors": { + "type": "array", + "description": "Errors by document id.", + "items": { + "$ref": "#/definitions/DocumentError" } }, - "statistics" : { - "$ref" : "#/definitions/RequestStatistics" + "statistics": { + "$ref": "#/definitions/RequestStatistics" }, - "modelVersion" : { - "type" : "string", - "description" : "This field indicates which model is used for scoring." + "modelVersion": { + "type": "string", + "description": "This field indicates which model is used for scoring." } } }, - "DocumentSentiment" : { - "type" : "object", - "required" : [ + "DocumentSentiment": { + "type": "object", + "required": [ "id", "sentiment", "documentScores", "sentences" - ], - "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" ] - }, - "statistics" : { - "$ref" : "#/definitions/DocumentStatistics" - }, - "documentScores" : { - "description" : "Document level sentiment confidence scores between 0 and 1 for each sentiment class." - }, - "sentences" : { - "type" : "array", - "description" : "Sentence level sentiment analysis.", - "items" : { - "$ref" : "#/definitions/SentenceSentiment" + ], + "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" + ] + }, + "statistics": { + "$ref": "#/definitions/DocumentStatistics" + }, + "documentScores": { + "description": "Document level sentiment confidence scores between 0 and 1 for each sentiment class." + }, + "sentences": { + "type": "array", + "description": "Sentence level sentiment analysis.", + "items": { + "$ref": "#/definitions/SentenceSentiment" } } } }, - "RequestStatistics" : { - "type" : "object", - "required" : [ + "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." + "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." + "description": "if showStats=true was specified in the request this field will contain information about the request payload." }, - "DocumentStatistics" : { - "type" : "object", - "required" : [ + "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." + "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." + "description": "if showStats=true was specified in the request this field will contain information about the document payload." }, - "SentimentConfidenceScorePerLabel" : { - "type" : "object", - "required" : [ + "SentimentConfidenceScorePerLabel": { + "type": "object", + "required": [ "positive", "neutral", "negative" - ], - "properties" : { - "positive" : { - "type" : "number", - "format" : "double" - }, - "neutral" : { - "type" : "number", - "format" : "double" - }, - "negative" : { - "type" : "number", - "format" : "double" + ], + "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." + "description": "Represents the confidence scores between 0 and 1 across all sentiment classes: positive, neutral, negative." }, - "SentenceSentiment" : { - "type" : "object", - "required" : [ + "SentenceSentiment": { + "type": "object", + "required": [ "sentiment", "sentenceScores", "offset", "length" - ], - "properties" : { - "sentiment" : { - "type" : "string", - "description" : "The predicted Sentiment for the sentence.", - "enum" : [ "positive", "neutral", "negative" ] - }, - "sentenceScores" : { - "description" : "The sentiment confidence score between 0 and 1 for the sentence for all classes." - }, - "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 by Unicode standard." - }, - "warnings" : { - "type" : "array", - "description" : "The warnings generated for the sentence.", - "items" : { - "type" : "string" + ], + "properties": { + "sentiment": { + "type": "string", + "description": "The predicted Sentiment for the sentence.", + "enum": [ + "positive", + "neutral", + "negative" + ] + }, + "sentenceScores": { + "description": "The sentiment confidence score between 0 and 1 for the sentence for all classes." + }, + "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 by Unicode standard." + }, + "warnings": { + "type": "array", + "description": "The warnings generated for the sentence.", + "items": { + "type": "string" } } } }, - "EntitiesResult" : { - "type" : "object", - "required" : [ + "EntitiesResult": { + "type": "object", + "required": [ "documents", "errors", "modelVersion" - ], - "properties" : { - "documents" : { - "type" : "array", - "description" : "Response by document", - "items" : { - "$ref" : "#/definitions/DocumentEntities" + ], + "properties": { + "documents": { + "type": "array", + "description": "Response by document", + "items": { + "$ref": "#/definitions/DocumentEntities" } }, - "errors" : { - "type" : "array", - "description" : "Errors by document id.", - "items" : { - "$ref" : "#/definitions/DocumentError" + "errors": { + "type": "array", + "description": "Errors by document id.", + "items": { + "$ref": "#/definitions/DocumentError" } }, - "statistics" : { - "$ref" : "#/definitions/RequestStatistics" + "statistics": { + "$ref": "#/definitions/RequestStatistics" }, - "modelVersion" : { - "type" : "string", - "description" : "This field indicates which model is used for scoring." + "modelVersion": { + "type": "string", + "description": "This field indicates which model is used for scoring." } } }, - "DocumentEntities" : { - "type" : "object", - "required" : [ + "DocumentEntities": { + "type": "object", + "required": [ "id", "entities" ], - "properties" : { - "id" : { - "type" : "string", - "description" : "Unique, non-empty document identifier." - }, - "entities" : { - "type" : "array", - "description" : "Recognized entities in the document.", - "items" : { - "$ref" : "#/definitions/Entity" + "properties": { + "id": { + "type": "string", + "description": "Unique, non-empty document identifier." + }, + "entities": { + "type": "array", + "description": "Recognized entities in the document.", + "items": { + "$ref": "#/definitions/Entity" } }, - "statistics" : { - "description" : "if showStats=true was specified in the request this field will contain information about the document payload.", - "$ref" : "#/definitions/DocumentStatistics" + "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" : [ + "Entity": { + "type": "object", + "required": [ "text", "type", "offset", "length", "score" ], - "properties" : { - "text" : { - "type" : "string", - "description" : "Entity text as appears in the request." - }, - "type" : { - "type" : "string", - "description" : "Entity type, such as Person/Location/Org/SSN etc" - }, - "subtype" : { - "type" : "string", - "description" : "Entity sub type, such as Age/Year/TimeRange etc" - }, - "offset" : { - "type" : "integer", - "format" : "int32", - "description" : "Start position (in Unicode characters) for the entity text." - }, - "length" : { - "type" : "integer", - "format" : "int32", - "description" : "Length (in Unicode characters) for the entity text." - }, - "score" : { - "type" : "number", - "format" : "double", - "description" : "Confidence score between 0 and 1 of the extracted entity." + "properties": { + "text": { + "type": "string", + "description": "Entity text as appears in the request." + }, + "type": { + "type": "string", + "description": "Entity type, such as Person/Location/Org/SSN etc" + }, + "subtype": { + "type": "string", + "description": "Entity sub type, such as Age/Year/TimeRange etc" + }, + "offset": { + "type": "integer", + "format": "int32", + "description": "Start position (in Unicode characters) for the entity text." + }, + "length": { + "type": "integer", + "format": "int32", + "description": "Length (in Unicode characters) for the entity text." + }, + "score": { + "type": "number", + "format": "double", + "description": "Confidence score between 0 and 1 of the extracted entity." } } }, - "EntityLinkingResult" : { - "type" : "object", - "required" : [ + "EntityLinkingResult": { + "type": "object", + "required": [ "documents", "errors", "modelVersion" ], - "properties" : { - "documents" : { - "type" : "array", - "description" : "Response by document", - "items" : { - "$ref" : "#/definitions/DocumentLinkedEntities" + "properties": { + "documents": { + "type": "array", + "description": "Response by document", + "items": { + "$ref": "#/definitions/DocumentLinkedEntities" } }, - "errors" : { - "type" : "array", - "description" : "Errors by document id.", - "items" : { - "$ref" : "#/definitions/DocumentError" + "errors": { + "type": "array", + "description": "Errors by document id.", + "items": { + "$ref": "#/definitions/DocumentError" } }, - "statistics" : { - "$ref" : "#/definitions/RequestStatistics" + "statistics": { + "$ref": "#/definitions/RequestStatistics" }, - "modelVersion" : { - "type" : "string", - "description" : "This field indicates which model is used for scoring." + "modelVersion": { + "type": "string", + "description": "This field indicates which model is used for scoring." } } }, - "DocumentLinkedEntities" : { - "type" : "object", - "required" : [ + "DocumentLinkedEntities": { + "type": "object", + "required": [ "id", "entities" ], - "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" + "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" } }, - "statistics" : { - "description" : "if showStats=true was specified in the request this field will contain information about the document payload.", - "$ref" : "#/definitions/DocumentStatistics" + "statistics": { + "description": "if showStats=true was specified in the request this field will contain information about the document payload.", + "$ref": "#/definitions/DocumentStatistics" } } }, - "LinkedEntity" : { - "type" : "object", - "required" : [ + "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" + "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." + "language": { + "type": "string", + "description": "Language used in the data source." }, - "id" : { - "type" : "string", - "description" : "Unique identifier of the recognized entity from 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." + "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." + "dataSource": { + "type": "string", + "description": "Data source used to extract entity linking, such as Wiki/Bing etc." } } }, - "Match" : { - "type" : "object", - "required" : [ + "Match": { + "type": "object", + "required": [ "score", "text", "offset", "length" ], - "properties" : { - "score" : { - "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 (in Unicode characters) for the entity match text." - }, - "length" : { - "type" : "integer", - "format" : "int32", - "description" : "Length (in Unicode characters) for the entity match text." + "properties": { + "score": { + "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 (in Unicode characters) for the entity match text." + }, + "length": { + "type": "integer", + "format": "int32", + "description": "Length (in Unicode characters) for the entity match text." } } }, - "KeyPhraseResult" : { - "type" : "object", - "required" : [ + "KeyPhraseResult": { + "type": "object", + "required": [ "documents", "errors", "modelVersion" ], - "properties" : { - "documents" : { - "type" : "array", - "description" : "Response by document", - "items" : { - "$ref" : "#/definitions/DocumentKeyPhrases" + "properties": { + "documents": { + "type": "array", + "description": "Response by document", + "items": { + "$ref": "#/definitions/DocumentKeyPhrases" } }, - "errors" : { - "type" : "array", - "description" : "Errors by document id.", - "items" : { - "$ref" : "#/definitions/DocumentError" + "errors": { + "type": "array", + "description": "Errors by document id.", + "items": { + "$ref": "#/definitions/DocumentError" } }, - "statistics" : { - "$ref" : "#/definitions/RequestStatistics" + "statistics": { + "$ref": "#/definitions/RequestStatistics" }, - "modelVersion" : { - "type" : "string", - "description" : "This field indicates which model is used for scoring." + "modelVersion": { + "type": "string", + "description": "This field indicates which model is used for scoring." } } }, - "DocumentKeyPhrases" : { - "type" : "object", - "required" : [ + "DocumentKeyPhrases": { + "type": "object", + "required": [ "id", "keyPhrases" ], - "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" + "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" } }, - "statistics" : { - "description" : "if showStats=true was specified in the request this field will contain information about the document payload.", - "$ref" : "#/definitions/DocumentStatistics" + "statistics": { + "description": "if showStats=true was specified in the request this field will contain information about the document payload.", + "$ref": "#/definitions/DocumentStatistics" } } }, - "LanguageBatchInput" : { - "type" : "object", - "required" : [ + "LanguageBatchInput": { + "type": "object", + "required": [ "documents" ], - "properties" : { - "documents" : { - "type" : "array", - "items" : { - "$ref" : "#/definitions/LanguageInput" + "properties": { + "documents": { + "type": "array", + "items": { + "$ref": "#/definitions/LanguageInput" } } }, - "example" : { + "example": { "documents": [ { "id": "1", "text": "Hello world", "countryHint": "US" - }, + }, { "id": "2", "text": "Bonjour tout le monde" @@ -959,104 +1023,104 @@ ] } }, - "LanguageInput" : { - "type" : "object", - "required" : [ + "LanguageInput": { + "type": "object", + "required": [ "id", "text" ], - "properties" : { - "id" : { - "type" : "string", - "description" : "Unique, non-empty document identifier." + "properties": { + "id": { + "type": "string", + "description": "Unique, non-empty document identifier." }, - "text" : { - "type" : "string" + "text": { + "type": "string" }, - "countryHint" : { - "type" : "string" + "countryHint": { + "type": "string" } } }, - "LanguageResult" : { - "type" : "object", - "required" : [ + "LanguageResult": { + "type": "object", + "required": [ "documents", "errors", "modelVersion" ], - "properties" : { - "documents" : { - "type" : "array", - "description" : "Response by document", - "items" : { - "$ref" : "#/definitions/DocumentLanguage" + "properties": { + "documents": { + "type": "array", + "description": "Response by document", + "items": { + "$ref": "#/definitions/DocumentLanguage" } }, - "errors" : { - "type" : "array", - "description" : "Errors by document id.", - "items" : { - "$ref" : "#/definitions/DocumentError" + "errors": { + "type": "array", + "description": "Errors by document id.", + "items": { + "$ref": "#/definitions/DocumentError" } }, - "statistics" : { - "$ref" : "#/definitions/RequestStatistics" + "statistics": { + "$ref": "#/definitions/RequestStatistics" }, - "modelVersion" : { - "type" : "string", - "description" : "This field indicates which model is used for scoring." + "modelVersion": { + "type": "string", + "description": "This field indicates which model is used for scoring." } } }, - "DocumentLanguage" : { - "type" : "object", - "required" : [ + "DocumentLanguage": { + "type": "object", + "required": [ "id", "detectedLanguages" ], - "properties" : { - "id" : { - "type" : "string", - "description" : "Unique, non-empty document identifier." - }, - "detectedLanguages" : { - "type" : "array", - "description" : "A list of extracted languages.", - "items" : { - "$ref" : "#/definitions/DetectedLanguage" + "properties": { + "id": { + "type": "string", + "description": "Unique, non-empty document identifier." + }, + "detectedLanguages": { + "type": "array", + "description": "A list of extracted languages.", + "items": { + "$ref": "#/definitions/DetectedLanguage" } }, - "statistics" : { - "description" : "if showStats=true was specified in the request this field will contain information about the document payload.", - "$ref" : "#/definitions/DocumentStatistics" + "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" : [ + "DetectedLanguage": { + "type": "object", + "required": [ "name", "iso6391Name", "score" ], - "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)." - }, - "score" : { - "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." + "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)." + }, + "score": { + "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." } } } - }, + }, "parameters": { "Endpoint": { "name": "Endpoint", @@ -1068,5 +1132,4 @@ "x-ms-skip-url-encoding": true } } -} - +} \ No newline at end of file From 72da4c50cc6db71962d887e4dd6963a3d4106dfa Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 15 Nov 2019 08:51:15 +0000 Subject: [PATCH 53/62] testing --- .../preview/v3.0-preview.1/TextAnalytics.json | 14 -------------- .../examples/SuccessfulEntitiesRequest.json | 1 - 2 files changed, 15 deletions(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/TextAnalytics.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/TextAnalytics.json index c6846bd937e1..7909abb21729 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/TextAnalytics.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/TextAnalytics.json @@ -46,20 +46,6 @@ "text/json" ], "parameters": [ - { - "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 - }, - { - "name": "showStats", - "in": "query", - "description": "(Optional) if set to true, response will contain input and document level statistics.", - "type": "boolean", - "required": false - }, { "in": "body", "name": "input", diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulEntitiesRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulEntitiesRequest.json index 99de747f3c96..babd6e22d296 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulEntitiesRequest.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulEntitiesRequest.json @@ -2,7 +2,6 @@ "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", "Endpoint": "{Endpoint}", - "model-version": "2019-10-01", "input": { "documents": [ { From ae4d35ec8d319a7f32082c18f2711264483e8ff5 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 15 Nov 2019 08:58:28 +0000 Subject: [PATCH 54/62] update model-vesrion --- .../preview/v3.0-preview.1/TextAnalytics.json | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/TextAnalytics.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/TextAnalytics.json index 7909abb21729..7f864b67c08d 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/TextAnalytics.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/TextAnalytics.json @@ -46,6 +46,22 @@ "text/json" ], "parameters": [ + { + "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. ", + "required": false, + "type": "string", + "default": "latest", + "x-nullable": true + }, + { + "name": "showStats", + "in": "query", + "description": "(Optional) if set to true, response will contain input and document level statistics.", + "type": "boolean", + "required": false + }, { "in": "body", "name": "input", From 8e52416901bd8cfcc6440fcef699728c9c5d3b39 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 15 Nov 2019 22:10:22 +0000 Subject: [PATCH 55/62] detele required false --- .../TextAnalytics/preview/v3.0-preview.1/TextAnalytics.json | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/TextAnalytics.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/TextAnalytics.json index 7f864b67c08d..3989992bc884 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/TextAnalytics.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/TextAnalytics.json @@ -51,9 +51,7 @@ "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. ", "required": false, - "type": "string", - "default": "latest", - "x-nullable": true + "type": "string" }, { "name": "showStats", From 004df50ae9842734512f57d6a7c6a42fd49e607b Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Sat, 16 Nov 2019 00:45:23 +0000 Subject: [PATCH 56/62] prettier --write --- .../preview/v3.0-preview.1/TextAnalytics.json | 212 ++++-------------- .../examples/SuccessfulKeyPhrasesRequest.json | 17 +- .../examples/SuccessfulSentimentRequest.json | 2 +- 3 files changed, 44 insertions(+), 187 deletions(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/TextAnalytics.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/TextAnalytics.json index 3989992bc884..1fde3889db07 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/TextAnalytics.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/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", @@ -421,10 +383,7 @@ }, "MultiLanguageInput": { "type": "object", - "required": [ - "id", - "text" - ], + "required": ["id", "text"], "properties": { "id": { "type": "string", @@ -443,10 +402,7 @@ }, "DocumentError": { "type": "object", - "required": [ - "id", - "error" - ], + "required": ["id", "error"], "properties": { "id": { "type": "string", @@ -463,10 +419,7 @@ }, "Error": { "type": "object", - "required": [ - "code", - "message" - ], + "required": ["code", "message"], "properties": { "code": { "type": "string", @@ -501,10 +454,7 @@ }, "InnerError": { "type": "object", - "required": [ - "code", - "message" - ], + "required": ["code", "message"], "properties": { "code": { "type": "string", @@ -537,11 +487,7 @@ }, "SentimentResponse": { "type": "object", - "required": [ - "documents", - "errors", - "modelVersion" - ], + "required": ["documents", "errors", "modelVersion"], "properties": { "documents": { "type": "array", @@ -568,12 +514,7 @@ }, "DocumentSentiment": { "type": "object", - "required": [ - "id", - "sentiment", - "documentScores", - "sentences" - ], + "required": ["id", "sentiment", "documentScores", "sentences"], "properties": { "id": { "type": "string", @@ -582,12 +523,7 @@ "sentiment": { "type": "string", "description": "Predicted sentiment for document (Negative, Neutral, Positive, or Mixed).", - "enum": [ - "positive", - "neutral", - "negative", - "mixed" - ] + "enum": ["positive", "neutral", "negative", "mixed"] }, "statistics": { "$ref": "#/definitions/DocumentStatistics" @@ -638,10 +574,7 @@ }, "DocumentStatistics": { "type": "object", - "required": [ - "charactersCount", - "transactionsCount" - ], + "required": ["charactersCount", "transactionsCount"], "properties": { "charactersCount": { "type": "integer", @@ -658,11 +591,7 @@ }, "SentimentConfidenceScorePerLabel": { "type": "object", - "required": [ - "positive", - "neutral", - "negative" - ], + "required": ["positive", "neutral", "negative"], "properties": { "positive": { "type": "number", @@ -681,21 +610,12 @@ }, "SentenceSentiment": { "type": "object", - "required": [ - "sentiment", - "sentenceScores", - "offset", - "length" - ], + "required": ["sentiment", "sentenceScores", "offset", "length"], "properties": { "sentiment": { "type": "string", "description": "The predicted Sentiment for the sentence.", - "enum": [ - "positive", - "neutral", - "negative" - ] + "enum": ["positive", "neutral", "negative"] }, "sentenceScores": { "description": "The sentiment confidence score between 0 and 1 for the sentence for all classes." @@ -721,11 +641,7 @@ }, "EntitiesResult": { "type": "object", - "required": [ - "documents", - "errors", - "modelVersion" - ], + "required": ["documents", "errors", "modelVersion"], "properties": { "documents": { "type": "array", @@ -752,10 +668,7 @@ }, "DocumentEntities": { "type": "object", - "required": [ - "id", - "entities" - ], + "required": ["id", "entities"], "properties": { "id": { "type": "string", @@ -776,13 +689,7 @@ }, "Entity": { "type": "object", - "required": [ - "text", - "type", - "offset", - "length", - "score" - ], + "required": ["text", "type", "offset", "length", "score"], "properties": { "text": { "type": "string", @@ -815,11 +722,7 @@ }, "EntityLinkingResult": { "type": "object", - "required": [ - "documents", - "errors", - "modelVersion" - ], + "required": ["documents", "errors", "modelVersion"], "properties": { "documents": { "type": "array", @@ -846,10 +749,7 @@ }, "DocumentLinkedEntities": { "type": "object", - "required": [ - "id", - "entities" - ], + "required": ["id", "entities"], "properties": { "id": { "type": "string", @@ -870,13 +770,7 @@ }, "LinkedEntity": { "type": "object", - "required": [ - "name", - "matches", - "language", - "url", - "dataSource" - ], + "required": ["name", "matches", "language", "url", "dataSource"], "properties": { "name": { "type": "string", @@ -909,12 +803,7 @@ }, "Match": { "type": "object", - "required": [ - "score", - "text", - "offset", - "length" - ], + "required": ["score", "text", "offset", "length"], "properties": { "score": { "type": "number", @@ -939,11 +828,7 @@ }, "KeyPhraseResult": { "type": "object", - "required": [ - "documents", - "errors", - "modelVersion" - ], + "required": ["documents", "errors", "modelVersion"], "properties": { "documents": { "type": "array", @@ -970,10 +855,7 @@ }, "DocumentKeyPhrases": { "type": "object", - "required": [ - "id", - "keyPhrases" - ], + "required": ["id", "keyPhrases"], "properties": { "id": { "type": "string", @@ -994,9 +876,7 @@ }, "LanguageBatchInput": { "type": "object", - "required": [ - "documents" - ], + "required": ["documents"], "properties": { "documents": { "type": "array", @@ -1025,10 +905,7 @@ }, "LanguageInput": { "type": "object", - "required": [ - "id", - "text" - ], + "required": ["id", "text"], "properties": { "id": { "type": "string", @@ -1044,11 +921,7 @@ }, "LanguageResult": { "type": "object", - "required": [ - "documents", - "errors", - "modelVersion" - ], + "required": ["documents", "errors", "modelVersion"], "properties": { "documents": { "type": "array", @@ -1075,10 +948,7 @@ }, "DocumentLanguage": { "type": "object", - "required": [ - "id", - "detectedLanguages" - ], + "required": ["id", "detectedLanguages"], "properties": { "id": { "type": "string", @@ -1099,11 +969,7 @@ }, "DetectedLanguage": { "type": "object", - "required": [ - "name", - "iso6391Name", - "score" - ], + "required": ["name", "iso6391Name", "score"], "properties": { "name": { "type": "string", @@ -1132,4 +998,4 @@ "x-ms-skip-url-encoding": true } } -} \ No newline at end of file +} diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulKeyPhrasesRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulKeyPhrasesRequest.json index 96481869f6b5..8546e2aff461 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulKeyPhrasesRequest.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulKeyPhrasesRequest.json @@ -29,24 +29,15 @@ "documents": [ { "id": "1", - "keyPhrases": [ - "world", - "input text" - ] + "keyPhrases": ["world", "input text"] }, { "id": "2", - "keyPhrases": [ - "monde" - ] + "keyPhrases": ["monde"] }, { "id": "3", - "keyPhrases": [ - "carretera", - "tráfico", - "día" - ] + "keyPhrases": ["carretera", "tráfico", "día"] } ], "errors": [], @@ -54,4 +45,4 @@ } } } -} \ No newline at end of file +} diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulSentimentRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulSentimentRequest.json index 381bac2dab12..a61d236644d0 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulSentimentRequest.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulSentimentRequest.json @@ -116,4 +116,4 @@ } } } -} \ No newline at end of file +} From b5dda8860a86b7e48743096dc13b5d4b7d0fb784 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 18 Nov 2019 06:51:30 +0000 Subject: [PATCH 57/62] remove exmpales from TextAnalytics.json --- .../preview/v3.0-preview.1/TextAnalytics.json | 38 +------------------ 1 file changed, 1 insertion(+), 37 deletions(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/TextAnalytics.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/TextAnalytics.json index 1fde3889db07..2b082f17a141 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/TextAnalytics.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/TextAnalytics.json @@ -360,26 +360,7 @@ } } }, - "description": "Contains a set of input documents to be analyzed by the service.", - "example": { - "documents": [ - { - "language": "en", - "id": "1", - "text": "Hello world. This is some input text that I love." - }, - { - "language": "en", - "id": "2", - "text": "It's sunny outside! I'm so happy." - }, - { - "language": "en", - "id": "3", - "text": "Pike place market is my favorite Seattle attraction." - } - ] - } + "description": "Contains a set of input documents to be analyzed by the service." }, "MultiLanguageInput": { "type": "object", @@ -884,23 +865,6 @@ "$ref": "#/definitions/LanguageInput" } } - }, - "example": { - "documents": [ - { - "id": "1", - "text": "Hello world", - "countryHint": "US" - }, - { - "id": "2", - "text": "Bonjour tout le monde" - }, - { - "id": "3", - "text": "La carretera estaba atascada. Había mucho tráfico el día de ayer." - } - ] } }, "LanguageInput": { From c4f1b9d160f054fb792d2cfc471bc81a7f3b3d00 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 18 Nov 2019 07:18:55 +0000 Subject: [PATCH 58/62] test keyphrase --- .../v3.0-preview.1/examples/SuccessfulKeyPhrasesRequest.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulKeyPhrasesRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulKeyPhrasesRequest.json index 8546e2aff461..c70af6b04706 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulKeyPhrasesRequest.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulKeyPhrasesRequest.json @@ -17,7 +17,7 @@ { "language": "es", "id": "3", - "text": "La carretera estaba atascada. Había mucho tráfico el día de ayer." + "text": "I work at Microsoft." } ] } @@ -37,7 +37,7 @@ }, { "id": "3", - "keyPhrases": ["carretera", "tráfico", "día"] + "keyPhrases": ["Microsoft"] } ], "errors": [], From e56995f1aefa45d2a13dcc642c78cad18b6578f9 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 18 Nov 2019 07:22:36 +0000 Subject: [PATCH 59/62] keyphrase --- .../examples/SuccessfulKeyPhrasesRequest.json | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulKeyPhrasesRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulKeyPhrasesRequest.json index c70af6b04706..68867f917754 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulKeyPhrasesRequest.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulKeyPhrasesRequest.json @@ -29,15 +29,22 @@ "documents": [ { "id": "1", - "keyPhrases": ["world", "input text"] + "keyPhrases": [ + "world", + "input text" + ] }, { "id": "2", - "keyPhrases": ["monde"] + "keyPhrases": [ + "monde" + ] }, { "id": "3", - "keyPhrases": ["Microsoft"] + "keyPhrases": [ + "Microsoft" + ] } ], "errors": [], From f644fec4a33f238b5ec279bc114f0cf173c40cec Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 18 Nov 2019 07:26:02 +0000 Subject: [PATCH 60/62] keyphrase retry --- .../v3.0-preview.1/examples/SuccessfulKeyPhrasesRequest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulKeyPhrasesRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulKeyPhrasesRequest.json index 68867f917754..9676ee925e38 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulKeyPhrasesRequest.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulKeyPhrasesRequest.json @@ -31,7 +31,7 @@ "id": "1", "keyPhrases": [ "world", - "input text" + "input text" ] }, { From 6716f1b795e60e2b09cf7b23c65bd248743e98e8 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 18 Nov 2019 07:33:53 +0000 Subject: [PATCH 61/62] update keyphrase back --- .../examples/SuccessfulKeyPhrasesRequest.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulKeyPhrasesRequest.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulKeyPhrasesRequest.json index 9676ee925e38..4a61dd56c123 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulKeyPhrasesRequest.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/examples/SuccessfulKeyPhrasesRequest.json @@ -17,7 +17,7 @@ { "language": "es", "id": "3", - "text": "I work at Microsoft." + "text": "La carretera estaba atascada. Había mucho tráfico el día de ayer." } ] } @@ -43,7 +43,9 @@ { "id": "3", "keyPhrases": [ - "Microsoft" + "carretera", + "tráfico", + "día" ] } ], From 013ee158be2fc6476cbe9d4193f1e111ce6be470 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 18 Nov 2019 07:39:21 +0000 Subject: [PATCH 62/62] update ta.json split [] --- .../preview/v3.0-preview.1/TextAnalytics.json | 210 ++++++++++++++---- 1 file changed, 172 insertions(+), 38 deletions(-) diff --git a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/TextAnalytics.json b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/TextAnalytics.json index 2b082f17a141..91bdbfa05aca 100644 --- a/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/TextAnalytics.json +++ b/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/TextAnalytics.json @@ -37,8 +37,14 @@ "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", @@ -91,8 +97,14 @@ "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", @@ -143,8 +155,14 @@ "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", @@ -195,8 +213,14 @@ "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", @@ -247,8 +271,14 @@ "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", @@ -299,8 +329,14 @@ "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", @@ -350,7 +386,9 @@ "definitions": { "MultiLanguageBatchInput": { "type": "object", - "required": ["documents"], + "required": [ + "documents" + ], "properties": { "documents": { "type": "array", @@ -364,7 +402,10 @@ }, "MultiLanguageInput": { "type": "object", - "required": ["id", "text"], + "required": [ + "id", + "text" + ], "properties": { "id": { "type": "string", @@ -383,7 +424,10 @@ }, "DocumentError": { "type": "object", - "required": ["id", "error"], + "required": [ + "id", + "error" + ], "properties": { "id": { "type": "string", @@ -400,7 +444,10 @@ }, "Error": { "type": "object", - "required": ["code", "message"], + "required": [ + "code", + "message" + ], "properties": { "code": { "type": "string", @@ -435,7 +482,10 @@ }, "InnerError": { "type": "object", - "required": ["code", "message"], + "required": [ + "code", + "message" + ], "properties": { "code": { "type": "string", @@ -468,7 +518,11 @@ }, "SentimentResponse": { "type": "object", - "required": ["documents", "errors", "modelVersion"], + "required": [ + "documents", + "errors", + "modelVersion" + ], "properties": { "documents": { "type": "array", @@ -495,7 +549,12 @@ }, "DocumentSentiment": { "type": "object", - "required": ["id", "sentiment", "documentScores", "sentences"], + "required": [ + "id", + "sentiment", + "documentScores", + "sentences" + ], "properties": { "id": { "type": "string", @@ -504,7 +563,12 @@ "sentiment": { "type": "string", "description": "Predicted sentiment for document (Negative, Neutral, Positive, or Mixed).", - "enum": ["positive", "neutral", "negative", "mixed"] + "enum": [ + "positive", + "neutral", + "negative", + "mixed" + ] }, "statistics": { "$ref": "#/definitions/DocumentStatistics" @@ -555,7 +619,10 @@ }, "DocumentStatistics": { "type": "object", - "required": ["charactersCount", "transactionsCount"], + "required": [ + "charactersCount", + "transactionsCount" + ], "properties": { "charactersCount": { "type": "integer", @@ -572,7 +639,11 @@ }, "SentimentConfidenceScorePerLabel": { "type": "object", - "required": ["positive", "neutral", "negative"], + "required": [ + "positive", + "neutral", + "negative" + ], "properties": { "positive": { "type": "number", @@ -591,12 +662,21 @@ }, "SentenceSentiment": { "type": "object", - "required": ["sentiment", "sentenceScores", "offset", "length"], + "required": [ + "sentiment", + "sentenceScores", + "offset", + "length" + ], "properties": { "sentiment": { "type": "string", "description": "The predicted Sentiment for the sentence.", - "enum": ["positive", "neutral", "negative"] + "enum": [ + "positive", + "neutral", + "negative" + ] }, "sentenceScores": { "description": "The sentiment confidence score between 0 and 1 for the sentence for all classes." @@ -622,7 +702,11 @@ }, "EntitiesResult": { "type": "object", - "required": ["documents", "errors", "modelVersion"], + "required": [ + "documents", + "errors", + "modelVersion" + ], "properties": { "documents": { "type": "array", @@ -649,7 +733,10 @@ }, "DocumentEntities": { "type": "object", - "required": ["id", "entities"], + "required": [ + "id", + "entities" + ], "properties": { "id": { "type": "string", @@ -670,7 +757,13 @@ }, "Entity": { "type": "object", - "required": ["text", "type", "offset", "length", "score"], + "required": [ + "text", + "type", + "offset", + "length", + "score" + ], "properties": { "text": { "type": "string", @@ -703,7 +796,11 @@ }, "EntityLinkingResult": { "type": "object", - "required": ["documents", "errors", "modelVersion"], + "required": [ + "documents", + "errors", + "modelVersion" + ], "properties": { "documents": { "type": "array", @@ -730,7 +827,10 @@ }, "DocumentLinkedEntities": { "type": "object", - "required": ["id", "entities"], + "required": [ + "id", + "entities" + ], "properties": { "id": { "type": "string", @@ -751,7 +851,13 @@ }, "LinkedEntity": { "type": "object", - "required": ["name", "matches", "language", "url", "dataSource"], + "required": [ + "name", + "matches", + "language", + "url", + "dataSource" + ], "properties": { "name": { "type": "string", @@ -784,7 +890,12 @@ }, "Match": { "type": "object", - "required": ["score", "text", "offset", "length"], + "required": [ + "score", + "text", + "offset", + "length" + ], "properties": { "score": { "type": "number", @@ -809,7 +920,11 @@ }, "KeyPhraseResult": { "type": "object", - "required": ["documents", "errors", "modelVersion"], + "required": [ + "documents", + "errors", + "modelVersion" + ], "properties": { "documents": { "type": "array", @@ -836,7 +951,10 @@ }, "DocumentKeyPhrases": { "type": "object", - "required": ["id", "keyPhrases"], + "required": [ + "id", + "keyPhrases" + ], "properties": { "id": { "type": "string", @@ -857,7 +975,9 @@ }, "LanguageBatchInput": { "type": "object", - "required": ["documents"], + "required": [ + "documents" + ], "properties": { "documents": { "type": "array", @@ -869,7 +989,10 @@ }, "LanguageInput": { "type": "object", - "required": ["id", "text"], + "required": [ + "id", + "text" + ], "properties": { "id": { "type": "string", @@ -885,7 +1008,11 @@ }, "LanguageResult": { "type": "object", - "required": ["documents", "errors", "modelVersion"], + "required": [ + "documents", + "errors", + "modelVersion" + ], "properties": { "documents": { "type": "array", @@ -912,7 +1039,10 @@ }, "DocumentLanguage": { "type": "object", - "required": ["id", "detectedLanguages"], + "required": [ + "id", + "detectedLanguages" + ], "properties": { "id": { "type": "string", @@ -933,7 +1063,11 @@ }, "DetectedLanguage": { "type": "object", - "required": ["name", "iso6391Name", "score"], + "required": [ + "name", + "iso6391Name", + "score" + ], "properties": { "name": { "type": "string",