diff --git a/custom-words.txt b/custom-words.txt index 518ff5d26525..434b7e40aba6 100644 --- a/custom-words.txt +++ b/custom-words.txt @@ -2148,7 +2148,9 @@ phraselists picocolors picomatch picometer +picometers pids +piilro pipelineruns piqd pitr @@ -2355,6 +2357,7 @@ regionalized regionproposals registeredidentities registryname +REGON rehydrated reimage reimageall @@ -3390,6 +3393,7 @@ yvalue IAASVM Picometer Petabit +petabits questionanswering napt Napt @@ -4012,4 +4016,4 @@ opex decomission Decommisioned Decommision -Serp \ No newline at end of file +Serp diff --git a/specification/cognitiveservices/Language.AnalyzeText/client.tsp b/specification/cognitiveservices/Language.AnalyzeText/client.tsp new file mode 100644 index 000000000000..948d4479ba3d --- /dev/null +++ b/specification/cognitiveservices/Language.AnalyzeText/client.tsp @@ -0,0 +1,71 @@ +import "./main.tsp"; +import "@azure-tools/typespec-client-generator-core"; + +using Language.AnalyzeText; +using Azure.ClientGenerator.Core; + +namespace Language.AnalyzeTextClientCustomizations; + +@@clientName(Tasks, "TasksStatus", "csharp"); +@@clientName(State, "CurrentState", "csharp"); +@@clientName(Error, "AnalyzeTextError", "csharp"); +@@clientName(TaskParameters, "TaskContent", "csharp"); +@@clientName(PreBuiltTaskParameters, "PreBuiltTaskContent", "csharp"); +@@clientName(AbstractiveSummarizationTaskParametersBase, + "AbstractiveSummarizationTaskContentBase", + "csharp" +); +@@clientName(CustomTaskParameters, "CustomTaskContent", "csharp"); +@@clientName(CustomEntitiesTaskParameters, + "CustomEntitiesTaskContent", + "csharp" +); +@@clientName(CustomSingleLabelClassificationTaskParameters, + "CustomSingleLabelClassificationTaskContent", + "csharp" +); +@@clientName(CustomMultiLabelClassificationTaskParameters, + "CustomMultiLabelClassificationTaskContent", + "csharp" +); +@@clientName(DynamicClassificationTaskParameters, + "DynamicClassificationTaskContent", + "csharp" +); +@@clientName(EntityLinkingTaskParameters, "EntityLinkingTaskContent", "csharp"); +@@clientName(Match, "EntityLinkingMatch", "csharp"); +@@clientName(EntitiesTaskParameters, "EntitiesTaskContent", "csharp"); +@@clientName(Entity, "NamedEntity", "csharp"); +@@clientName(EntityInferenceOptions, "EntityInferenceConfig", "csharp"); +@@clientName(HealthcareTaskParameters, "HealthcareTaskContent", "csharp"); +@@clientName(Temporality, "HealthcareAssertionTemporality", "csharp"); +@@clientName(Conditionality, "HealthcareAssertionConditionality", "csharp"); +@@clientName(Certainty, "HealthcareAssertionCertainty", "csharp"); +@@clientName(Association, "HealthcareAssertionAssociation", "csharp"); +@@clientName(KeyPhraseTaskParameters, "KeyPhraseTaskContent", "csharp"); +@@clientName(LanguageDetectionTaskParameters, + "LanguageDetectionTaskContent", + "csharp" +); +@@clientName(PiiTaskParameters, "PiiTaskContent", "csharp"); +@@clientName(SentimentAnalysisTaskParameters, + "SentimentAnalysisTaskContent", + "csharp" +); +@@clientName(SentimentResponse, "SentimentResult", "csharp"); +@@clientName(CustomSentimentAnalysisTaskParameters, + "CustomSentimentAnalysisTaskContent", + "csharp" +); +@@clientName(ExtractiveSummarizationTaskParameters, + "ExtractiveSummarizationTaskContent", + "csharp" +); +@@clientName(AbstractiveSummarizationTaskParameters, + "AbstractiveSummarizationTaskContent", + "csharp" +); +@@clientName(CustomAbstractiveSummarizationTaskParameters, + "CustomAbstractiveSummarizationTaskContent", + "csharp" +); diff --git a/specification/cognitiveservices/Language.AnalyzeText/examples/2022-05-01/SuccessfulAnalyzeTextJobsCancelRequest.json b/specification/cognitiveservices/Language.AnalyzeText/examples/2022-05-01/SuccessfulAnalyzeTextJobsCancelRequest.json new file mode 100644 index 000000000000..69adf9388b3a --- /dev/null +++ b/specification/cognitiveservices/Language.AnalyzeText/examples/2022-05-01/SuccessfulAnalyzeTextJobsCancelRequest.json @@ -0,0 +1,17 @@ +{ + "operationId": "AnalyzeTextCancelJob", + "title": "SuccessfulAnalyzeTextJobsCancelRequest", + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "api-version": "2022-05-01", + "Endpoint": "{Endpoint}", + "jobId": "c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18" + }, + "responses": { + "202": { + "headers": { + "Operation-Location": "{Endpoint}/language/analyze-text/jobs/{jobId}?api-version=2022-05-01" + } + } + } +} diff --git a/specification/cognitiveservices/Language.AnalyzeText/examples/2022-05-01/SuccessfulAnalyzeTextJobsMultipleTaskStatusRequest.json b/specification/cognitiveservices/Language.AnalyzeText/examples/2022-05-01/SuccessfulAnalyzeTextJobsMultipleTaskStatusRequest.json new file mode 100644 index 000000000000..ea5dc4f97527 --- /dev/null +++ b/specification/cognitiveservices/Language.AnalyzeText/examples/2022-05-01/SuccessfulAnalyzeTextJobsMultipleTaskStatusRequest.json @@ -0,0 +1,133 @@ +{ + "operationId": "AnalyzeTextJobStatus", + "title": "SuccessfulAnalyzeTextJobsMultipleTaskStatusRequest", + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "api-version": "2022-05-01", + "Endpoint": "{Endpoint}", + "jobId": "c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "createdDateTime": "2020-10-01T15:00:45Z", + "displayName": "Extracting Location & US Region", + "expirationDateTime": "2020-10-03T15:01:03Z", + "jobId": "c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18", + "lastUpdatedDateTime": "2020-10-01T15:01:03Z", + "status": "succeeded", + "tasks": { + "completed": 2, + "failed": 0, + "inProgress": 0, + "total": 2, + "items": [ + { + "kind": "EntityRecognitionLROResults", + "taskName": "Recognize Entities", + "lastUpdateDateTime": "2020-10-01T15:01:03Z", + "status": "succeeded", + "results": { + "documents": [ + { + "entities": [ + { + "category": "Event", + "confidenceScore": 0.61, + "length": 4, + "offset": 18, + "text": "trip" + }, + { + "category": "Location", + "confidenceScore": 0.82, + "length": 7, + "offset": 26, + "subcategory": "GPE", + "text": "Seattle" + }, + { + "category": "DateTime", + "confidenceScore": 0.8, + "length": 9, + "offset": 34, + "subcategory": "DateRange", + "text": "last week" + } + ], + "id": "1", + "warnings": [] + }, + { + "entities": [ + { + "category": "Location", + "confidenceScore": 0.52, + "length": 3, + "offset": 14, + "subcategory": "GPE", + "text": "NYC" + }, + { + "category": "DateTime", + "confidenceScore": 0.8, + "length": 8, + "offset": 18, + "subcategory": "Date", + "text": "tomorrow" + } + ], + "id": "2", + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2020-04-01" + } + }, + { + "kind": "CustomEntityRecognitionLROResults", + "taskName": "Recognize US Regions", + "lastUpdateDateTime": "2020-10-01T15:01:03Z", + "status": "succeeded", + "results": { + "documents": [ + { + "entities": [ + { + "category": "USRegion", + "confidenceScore": 0.85, + "length": 17, + "offset": 45, + "text": "Pacific Northwest" + } + ], + "id": "1", + "warnings": [] + }, + { + "entities": [ + { + "category": "USRegion", + "confidenceScore": 0.88, + "length": 10, + "offset": 63, + "text": "East Coast" + } + ], + "id": "2", + "warnings": [] + } + ], + "errors": [], + "projectName": "MyProject", + "deploymentName": "MyDeployment" + } + } + ] + } + } + } + } +} diff --git a/specification/cognitiveservices/Language.AnalyzeText/examples/2022-05-01/SuccessfulAnalyzeTextJobsMultipleTaskSubmitRequest.json b/specification/cognitiveservices/Language.AnalyzeText/examples/2022-05-01/SuccessfulAnalyzeTextJobsMultipleTaskSubmitRequest.json new file mode 100644 index 000000000000..656d0a39d301 --- /dev/null +++ b/specification/cognitiveservices/Language.AnalyzeText/examples/2022-05-01/SuccessfulAnalyzeTextJobsMultipleTaskSubmitRequest.json @@ -0,0 +1,51 @@ +{ + "operationId": "AnalyzeTextSubmitJob", + "title": "SuccessfulAnalyzeTextJobsMultipleTaskSubmitRequest", + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "api-version": "2022-05-01", + "Endpoint": "{Endpoint}", + "jobId": "{Job ID}", + "body": { + "displayName": "Extracting Location & US Region", + "analysisInput": { + "documents": [ + { + "id": "1", + "language": "en", + "text": "I had a wonderful trip to Seattle last week." + }, + { + "id": "2", + "language": "en", + "text": "I'm flying to NYC tomorrow. See you there." + } + ] + }, + "tasks": [ + { + "kind": "EntityRecognition", + "taskName": "Recognize Entities", + "parameters": { + "modelVersion": "latest" + } + }, + { + "kind": "CustomEntityRecognition", + "taskName": "Recognize US Regions", + "parameters": { + "projectName": "MyProject", + "deploymentName": "MyDeployment" + } + } + ] + } + }, + "responses": { + "202": { + "headers": { + "Operation-Location": "{endpoint}/language/analyze-text/jobs/{jobId}?api-version=2022-05-01" + } + } + } +} diff --git a/specification/cognitiveservices/Language.AnalyzeText/examples/2022-05-01/SuccessfulEntityLinkingRequest.json b/specification/cognitiveservices/Language.AnalyzeText/examples/2022-05-01/SuccessfulEntityLinkingRequest.json new file mode 100644 index 000000000000..265362cb48f2 --- /dev/null +++ b/specification/cognitiveservices/Language.AnalyzeText/examples/2022-05-01/SuccessfulEntityLinkingRequest.json @@ -0,0 +1,130 @@ +{ + "operationId": "AnalyzeText", + "title": "SuccessfulEntityLinkingRequest", + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "api-version": "2022-05-01", + "Endpoint": "{Endpoint}", + "body": { + "kind": "EntityLinking", + "parameters": { + "modelVersion": "latest" + }, + "analysisInput": { + "documents": [ + { + "id": "1", + "language": "en", + "text": "Microsoft was founded by Bill Gates and Paul Allen." + }, + { + "id": "2", + "language": "en", + "text": "Pike place market is my favorite Seattle attraction." + } + ] + } + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "kind": "EntityLinkingResults", + "results": { + "documents": [ + { + "entities": [ + { + "dataSource": "Wikipedia", + "id": "Bill Gates", + "language": "en", + "matches": [ + { + "confidenceScore": 0.52, + "length": 10, + "offset": 25, + "text": "Bill Gates" + } + ], + "name": "Bill Gates", + "url": "https://en.wikipedia.org/wiki/Bill_Gates" + }, + { + "dataSource": "Wikipedia", + "id": "Paul Allen", + "language": "en", + "matches": [ + { + "confidenceScore": 0.54, + "length": 10, + "offset": 40, + "text": "Paul Allen" + } + ], + "name": "Paul Allen", + "url": "https://en.wikipedia.org/wiki/Paul_Allen" + }, + { + "dataSource": "Wikipedia", + "id": "Microsoft", + "language": "en", + "matches": [ + { + "confidenceScore": 0.49, + "length": 9, + "offset": 0, + "text": "Microsoft" + } + ], + "name": "Microsoft", + "url": "https://en.wikipedia.org/wiki/Microsoft" + } + ], + "id": "1", + "warnings": [] + }, + { + "entities": [ + { + "dataSource": "Wikipedia", + "id": "Pike Place Market", + "language": "en", + "matches": [ + { + "confidenceScore": 0.86, + "length": 17, + "offset": 0, + "text": "Pike place market" + } + ], + "name": "Pike Place Market", + "url": "https://en.wikipedia.org/wiki/Pike_Place_Market" + }, + { + "dataSource": "Wikipedia", + "id": "Seattle", + "language": "en", + "matches": [ + { + "confidenceScore": 0.27, + "length": 7, + "offset": 33, + "text": "Seattle" + } + ], + "name": "Seattle", + "url": "https://en.wikipedia.org/wiki/Seattle" + } + ], + "id": "2", + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2020-02-01" + } + } + } + } +} diff --git a/specification/cognitiveservices/Language.AnalyzeText/examples/2022-05-01/SuccessfulEntityRecognitionRequest.json b/specification/cognitiveservices/Language.AnalyzeText/examples/2022-05-01/SuccessfulEntityRecognitionRequest.json new file mode 100644 index 000000000000..3814c7d842b1 --- /dev/null +++ b/specification/cognitiveservices/Language.AnalyzeText/examples/2022-05-01/SuccessfulEntityRecognitionRequest.json @@ -0,0 +1,84 @@ +{ + "operationId": "AnalyzeText", + "title": "SuccessfulEntityRecognitionRequest", + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "api-version": "2022-05-01", + "Endpoint": "{Endpoint}", + "body": { + "kind": "EntityRecognition", + "parameters": { + "modelVersion": "latest" + }, + "analysisInput": { + "documents": [ + { + "id": "1", + "language": "en", + "text": "Microsoft was founded by Bill Gates and Paul Allen." + }, + { + "id": "2", + "language": "en", + "text": "Pike place market is my favorite Seattle attraction." + } + ] + } + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "kind": "EntityRecognitionResults", + "results": { + "documents": [ + { + "entities": [ + { + "category": "Organization", + "confidenceScore": 0.84, + "length": 9, + "offset": 0, + "text": "Microsoft" + }, + { + "category": "Person", + "confidenceScore": 0.85, + "length": 10, + "offset": 25, + "text": "Bill Gates" + }, + { + "category": "Person", + "confidenceScore": 0.9, + "length": 10, + "offset": 40, + "text": "Paul Allen" + } + ], + "id": "1", + "warnings": [] + }, + { + "entities": [ + { + "category": "Location", + "confidenceScore": 0.55, + "length": 7, + "offset": 33, + "subcategory": "GPE", + "text": "Seattle" + } + ], + "id": "2", + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2020-04-01" + } + } + } + } +} diff --git a/specification/cognitiveservices/Language.AnalyzeText/examples/2022-05-01/SuccessfulKeyPhraseExtractionRequest.json b/specification/cognitiveservices/Language.AnalyzeText/examples/2022-05-01/SuccessfulKeyPhraseExtractionRequest.json new file mode 100644 index 000000000000..52db4fd214b9 --- /dev/null +++ b/specification/cognitiveservices/Language.AnalyzeText/examples/2022-05-01/SuccessfulKeyPhraseExtractionRequest.json @@ -0,0 +1,73 @@ +{ + "operationId": "AnalyzeText", + "title": "SuccessfulKeyPhraseExtractionRequest", + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "api-version": "2022-05-01", + "Endpoint": "{Endpoint}", + "body": { + "kind": "KeyPhraseExtraction", + "parameters": { + "modelVersion": "latest" + }, + "analysisInput": { + "documents": [ + { + "id": "1", + "language": "en", + "text": "Microsoft was founded by Bill Gates and Paul Allen." + }, + { + "id": "2", + "language": "en", + "text": "Text Analytics is one of the Azure Cognitive Services." + }, + { + "id": "3", + "language": "en", + "text": "My cat might need to see a veterinarian." + } + ] + } + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "kind": "KeyPhraseExtractionResults", + "results": { + "documents": [ + { + "id": "1", + "keyPhrases": [ + "Bill Gates", + "Paul Allen", + "Microsoft" + ], + "warnings": [] + }, + { + "id": "2", + "keyPhrases": [ + "Azure Cognitive Services", + "Text Analytics" + ], + "warnings": [] + }, + { + "id": "3", + "keyPhrases": [ + "cat", + "veterinarian" + ], + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2021-06-01" + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfulLanguageDetectionRequest.json b/specification/cognitiveservices/Language.AnalyzeText/examples/2022-05-01/SuccessfulLanguageDetectionRequest.json similarity index 92% rename from specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfulLanguageDetectionRequest.json rename to specification/cognitiveservices/Language.AnalyzeText/examples/2022-05-01/SuccessfulLanguageDetectionRequest.json index 9d5ff464c21c..bd9ebe6febfb 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfulLanguageDetectionRequest.json +++ b/specification/cognitiveservices/Language.AnalyzeText/examples/2022-05-01/SuccessfulLanguageDetectionRequest.json @@ -1,7 +1,9 @@ { + "operationId": "AnalyzeText", + "title": "SuccessfulLanguageDetectionRequest", "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", - "api-version": "2023-11-15-preview", + "api-version": "2022-05-01", "Endpoint": "{Endpoint}", "body": { "kind": "LanguageDetection", @@ -68,8 +70,7 @@ "detectedLanguage": { "confidenceScore": 1, "iso6391Name": "hi", - "name": "Hindi", - "script": "Latin" + "name": "Hindi" }, "id": "4", "warnings": [] diff --git a/specification/cognitiveservices/Language.AnalyzeText/examples/2022-05-01/SuccessfulPiiEntityRecognitionRequest.json b/specification/cognitiveservices/Language.AnalyzeText/examples/2022-05-01/SuccessfulPiiEntityRecognitionRequest.json new file mode 100644 index 000000000000..5845bce24cea --- /dev/null +++ b/specification/cognitiveservices/Language.AnalyzeText/examples/2022-05-01/SuccessfulPiiEntityRecognitionRequest.json @@ -0,0 +1,90 @@ +{ + "operationId": "AnalyzeText", + "title": "SuccessfulPiiEntityRecognitionRequest", + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "api-version": "2022-05-01", + "Endpoint": "{Endpoint}", + "body": { + "kind": "PiiEntityRecognition", + "parameters": { + "modelVersion": "latest" + }, + "analysisInput": { + "documents": [ + { + "id": "1", + "language": "en", + "text": "My SSN is 859-98-0987" + }, + { + "id": "2", + "language": "en", + "text": "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check." + }, + { + "id": "3", + "language": "en", + "text": "Is 998.214.865-68 your Brazilian CPF number?" + } + ] + } + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "kind": "PiiEntityRecognitionResults", + "results": { + "documents": [ + { + "id": "1", + "redactedText": "My SSN is ***********", + "entities": [ + { + "category": "USSocialSecurityNumber", + "confidenceScore": 0.65, + "length": 11, + "offset": 28, + "text": "859-98-0987" + } + ], + "warnings": [] + }, + { + "id": "2", + "redactedText": "Your ABA number - ********* - is the first 9 digits in the lower left hand corner of your personal check.", + "entities": [ + { + "category": "ABARoutingNumber", + "confidenceScore": 0.75, + "length": 9, + "offset": 18, + "text": "111000025" + } + ], + "warnings": [] + }, + { + "id": "3", + "redactedText": "Is ************** your Brazilian CPF number?", + "entities": [ + { + "category": "BRCPFNumber", + "confidenceScore": 0.85, + "length": 14, + "offset": 3, + "text": "998.214.865-68" + } + ], + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2021-01-15" + } + } + } + } +} diff --git a/specification/cognitiveservices/Language.AnalyzeText/examples/2022-05-01/SuccessfulSentimentAnalysisRequest.json b/specification/cognitiveservices/Language.AnalyzeText/examples/2022-05-01/SuccessfulSentimentAnalysisRequest.json new file mode 100644 index 000000000000..fffc73a4fcc4 --- /dev/null +++ b/specification/cognitiveservices/Language.AnalyzeText/examples/2022-05-01/SuccessfulSentimentAnalysisRequest.json @@ -0,0 +1,150 @@ +{ + "operationId": "AnalyzeText", + "title": "SuccessfulSentimentAnalysisRequest", + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "api-version": "2022-05-01", + "Endpoint": "{Endpoint}", + "body": { + "kind": "SentimentAnalysis", + "parameters": { + "modelVersion": "latest" + }, + "analysisInput": { + "documents": [ + { + "id": "1", + "language": "en", + "text": "Great atmosphere. Close to plenty of restaurants, hotels, and transit! Staff are friendly and helpful." + } + ] + } + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "kind": "SentimentAnalysisResults", + "results": { + "documents": [ + { + "confidenceScores": { + "negative": 0, + "neutral": 0, + "positive": 1 + }, + "id": "1", + "sentences": [ + { + "targets": [ + { + "confidenceScores": { + "negative": 0, + "positive": 1 + }, + "length": 10, + "offset": 6, + "relations": [ + { + "ref": "#/documents/0/sentences/0/assessments/0", + "relationType": "assessment" + } + ], + "sentiment": "positive", + "text": "atmosphere" + } + ], + "confidenceScores": { + "negative": 0, + "neutral": 0, + "positive": 1 + }, + "length": 17, + "offset": 0, + "assessments": [ + { + "confidenceScores": { + "negative": 0, + "positive": 1 + }, + "isNegated": false, + "length": 5, + "offset": 0, + "sentiment": "positive", + "text": "great" + } + ], + "sentiment": "positive", + "text": "Great atmosphere." + }, + { + "targets": [ + { + "confidenceScores": { + "negative": 0.01, + "positive": 0.99 + }, + "length": 11, + "offset": 37, + "relations": [ + { + "ref": "#/documents/0/sentences/1/assessments/0", + "relationType": "assessment" + } + ], + "sentiment": "positive", + "text": "restaurants" + }, + { + "confidenceScores": { + "negative": 0.01, + "positive": 0.99 + }, + "length": 6, + "offset": 50, + "relations": [ + { + "ref": "#/documents/0/sentences/1/assessments/0", + "relationType": "assessment" + } + ], + "sentiment": "positive", + "text": "hotels" + } + ], + "confidenceScores": { + "negative": 0.01, + "neutral": 0.86, + "positive": 0.13 + }, + "length": 52, + "offset": 18, + "assessments": [ + { + "confidenceScores": { + "negative": 0.01, + "positive": 0.99 + }, + "isNegated": false, + "length": 15, + "offset": 18, + "sentiment": "positive", + "text": "Close to plenty" + } + ], + "sentiment": "neutral", + "text": "Close to plenty of restaurants, hotels, and transit!" + } + ], + "sentiment": "positive", + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2021-10-01" + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/text/SuccessfulAbstractiveSummarizationTaskResult.json b/specification/cognitiveservices/Language.AnalyzeText/examples/2023-04-01/SuccessfulAbstractiveSummarizationTaskResult.json similarity index 94% rename from specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/text/SuccessfulAbstractiveSummarizationTaskResult.json rename to specification/cognitiveservices/Language.AnalyzeText/examples/2023-04-01/SuccessfulAbstractiveSummarizationTaskResult.json index aeda986c5b03..c4e360982d7c 100644 --- a/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/text/SuccessfulAbstractiveSummarizationTaskResult.json +++ b/specification/cognitiveservices/Language.AnalyzeText/examples/2023-04-01/SuccessfulAbstractiveSummarizationTaskResult.json @@ -1,4 +1,6 @@ { + "operationId": "AnalyzeTextJobStatus", + "title": "SuccessfulAbstractiveSummarizationTaskResult", "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", "api-version": "2023-04-01", diff --git a/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/text/SuccessfulAbstractiveSummarizationTaskSubmit.json b/specification/cognitiveservices/Language.AnalyzeText/examples/2023-04-01/SuccessfulAbstractiveSummarizationTaskSubmit.json similarity index 96% rename from specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/text/SuccessfulAbstractiveSummarizationTaskSubmit.json rename to specification/cognitiveservices/Language.AnalyzeText/examples/2023-04-01/SuccessfulAbstractiveSummarizationTaskSubmit.json index 1fec0f6e6ffd..7515e1061686 100644 --- a/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/text/SuccessfulAbstractiveSummarizationTaskSubmit.json +++ b/specification/cognitiveservices/Language.AnalyzeText/examples/2023-04-01/SuccessfulAbstractiveSummarizationTaskSubmit.json @@ -1,4 +1,6 @@ { + "operationId": "AnalyzeTextSubmitJob", + "title": "SuccessfulAbstractiveSummarizationTaskSubmit", "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", "api-version": "2023-04-01", diff --git a/specification/cognitiveservices/Language.AnalyzeText/examples/2023-04-01/SuccessfulAnalyzeTextJobsCancelRequest.json b/specification/cognitiveservices/Language.AnalyzeText/examples/2023-04-01/SuccessfulAnalyzeTextJobsCancelRequest.json new file mode 100644 index 000000000000..6c7ed641f4de --- /dev/null +++ b/specification/cognitiveservices/Language.AnalyzeText/examples/2023-04-01/SuccessfulAnalyzeTextJobsCancelRequest.json @@ -0,0 +1,17 @@ +{ + "operationId": "AnalyzeTextCancelJob", + "title": "SuccessfulAnalyzeTextJobsCancelRequest", + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "api-version": "2023-04-01", + "Endpoint": "{Endpoint}", + "jobId": "c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18" + }, + "responses": { + "202": { + "headers": { + "Operation-Location": "{Endpoint}/language/analyze-text/jobs/{jobId}?api-version=2023-04-01" + } + } + } +} diff --git a/specification/cognitiveservices/Language.AnalyzeText/examples/2023-04-01/SuccessfulAnalyzeTextJobsMultipleTaskStatusRequest.json b/specification/cognitiveservices/Language.AnalyzeText/examples/2023-04-01/SuccessfulAnalyzeTextJobsMultipleTaskStatusRequest.json new file mode 100644 index 000000000000..e3801c07f7b8 --- /dev/null +++ b/specification/cognitiveservices/Language.AnalyzeText/examples/2023-04-01/SuccessfulAnalyzeTextJobsMultipleTaskStatusRequest.json @@ -0,0 +1,133 @@ +{ + "operationId": "AnalyzeTextJobStatus", + "title": "SuccessfulAnalyzeTextJobsMultipleTaskStatusRequest", + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "api-version": "2023-04-01", + "Endpoint": "{Endpoint}", + "jobId": "c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "createdDateTime": "2020-10-01T15:00:45Z", + "displayName": "Extracting Location & US Region", + "expirationDateTime": "2020-10-03T15:01:03Z", + "jobId": "c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18", + "lastUpdatedDateTime": "2020-10-01T15:01:03Z", + "status": "succeeded", + "tasks": { + "completed": 2, + "failed": 0, + "inProgress": 0, + "total": 2, + "items": [ + { + "kind": "EntityRecognitionLROResults", + "taskName": "Recognize Entities", + "lastUpdateDateTime": "2020-10-01T15:01:03Z", + "status": "succeeded", + "results": { + "documents": [ + { + "entities": [ + { + "category": "Event", + "confidenceScore": 0.61, + "length": 4, + "offset": 18, + "text": "trip" + }, + { + "category": "Location", + "confidenceScore": 0.82, + "length": 7, + "offset": 26, + "subcategory": "GPE", + "text": "Seattle" + }, + { + "category": "DateTime", + "confidenceScore": 0.8, + "length": 9, + "offset": 34, + "subcategory": "DateRange", + "text": "last week" + } + ], + "id": "1", + "warnings": [] + }, + { + "entities": [ + { + "category": "Location", + "confidenceScore": 0.52, + "length": 3, + "offset": 14, + "subcategory": "GPE", + "text": "NYC" + }, + { + "category": "DateTime", + "confidenceScore": 0.8, + "length": 8, + "offset": 18, + "subcategory": "Date", + "text": "tomorrow" + } + ], + "id": "2", + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2020-04-01" + } + }, + { + "kind": "CustomEntityRecognitionLROResults", + "taskName": "Recognize US Regions", + "lastUpdateDateTime": "2020-10-01T15:01:03Z", + "status": "succeeded", + "results": { + "documents": [ + { + "entities": [ + { + "category": "USRegion", + "confidenceScore": 0.85, + "length": 17, + "offset": 45, + "text": "Pacific Northwest" + } + ], + "id": "1", + "warnings": [] + }, + { + "entities": [ + { + "category": "USRegion", + "confidenceScore": 0.88, + "length": 10, + "offset": 63, + "text": "East Coast" + } + ], + "id": "2", + "warnings": [] + } + ], + "errors": [], + "projectName": "MyProject", + "deploymentName": "MyDeployment" + } + } + ] + } + } + } + } +} diff --git a/specification/cognitiveservices/Language.AnalyzeText/examples/2023-04-01/SuccessfulAnalyzeTextJobsMultipleTaskSubmitRequest.json b/specification/cognitiveservices/Language.AnalyzeText/examples/2023-04-01/SuccessfulAnalyzeTextJobsMultipleTaskSubmitRequest.json new file mode 100644 index 000000000000..58831f3a4d7f --- /dev/null +++ b/specification/cognitiveservices/Language.AnalyzeText/examples/2023-04-01/SuccessfulAnalyzeTextJobsMultipleTaskSubmitRequest.json @@ -0,0 +1,51 @@ +{ + "operationId": "AnalyzeTextSubmitJob", + "title": "SuccessfulAnalyzeTextJobsMultipleTaskSubmitRequest", + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "api-version": "2023-04-01", + "Endpoint": "{Endpoint}", + "jobId": "{Job ID}", + "body": { + "displayName": "Extracting Location & US Region", + "analysisInput": { + "documents": [ + { + "id": "1", + "language": "en", + "text": "I had a wonderful trip to Seattle last week." + }, + { + "id": "2", + "language": "en", + "text": "I'm flying to NYC tomorrow. See you there." + } + ] + }, + "tasks": [ + { + "kind": "EntityRecognition", + "taskName": "Recognize Entities", + "parameters": { + "modelVersion": "latest" + } + }, + { + "kind": "CustomEntityRecognition", + "taskName": "Recognize US Regions", + "parameters": { + "projectName": "MyProject", + "deploymentName": "MyDeployment" + } + } + ] + } + }, + "responses": { + "202": { + "headers": { + "Operation-Location": "{endpoint}/language/analyze-text/jobs/{jobId}?api-version=2023-04-01" + } + } + } +} diff --git a/specification/cognitiveservices/Language.AnalyzeText/examples/2023-04-01/SuccessfulEntityLinkingRequest.json b/specification/cognitiveservices/Language.AnalyzeText/examples/2023-04-01/SuccessfulEntityLinkingRequest.json new file mode 100644 index 000000000000..a76270e6f8e9 --- /dev/null +++ b/specification/cognitiveservices/Language.AnalyzeText/examples/2023-04-01/SuccessfulEntityLinkingRequest.json @@ -0,0 +1,130 @@ +{ + "operationId": "AnalyzeText", + "title": "SuccessfulEntityLinkingRequest", + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "api-version": "2023-04-01", + "Endpoint": "{Endpoint}", + "body": { + "kind": "EntityLinking", + "parameters": { + "modelVersion": "latest" + }, + "analysisInput": { + "documents": [ + { + "id": "1", + "language": "en", + "text": "Microsoft was founded by Bill Gates and Paul Allen." + }, + { + "id": "2", + "language": "en", + "text": "Pike place market is my favorite Seattle attraction." + } + ] + } + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "kind": "EntityLinkingResults", + "results": { + "documents": [ + { + "entities": [ + { + "dataSource": "Wikipedia", + "id": "Bill Gates", + "language": "en", + "matches": [ + { + "confidenceScore": 0.52, + "length": 10, + "offset": 25, + "text": "Bill Gates" + } + ], + "name": "Bill Gates", + "url": "https://en.wikipedia.org/wiki/Bill_Gates" + }, + { + "dataSource": "Wikipedia", + "id": "Paul Allen", + "language": "en", + "matches": [ + { + "confidenceScore": 0.54, + "length": 10, + "offset": 40, + "text": "Paul Allen" + } + ], + "name": "Paul Allen", + "url": "https://en.wikipedia.org/wiki/Paul_Allen" + }, + { + "dataSource": "Wikipedia", + "id": "Microsoft", + "language": "en", + "matches": [ + { + "confidenceScore": 0.49, + "length": 9, + "offset": 0, + "text": "Microsoft" + } + ], + "name": "Microsoft", + "url": "https://en.wikipedia.org/wiki/Microsoft" + } + ], + "id": "1", + "warnings": [] + }, + { + "entities": [ + { + "dataSource": "Wikipedia", + "id": "Pike Place Market", + "language": "en", + "matches": [ + { + "confidenceScore": 0.86, + "length": 17, + "offset": 0, + "text": "Pike place market" + } + ], + "name": "Pike Place Market", + "url": "https://en.wikipedia.org/wiki/Pike_Place_Market" + }, + { + "dataSource": "Wikipedia", + "id": "Seattle", + "language": "en", + "matches": [ + { + "confidenceScore": 0.27, + "length": 7, + "offset": 33, + "text": "Seattle" + } + ], + "name": "Seattle", + "url": "https://en.wikipedia.org/wiki/Seattle" + } + ], + "id": "2", + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2020-02-01" + } + } + } + } +} diff --git a/specification/cognitiveservices/Language.AnalyzeText/examples/2023-04-01/SuccessfulEntityRecognitionRequest.json b/specification/cognitiveservices/Language.AnalyzeText/examples/2023-04-01/SuccessfulEntityRecognitionRequest.json new file mode 100644 index 000000000000..e2e355176a8f --- /dev/null +++ b/specification/cognitiveservices/Language.AnalyzeText/examples/2023-04-01/SuccessfulEntityRecognitionRequest.json @@ -0,0 +1,84 @@ +{ + "operationId": "AnalyzeText", + "title": "SuccessfulEntityRecognitionRequest", + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "api-version": "2023-04-01", + "Endpoint": "{Endpoint}", + "body": { + "kind": "EntityRecognition", + "parameters": { + "modelVersion": "latest" + }, + "analysisInput": { + "documents": [ + { + "id": "1", + "language": "en", + "text": "Microsoft was founded by Bill Gates and Paul Allen." + }, + { + "id": "2", + "language": "en", + "text": "Pike place market is my favorite Seattle attraction." + } + ] + } + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "kind": "EntityRecognitionResults", + "results": { + "documents": [ + { + "entities": [ + { + "category": "Organization", + "confidenceScore": 0.84, + "length": 9, + "offset": 0, + "text": "Microsoft" + }, + { + "category": "Person", + "confidenceScore": 0.85, + "length": 10, + "offset": 25, + "text": "Bill Gates" + }, + { + "category": "Person", + "confidenceScore": 0.9, + "length": 10, + "offset": 40, + "text": "Paul Allen" + } + ], + "id": "1", + "warnings": [] + }, + { + "entities": [ + { + "category": "Location", + "confidenceScore": 0.55, + "length": 7, + "offset": 33, + "subcategory": "GPE", + "text": "Seattle" + } + ], + "id": "2", + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2020-04-01" + } + } + } + } +} diff --git a/specification/cognitiveservices/Language.AnalyzeText/examples/2023-04-01/SuccessfulKeyPhraseExtractionRequest.json b/specification/cognitiveservices/Language.AnalyzeText/examples/2023-04-01/SuccessfulKeyPhraseExtractionRequest.json new file mode 100644 index 000000000000..1c528e9587b3 --- /dev/null +++ b/specification/cognitiveservices/Language.AnalyzeText/examples/2023-04-01/SuccessfulKeyPhraseExtractionRequest.json @@ -0,0 +1,73 @@ +{ + "operationId": "AnalyzeText", + "title": "SuccessfulKeyPhraseExtractionRequest", + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "api-version": "2023-04-01", + "Endpoint": "{Endpoint}", + "body": { + "kind": "KeyPhraseExtraction", + "parameters": { + "modelVersion": "latest" + }, + "analysisInput": { + "documents": [ + { + "id": "1", + "language": "en", + "text": "Microsoft was founded by Bill Gates and Paul Allen." + }, + { + "id": "2", + "language": "en", + "text": "Text Analytics is one of the Azure Cognitive Services." + }, + { + "id": "3", + "language": "en", + "text": "My cat might need to see a veterinarian." + } + ] + } + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "kind": "KeyPhraseExtractionResults", + "results": { + "documents": [ + { + "id": "1", + "keyPhrases": [ + "Bill Gates", + "Paul Allen", + "Microsoft" + ], + "warnings": [] + }, + { + "id": "2", + "keyPhrases": [ + "Azure Cognitive Services", + "Text Analytics" + ], + "warnings": [] + }, + { + "id": "3", + "keyPhrases": [ + "cat", + "veterinarian" + ], + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2021-06-01" + } + } + } + } +} diff --git a/specification/cognitiveservices/Language.AnalyzeText/examples/2023-04-01/SuccessfulLanguageDetectionRequest.json b/specification/cognitiveservices/Language.AnalyzeText/examples/2023-04-01/SuccessfulLanguageDetectionRequest.json new file mode 100644 index 000000000000..1fe8c2e6a8a6 --- /dev/null +++ b/specification/cognitiveservices/Language.AnalyzeText/examples/2023-04-01/SuccessfulLanguageDetectionRequest.json @@ -0,0 +1,85 @@ +{ + "operationId": "AnalyzeText", + "title": "SuccessfulLanguageDetectionRequest", + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "api-version": "2023-04-01", + "Endpoint": "{Endpoint}", + "body": { + "kind": "LanguageDetection", + "parameters": { + "modelVersion": "latest" + }, + "analysisInput": { + "documents": [ + { + "id": "1", + "text": "Hello world" + }, + { + "id": "2", + "text": "Bonjour tout le monde" + }, + { + "id": "3", + "text": "Hola mundo" + }, + { + "id": "4", + "text": "Tumhara naam kya hai?" + } + ] + } + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "kind": "LanguageDetectionResults", + "results": { + "documents": [ + { + "detectedLanguage": { + "confidenceScore": 1, + "iso6391Name": "en", + "name": "English" + }, + "id": "1", + "warnings": [] + }, + { + "detectedLanguage": { + "confidenceScore": 1, + "iso6391Name": "fr", + "name": "French" + }, + "id": "2", + "warnings": [] + }, + { + "detectedLanguage": { + "confidenceScore": 1, + "iso6391Name": "es", + "name": "Spanish" + }, + "id": "3", + "warnings": [] + }, + { + "detectedLanguage": { + "confidenceScore": 1, + "iso6391Name": "hi", + "name": "Hindi" + }, + "id": "4", + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2021-01-05" + } + } + } + } +} diff --git a/specification/cognitiveservices/Language.AnalyzeText/examples/2023-04-01/SuccessfulPiiEntityRecognitionRequest.json b/specification/cognitiveservices/Language.AnalyzeText/examples/2023-04-01/SuccessfulPiiEntityRecognitionRequest.json new file mode 100644 index 000000000000..c349530542f7 --- /dev/null +++ b/specification/cognitiveservices/Language.AnalyzeText/examples/2023-04-01/SuccessfulPiiEntityRecognitionRequest.json @@ -0,0 +1,90 @@ +{ + "operationId": "AnalyzeText", + "title": "SuccessfulPiiEntityRecognitionRequest", + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "api-version": "2023-04-01", + "Endpoint": "{Endpoint}", + "body": { + "kind": "PiiEntityRecognition", + "parameters": { + "modelVersion": "latest" + }, + "analysisInput": { + "documents": [ + { + "id": "1", + "language": "en", + "text": "My SSN is 859-98-0987" + }, + { + "id": "2", + "language": "en", + "text": "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check." + }, + { + "id": "3", + "language": "en", + "text": "Is 998.214.865-68 your Brazilian CPF number?" + } + ] + } + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "kind": "PiiEntityRecognitionResults", + "results": { + "documents": [ + { + "id": "1", + "redactedText": "My SSN is ***********", + "entities": [ + { + "category": "USSocialSecurityNumber", + "confidenceScore": 0.65, + "length": 11, + "offset": 28, + "text": "859-98-0987" + } + ], + "warnings": [] + }, + { + "id": "2", + "redactedText": "Your ABA number - ********* - is the first 9 digits in the lower left hand corner of your personal check.", + "entities": [ + { + "category": "ABARoutingNumber", + "confidenceScore": 0.75, + "length": 9, + "offset": 18, + "text": "111000025" + } + ], + "warnings": [] + }, + { + "id": "3", + "redactedText": "Is ************** your Brazilian CPF number?", + "entities": [ + { + "category": "BRCPFNumber", + "confidenceScore": 0.85, + "length": 14, + "offset": 3, + "text": "998.214.865-68" + } + ], + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2021-01-15" + } + } + } + } +} diff --git a/specification/cognitiveservices/Language.AnalyzeText/examples/2023-04-01/SuccessfulSentimentAnalysisRequest.json b/specification/cognitiveservices/Language.AnalyzeText/examples/2023-04-01/SuccessfulSentimentAnalysisRequest.json new file mode 100644 index 000000000000..ad6a30557857 --- /dev/null +++ b/specification/cognitiveservices/Language.AnalyzeText/examples/2023-04-01/SuccessfulSentimentAnalysisRequest.json @@ -0,0 +1,150 @@ +{ + "operationId": "AnalyzeText", + "title": "SuccessfulSentimentAnalysisRequest", + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "api-version": "2023-04-01", + "Endpoint": "{Endpoint}", + "body": { + "kind": "SentimentAnalysis", + "parameters": { + "modelVersion": "latest" + }, + "analysisInput": { + "documents": [ + { + "id": "1", + "language": "en", + "text": "Great atmosphere. Close to plenty of restaurants, hotels, and transit! Staff are friendly and helpful." + } + ] + } + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "kind": "SentimentAnalysisResults", + "results": { + "documents": [ + { + "confidenceScores": { + "negative": 0, + "neutral": 0, + "positive": 1 + }, + "id": "1", + "sentences": [ + { + "targets": [ + { + "confidenceScores": { + "negative": 0, + "positive": 1 + }, + "length": 10, + "offset": 6, + "relations": [ + { + "ref": "#/documents/0/sentences/0/assessments/0", + "relationType": "assessment" + } + ], + "sentiment": "positive", + "text": "atmosphere" + } + ], + "confidenceScores": { + "negative": 0, + "neutral": 0, + "positive": 1 + }, + "length": 17, + "offset": 0, + "assessments": [ + { + "confidenceScores": { + "negative": 0, + "positive": 1 + }, + "isNegated": false, + "length": 5, + "offset": 0, + "sentiment": "positive", + "text": "great" + } + ], + "sentiment": "positive", + "text": "Great atmosphere." + }, + { + "targets": [ + { + "confidenceScores": { + "negative": 0.01, + "positive": 0.99 + }, + "length": 11, + "offset": 37, + "relations": [ + { + "ref": "#/documents/0/sentences/1/assessments/0", + "relationType": "assessment" + } + ], + "sentiment": "positive", + "text": "restaurants" + }, + { + "confidenceScores": { + "negative": 0.01, + "positive": 0.99 + }, + "length": 6, + "offset": 50, + "relations": [ + { + "ref": "#/documents/0/sentences/1/assessments/0", + "relationType": "assessment" + } + ], + "sentiment": "positive", + "text": "hotels" + } + ], + "confidenceScores": { + "negative": 0.01, + "neutral": 0.86, + "positive": 0.13 + }, + "length": 52, + "offset": 18, + "assessments": [ + { + "confidenceScores": { + "negative": 0.01, + "positive": 0.99 + }, + "isNegated": false, + "length": 15, + "offset": 18, + "sentiment": "positive", + "text": "Close to plenty" + } + ], + "sentiment": "neutral", + "text": "Close to plenty of restaurants, hotels, and transit!" + } + ], + "sentiment": "positive", + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2021-10-01" + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfulAbstractiveSummarizationTaskResult.json b/specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulAbstractiveSummarizationTaskResult.json similarity index 94% rename from specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfulAbstractiveSummarizationTaskResult.json rename to specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulAbstractiveSummarizationTaskResult.json index 63d34b32fbd2..a274bc80839b 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfulAbstractiveSummarizationTaskResult.json +++ b/specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulAbstractiveSummarizationTaskResult.json @@ -1,4 +1,6 @@ { + "operationId": "AnalyzeTextJobStatus", + "title": "SuccessfulAbstractiveSummarizationTaskResult", "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", "api-version": "2023-11-15-preview", diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfulAbstractiveSummarizationTaskSubmit.json b/specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulAbstractiveSummarizationTaskSubmit.json similarity index 96% rename from specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfulAbstractiveSummarizationTaskSubmit.json rename to specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulAbstractiveSummarizationTaskSubmit.json index e7b7f64fab39..6293731cb3cc 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfulAbstractiveSummarizationTaskSubmit.json +++ b/specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulAbstractiveSummarizationTaskSubmit.json @@ -1,4 +1,6 @@ { + "operationId": "AnalyzeTextSubmitJob", + "title": "SuccessfulAbstractiveSummarizationTaskSubmit", "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", "api-version": "2023-11-15-preview", diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfulAnalyzeTextJobsCancelRequest.json b/specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulAnalyzeTextJobsCancelRequest.json similarity index 79% rename from specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfulAnalyzeTextJobsCancelRequest.json rename to specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulAnalyzeTextJobsCancelRequest.json index 42a5c4dbad61..a021218768dd 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfulAnalyzeTextJobsCancelRequest.json +++ b/specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulAnalyzeTextJobsCancelRequest.json @@ -1,4 +1,6 @@ { + "operationId": "AnalyzeTextCancelJob", + "title": "SuccessfulAnalyzeTextJobsCancelRequest", "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", "api-version": "2023-11-15-preview", diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfulAnalyzeTextJobsMultipleTaskStatusRequest.json b/specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulAnalyzeTextJobsMultipleTaskStatusRequest.json similarity index 98% rename from specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfulAnalyzeTextJobsMultipleTaskStatusRequest.json rename to specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulAnalyzeTextJobsMultipleTaskStatusRequest.json index 4e05543a20c2..3a36218c7529 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfulAnalyzeTextJobsMultipleTaskStatusRequest.json +++ b/specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulAnalyzeTextJobsMultipleTaskStatusRequest.json @@ -1,4 +1,6 @@ { + "operationId": "AnalyzeTextJobStatus", + "title": "SuccessfulAnalyzeTextJobsMultipleTaskStatusRequest", "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", "api-version": "2023-11-15-preview", diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfulAnalyzeTextJobsMultipleTaskSubmitRequest.json b/specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulAnalyzeTextJobsMultipleTaskSubmitRequest.json similarity index 91% rename from specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfulAnalyzeTextJobsMultipleTaskSubmitRequest.json rename to specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulAnalyzeTextJobsMultipleTaskSubmitRequest.json index 89d5b6f9dbc7..f6bd18ae4735 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfulAnalyzeTextJobsMultipleTaskSubmitRequest.json +++ b/specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulAnalyzeTextJobsMultipleTaskSubmitRequest.json @@ -1,4 +1,6 @@ { + "operationId": "AnalyzeTextSubmitJob", + "title": "SuccessfulAnalyzeTextJobsMultipleTaskSubmitRequest", "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", "api-version": "2023-11-15-preview", diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfulCustomAbstractiveSummarizationTaskResult.json b/specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulCustomAbstractiveSummarizationTaskResult.json similarity index 94% rename from specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfulCustomAbstractiveSummarizationTaskResult.json rename to specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulCustomAbstractiveSummarizationTaskResult.json index 8617206ec3c3..0d5cd7d359e3 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfulCustomAbstractiveSummarizationTaskResult.json +++ b/specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulCustomAbstractiveSummarizationTaskResult.json @@ -1,4 +1,6 @@ { + "operationId": "AnalyzeTextJobStatus", + "title": "SuccessfulCustomAbstractiveSummarizationTaskResult", "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", "api-version": "2023-11-15-preview", diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfulCustomAbstractiveSummarizationTaskSubmit.json b/specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulCustomAbstractiveSummarizationTaskSubmit.json similarity index 95% rename from specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfulCustomAbstractiveSummarizationTaskSubmit.json rename to specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulCustomAbstractiveSummarizationTaskSubmit.json index 604432efc249..a0bd2f5721cd 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfulCustomAbstractiveSummarizationTaskSubmit.json +++ b/specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulCustomAbstractiveSummarizationTaskSubmit.json @@ -1,4 +1,6 @@ { + "operationId": "AnalyzeTextSubmitJob", + "title": "SuccessfulCustomAbstractiveSummarizationTaskSubmit", "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", "api-version": "2023-11-15-preview", diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfulCustomHealthcarePostRequest.json b/specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulCustomHealthcarePostRequest.json similarity index 89% rename from specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfulCustomHealthcarePostRequest.json rename to specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulCustomHealthcarePostRequest.json index 4f47a7e4d47a..2e74dfe4a218 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfulCustomHealthcarePostRequest.json +++ b/specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulCustomHealthcarePostRequest.json @@ -1,4 +1,6 @@ { + "operationId": "AnalyzeTextSubmitJob", + "title": "SuccessfulCustomHealthcarePostRequest", "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", "api-version": "2023-11-15-preview", diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfulCustomHealthcareTaskStatusRequest.json b/specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulCustomHealthcareTaskStatusRequest.json similarity index 98% rename from specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfulCustomHealthcareTaskStatusRequest.json rename to specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulCustomHealthcareTaskStatusRequest.json index f13c4694225b..5aad4f328e53 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfulCustomHealthcareTaskStatusRequest.json +++ b/specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulCustomHealthcareTaskStatusRequest.json @@ -1,4 +1,6 @@ { + "operationId": "AnalyzeTextJobStatus", + "title": "SuccessfulCustomHealthcareTaskStatusRequest", "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", "api-version": "2023-11-15-preview", diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfulCustomSentimentAnalysisTaskStatusRequest.json b/specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulCustomSentimentAnalysisTaskStatusRequest.json similarity index 95% rename from specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfulCustomSentimentAnalysisTaskStatusRequest.json rename to specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulCustomSentimentAnalysisTaskStatusRequest.json index 6b544ecb03c7..ba54c1a8da56 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfulCustomSentimentAnalysisTaskStatusRequest.json +++ b/specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulCustomSentimentAnalysisTaskStatusRequest.json @@ -1,4 +1,6 @@ { + "operationId": "AnalyzeTextJobStatus", + "title": "SuccessfulCustomSentimentAnalysisTaskStatusRequest", "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", "api-version": "2023-11-15-preview", diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfulCustomSentimentAnalysisTaskSubmit.json b/specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulCustomSentimentAnalysisTaskSubmit.json similarity index 88% rename from specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfulCustomSentimentAnalysisTaskSubmit.json rename to specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulCustomSentimentAnalysisTaskSubmit.json index 74fe66f944f4..97ac2e0bb333 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfulCustomSentimentAnalysisTaskSubmit.json +++ b/specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulCustomSentimentAnalysisTaskSubmit.json @@ -1,4 +1,6 @@ { + "operationId": "AnalyzeTextSubmitJob", + "title": "SuccessfulCustomSentimentAnalysisTaskSubmit", "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", "api-version": "2023-11-15-preview", diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfuDynamicClassificationRequest.json b/specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulDynamicClassificationRequest.json similarity index 96% rename from specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfuDynamicClassificationRequest.json rename to specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulDynamicClassificationRequest.json index 4c0fb9d29f5f..663e1e4802fd 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfuDynamicClassificationRequest.json +++ b/specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulDynamicClassificationRequest.json @@ -1,4 +1,6 @@ { + "operationId": "AnalyzeText", + "title": "SuccessfulDynamicClassificationRequest", "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", "api-version": "2023-11-15-preview", diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfulEntityLinkingRequest.json b/specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulEntityLinkingRequest.json similarity index 97% rename from specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfulEntityLinkingRequest.json rename to specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulEntityLinkingRequest.json index 369571f0f9f9..84ec86e75e19 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfulEntityLinkingRequest.json +++ b/specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulEntityLinkingRequest.json @@ -1,4 +1,6 @@ { + "operationId": "AnalyzeText", + "title": "SuccessfulEntityLinkingRequest", "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", "api-version": "2023-11-15-preview", diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfulEntityRecognitionExclusionRequest.json b/specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulEntityRecognitionExclusionRequest.json similarity index 97% rename from specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfulEntityRecognitionExclusionRequest.json rename to specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulEntityRecognitionExclusionRequest.json index 0f977c16c052..cac5bd86bd13 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfulEntityRecognitionExclusionRequest.json +++ b/specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulEntityRecognitionExclusionRequest.json @@ -1,4 +1,6 @@ { + "operationId": "AnalyzeText", + "title": "SuccessfulEntityRecognitionExclusionRequest", "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", "api-version": "2023-11-15-preview", diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfulEntityRecognitionInclusionRequest.json b/specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulEntityRecognitionInclusionRequest.json similarity index 97% rename from specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfulEntityRecognitionInclusionRequest.json rename to specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulEntityRecognitionInclusionRequest.json index f83f51c5ba94..795ecd40a390 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfulEntityRecognitionInclusionRequest.json +++ b/specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulEntityRecognitionInclusionRequest.json @@ -1,4 +1,6 @@ { + "operationId": "AnalyzeText", + "title": "SuccessfulEntityRecognitionInclusionRequest", "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", "api-version": "2023-11-15-preview", diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfulEntityRecognitionInferenceOptionsRequest.json b/specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulEntityRecognitionInferenceOptionsRequest.json similarity index 95% rename from specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfulEntityRecognitionInferenceOptionsRequest.json rename to specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulEntityRecognitionInferenceOptionsRequest.json index 6d8a9642d6e9..1c41651f7fd7 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfulEntityRecognitionInferenceOptionsRequest.json +++ b/specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulEntityRecognitionInferenceOptionsRequest.json @@ -1,4 +1,6 @@ { + "operationId": "AnalyzeText", + "title": "SuccessfulEntityRecognitionInferenceOptionsRequest", "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", "api-version": "2023-11-15-preview", diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfulEntityRecognitionOverlapPolicy.json b/specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulEntityRecognitionOverlapPolicy.json similarity index 95% rename from specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfulEntityRecognitionOverlapPolicy.json rename to specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulEntityRecognitionOverlapPolicy.json index 205f494229b1..f4b9483687a7 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfulEntityRecognitionOverlapPolicy.json +++ b/specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulEntityRecognitionOverlapPolicy.json @@ -1,4 +1,6 @@ { + "operationId": "AnalyzeText", + "title": "SuccessfulEntityRecognitionOverlapPolicy", "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", "api-version": "2023-11-15-preview", diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfulEntityRecognitionRequest.json b/specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulEntityRecognitionRequest.json similarity index 99% rename from specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfulEntityRecognitionRequest.json rename to specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulEntityRecognitionRequest.json index d4bf046440b1..52308cb8f401 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfulEntityRecognitionRequest.json +++ b/specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulEntityRecognitionRequest.json @@ -1,4 +1,6 @@ { + "operationId": "AnalyzeText", + "title": "SuccessfulEntityRecognitionRequest", "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", "api-version": "2023-11-15-preview", diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfulHealthcareDocumentTypePostRequest.json b/specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulHealthcareDocumentTypePostRequest.json similarity index 89% rename from specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfulHealthcareDocumentTypePostRequest.json rename to specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulHealthcareDocumentTypePostRequest.json index a47c95e733c6..c264abd4fb2a 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfulHealthcareDocumentTypePostRequest.json +++ b/specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulHealthcareDocumentTypePostRequest.json @@ -1,4 +1,6 @@ { + "operationId": "AnalyzeTextSubmitJob", + "title": "SuccessfulHealthcareDocumentTypePostRequest", "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", "api-version": "2023-11-15-preview", diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfulHealthcareDocumentTypeTaskStatusRequest.json b/specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulHealthcareDocumentTypeTaskStatusRequest.json similarity index 99% rename from specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfulHealthcareDocumentTypeTaskStatusRequest.json rename to specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulHealthcareDocumentTypeTaskStatusRequest.json index f0176cff658a..8f4eb4add2d5 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfulHealthcareDocumentTypeTaskStatusRequest.json +++ b/specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulHealthcareDocumentTypeTaskStatusRequest.json @@ -1,4 +1,6 @@ { + "operationId": "AnalyzeTextJobStatus", + "title": "SuccessfulHealthcareDocumentTypeTaskStatusRequest", "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", "api-version": "2023-11-15-preview", diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfulHealthcarePostRequest.json b/specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulHealthcarePostRequest.json similarity index 89% rename from specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfulHealthcarePostRequest.json rename to specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulHealthcarePostRequest.json index 91c0164318d3..31a4760e3ced 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfulHealthcarePostRequest.json +++ b/specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulHealthcarePostRequest.json @@ -1,4 +1,6 @@ { + "operationId": "AnalyzeTextSubmitJob", + "title": "SuccessfulHealthcarePostRequest", "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", "api-version": "2023-11-15-preview", diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfulHealthcareTaskStatusRequest.json b/specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulHealthcareTaskStatusRequest.json similarity index 98% rename from specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfulHealthcareTaskStatusRequest.json rename to specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulHealthcareTaskStatusRequest.json index e79504e40b55..84e3456b91af 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfulHealthcareTaskStatusRequest.json +++ b/specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulHealthcareTaskStatusRequest.json @@ -1,4 +1,6 @@ { + "operationId": "AnalyzeTextJobStatus", + "title": "SuccessfulHealthcareTaskStatusRequest", "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", "api-version": "2023-11-15-preview", diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfulKeyPhraseExtractionRequest.json b/specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulKeyPhraseExtractionRequest.json similarity index 95% rename from specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfulKeyPhraseExtractionRequest.json rename to specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulKeyPhraseExtractionRequest.json index 33b5bf48d597..f73ec364952d 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfulKeyPhraseExtractionRequest.json +++ b/specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulKeyPhraseExtractionRequest.json @@ -1,4 +1,6 @@ { + "operationId": "AnalyzeText", + "title": "SuccessfulKeyPhraseExtractionRequest", "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", "api-version": "2023-11-15-preview", diff --git a/specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulLanguageDetectionRequest.json b/specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulLanguageDetectionRequest.json new file mode 100644 index 000000000000..efaaaefe3fb2 --- /dev/null +++ b/specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulLanguageDetectionRequest.json @@ -0,0 +1,93 @@ +{ + "operationId": "AnalyzeText", + "title": "SuccessfulLanguageDetectionRequest", + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "api-version": "2023-11-15-preview", + "Endpoint": "{Endpoint}", + "body": { + "kind": "LanguageDetection", + "parameters": { + "modelVersion": "latest" + }, + "analysisInput": { + "documents": [ + { + "id": "1", + "text": "Hello world" + }, + { + "id": "2", + "text": "Bonjour tout le monde" + }, + { + "id": "3", + "text": "Hola mundo" + }, + { + "id": "4", + "text": "Tumhara naam kya hai?" + } + ] + } + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "kind": "LanguageDetectionResults", + "results": { + "documents": [ + { + "detectedLanguage": { + "confidenceScore": 1, + "iso6391Name": "en", + "name": "English", + "script": "Latin", + "scriptCode": "Latn" + }, + "id": "1", + "warnings": [] + }, + { + "detectedLanguage": { + "confidenceScore": 1, + "iso6391Name": "fr", + "name": "French", + "script": "Latin", + "scriptCode": "Latn" + }, + "id": "2", + "warnings": [] + }, + { + "detectedLanguage": { + "confidenceScore": 1, + "iso6391Name": "es", + "name": "Spanish", + "script": "Latin", + "scriptCode": "Latn" + }, + "id": "3", + "warnings": [] + }, + { + "detectedLanguage": { + "confidenceScore": 1, + "iso6391Name": "hi", + "name": "Hindi", + "script": "Latin", + "scriptCode": "Latn" + }, + "id": "4", + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2023-12-01" + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfulPiiEntityRecognitionExclusionRequest.json b/specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulPiiEntityRecognitionExclusionRequest.json similarity index 95% rename from specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfulPiiEntityRecognitionExclusionRequest.json rename to specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulPiiEntityRecognitionExclusionRequest.json index 8570dfbf6e5f..f44e76a676b5 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfulPiiEntityRecognitionExclusionRequest.json +++ b/specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulPiiEntityRecognitionExclusionRequest.json @@ -1,4 +1,6 @@ { + "operationId": "AnalyzeText", + "title": "SuccessfulPiiEntityRecognitionExclusionRequest", "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", "api-version": "2023-11-15-preview", diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfulPiiEntityRecognitionRedactionRequest.json b/specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulPiiEntityRecognitionRedactionRequest.json similarity index 96% rename from specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfulPiiEntityRecognitionRedactionRequest.json rename to specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulPiiEntityRecognitionRedactionRequest.json index 783adf123d2e..931de9af85f3 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfulPiiEntityRecognitionRedactionRequest.json +++ b/specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulPiiEntityRecognitionRedactionRequest.json @@ -1,4 +1,6 @@ { + "operationId": "AnalyzeText", + "title": "SuccessfulPiiEntityRecognitionRedactionRequest", "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", "api-version": "2023-11-15-preview", diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfulPiiEntityRecognitionRequest.json b/specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulPiiEntityRecognitionRequest.json similarity index 96% rename from specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfulPiiEntityRecognitionRequest.json rename to specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulPiiEntityRecognitionRequest.json index a8197963b1f3..3ea26c912e46 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfulPiiEntityRecognitionRequest.json +++ b/specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulPiiEntityRecognitionRequest.json @@ -1,4 +1,6 @@ { + "operationId": "AnalyzeText", + "title": "SuccessfulPiiEntityRecognitionRequest", "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", "api-version": "2023-11-15-preview", diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfulSentimentAnalysisRequest.json b/specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulSentimentAnalysisRequest.json similarity index 98% rename from specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfulSentimentAnalysisRequest.json rename to specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulSentimentAnalysisRequest.json index a3f3a27f1152..58ba6ab3dff5 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/text/SuccessfulSentimentAnalysisRequest.json +++ b/specification/cognitiveservices/Language.AnalyzeText/examples/2023-11-15-preview/SuccessfulSentimentAnalysisRequest.json @@ -1,4 +1,6 @@ { + "operationId": "AnalyzeText", + "title": "SuccessfulSentimentAnalysisRequest", "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", "api-version": "2023-11-15-preview", diff --git a/specification/cognitiveservices/Language.AnalyzeText/main.tsp b/specification/cognitiveservices/Language.AnalyzeText/main.tsp new file mode 100644 index 000000000000..c276f5a7bdda --- /dev/null +++ b/specification/cognitiveservices/Language.AnalyzeText/main.tsp @@ -0,0 +1,110 @@ +import "@typespec/rest"; +import "@typespec/http"; +import "@typespec/versioning"; +import "@azure-tools/typespec-azure-core"; +import "./models/common.models.tsp"; +import "./models/custom.text.tsp"; +import "./models/entity.linking.tsp"; +import "./models/entity.recognition.tsp"; +import "./models/healthcare.tsp"; +import "./models/key.phrase.extraction.tsp"; +import "./models/language.detection.tsp"; +import "./models/pii.entity.recognition.tsp"; +import "./models/sentiment.analysis.tsp"; +import "./models/summarization.tsp"; +import "./models/custom.healthcare.tsp"; + +using TypeSpec.Http; +using TypeSpec.Rest; +using TypeSpec.Versioning; +using Azure.Core; +using Azure.Core.Traits; + +/** The language service API is a suite of natural language processing (NLP) skills 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, language detection and question answering. Further documentation can be found in https://docs.microsoft.com/azure/cognitive-services/language-service/overview.0 */ +@useAuth( + TypeSpec.Http.ApiKeyAuth< + TypeSpec.Http.ApiKeyLocation.header, + "Ocp-Apim-Subscription-Key" + > +) +@service({ + title: "Microsoft Cognitive Language Service - Text Analysis", +}) +@server( + "{Endpoint}/language", + "Single server endpoint", + { + /** Supported Cognitive Services endpoint (e.g., https://.api.cognitiveservices.azure.com). */ + Endpoint: string, + } +) +@versioned(Versions) +namespace Language.AnalyzeText; + +/** Analyze Conversations Service Versions */ +enum Versions { + /** Version 2022-05-01 */ + @useDependency(Azure.Core.Versions.v1_0_Preview_2) + v2022_05_01: "2022-05-01", + + /** Version 2023-04-01 */ + @useDependency(Azure.Core.Versions.v1_0_Preview_2) + v2023_04_01: "2023-04-01", + + /** Version 2023-11-15-preview */ + @useDependency(Azure.Core.Versions.v1_0_Preview_2) + v2023_11_15_preview: "2023-11-15-preview", +} + +alias ServiceTraits = NoRepeatableRequests & + NoConditionalRequests & + NoClientRequestId; + +alias languageOperations = ResourceOperations; + +/** Request text analysis over a collection of documents. */ +#suppress "@azure-tools/typespec-azure-core/use-standard-operations" +@post +@route("/:analyze-text") +op analyzeText is RpcOperation< + AnalyzeTextTask & AnalyzeTextQueryParameters, + AnalyzeTextTaskResult, + {}, + ErrorResponse +>; + +/** Get the status of an analysis job. A job can consist of one or more tasks. After all tasks succeed, the job transitions to the succeeded state and results are available for each task. */ +#suppress "@azure-tools/typespec-azure-core/use-standard-operations" +@summary("Get analysis status and results") +op analyzeTextJobStatus is languageOperations.ResourceRead< + AnalyzeTextJobState, + AnalyzeTextJobQueryParameters +>; + +/** Submit a collection of text documents for analysis. Specify one or more unique tasks to be executed as a long-running operation. */ +#suppress "@azure-tools/typespec-azure-core/use-standard-operations" +@route("/analyze-text/jobs") +@pollingOperation(analyzeTextJobStatus) +op analyzeTextSubmitJob is Foundations.LongRunningOperation< + AnalyzeTextJobsInput, + AcceptedResponse, + {}, + ErrorResponse +>; + +/** Cancel a long-running Text Analysis job. */ +#suppress "@azure-tools/typespec-azure-core/use-standard-operations" +@summary("Cancel a long-running Text Analysis job.") +@pollingOperation(analyzeTextJobStatus) +@route("/analyze-text/jobs/{jobId}:cancel") +@post +op analyzeTextCancelJob is Foundations.LongRunningOperation< + { + /** The job ID to cancel. */ + @path + jobId: uuid; + }, + AcceptedResponse, + {}, + ErrorResponse +>; diff --git a/specification/cognitiveservices/Language.AnalyzeText/models/common.models.tsp b/specification/cognitiveservices/Language.AnalyzeText/models/common.models.tsp new file mode 100644 index 000000000000..052df856037a --- /dev/null +++ b/specification/cognitiveservices/Language.AnalyzeText/models/common.models.tsp @@ -0,0 +1,856 @@ +import "@typespec/http"; +import "@typespec/rest"; +import "@typespec/versioning"; +import "@azure-tools/typespec-client-generator-core"; + +using Azure.ClientGenerator.Core; +using TypeSpec.Http; +using TypeSpec.Rest; +using TypeSpec.Versioning; +using Azure.Core; +using Azure.Core.Traits; + +namespace Language.AnalyzeText; + +/** These are the [Azure Active Directory OAuth2](https://docs.microsoft.com/azure/active-directory/develop/v1-overview) Flows. When paired with [Azure role-based access](https://docs.microsoft.com/azure/role-based-access-control/overview) control it can be used to control access to Azure Maps REST APIs. Azure role-based access controls are used to designate access to one or more Azure Maps resource account or sub-resources. Any user, group, or service principal can be granted access via a built-in role or a custom role composed of one or more permissions to Azure Maps REST APIs.\n\nTo implement scenarios, we recommend viewing [authentication concepts](https://aka.ms/amauth). In summary, this security definition provides a solution for modeling application(s) via objects capable of access control on specific APIs and scopes.\n\n#### Notes\n* This security definition **requires** the use of the `x-ms-client-id` header to indicate which Azure Maps resource the application is requesting access to. This can be acquired from the [Maps management API](https://aka.ms/amauthdetails).\n* \nThe `Authorization URL` is specific to the Azure public cloud instance. Sovereign clouds have unique Authorization URLs and Azure Active directory configurations. \n* \nThe Azure role-based access control is configured from the [Azure management plane](https://aka.ms/amrbac) via Azure portal, PowerShell, CLI, Azure SDKs, or REST APIs.\n* \nUsage of the [Azure Maps Web SDK](https://aka.ms/amaadmc) allows for configuration based setup of an application for multiple use cases.\n* Currently, Azure Active Directory [v1.0 or v2.0](https://docs.microsoft.com/azure/active-directory/develop/azure-ad-endpoint-comparison) supports Work, School, and Guests but does not support Personal accounts. */ +#suppress "@azure-tools/typespec-azure-core/casing-style" "The names of Model types must use PascalCase" +model AADToken + is OAuth2Auth<[ + { + type: OAuth2FlowType.implicit; + authorizationUrl: "https://login.microsoftonline.com/common/oauth2/authorize"; + scopes: ["https://cognitiveservices.azure.com/.default"]; + } + ]>; + +/** The kind of the analyze-text tasks supported. */ +union AnalyzeTextTaskKind { + string, + + /** Sentiment analysis task */ + SentimentAnalysis: "SentimentAnalysis", + + /** Entity recognition task */ + EntityRecognition: "EntityRecognition", + + /** PII entity recognition task */ + PiiEntityRecognition: "PiiEntityRecognition", + + /** Key phrase extraction task */ + KeyPhraseExtraction: "KeyPhraseExtraction", + + /** Language detection task */ + LanguageDetection: "LanguageDetection", + + /** Entity linking task */ + EntityLinking: "EntityLinking", + + /** Dynamic classification task */ + @added(Versions.v2023_11_15_preview) + DynamicClassification: "DynamicClassification", +} + +/** The kind of the long running analyze text tasks supported. */ +union AnalyzeTextLROTaskKind { + string, + + /** Sentiment analysis task */ + SentimentAnalysis: "SentimentAnalysis", + + /** Entity recognition task */ + EntityRecognition: "EntityRecognition", + + /** PII entity recognition task */ + PiiEntityRecognition: "PiiEntityRecognition", + + /** Key phrase extraction task */ + KeyPhraseExtraction: "KeyPhraseExtraction", + + /** Entity linking task */ + EntityLinking: "EntityLinking", + + /** Healthcare task */ + Healthcare: "Healthcare", + + /** Custom entity recognition task */ + CustomEntityRecognition: "CustomEntityRecognition", + + /** Custom single label classification task */ + CustomSingleLabelClassification: "CustomSingleLabelClassification", + + /** Custom multi label classification task */ + CustomMultiLabelClassification: "CustomMultiLabelClassification", + + /** Extractive summarization task */ + @added(Versions.v2023_04_01) + ExtractiveSummarization: "ExtractiveSummarization", + + /** Abstractive summarization task */ + @added(Versions.v2023_04_01) + AbstractiveSummarization: "AbstractiveSummarization", + + /** Custom healthcare task */ + @added(Versions.v2023_11_15_preview) + CustomHealthcare: "CustomHealthcare", + + /** Custom sentiment analysis task */ + @added(Versions.v2023_11_15_preview) + CustomSentimentAnalysis: "CustomSentimentAnalysis", + + /** Custom abstractive summarization task */ + @added(Versions.v2023_11_15_preview) + CustomAbstractiveSummarization: "CustomAbstractiveSummarization", +} + +/** The kind of the response object returned by the analyze-text task. */ +union AnalyzeTextTaskResultsKind { + string, + + /** Sentiment analysis results */ + SentimentAnalysisResults: "SentimentAnalysisResults", + + /** Entity recognition results */ + EntityRecognitionResults: "EntityRecognitionResults", + + /** PII entity recognition results */ + PiiEntityRecognitionResults: "PiiEntityRecognitionResults", + + /** Key phrase extraction results */ + KeyPhraseExtractionResults: "KeyPhraseExtractionResults", + + /** Language detection results */ + LanguageDetectionResults: "LanguageDetectionResults", + + /** Entity linking results */ + EntityLinkingResults: "EntityLinkingResults", + + /** Dynamic classification results */ + @added(Versions.v2023_11_15_preview) + DynamicClassificationResults: "DynamicClassificationResults", +} + +/** The kind of the response object returned by the analyze-text long running task. */ +union AnalyzeTextLROResultsKind { + string, + + /** Sentiment analysis LRO results */ + SentimentAnalysisLROResults: "SentimentAnalysisLROResults", + + /** Entity recognition LRO results */ + EntityRecognitionLROResults: "EntityRecognitionLROResults", + + /** PII entity recognition LRO results */ + PiiEntityRecognitionLROResults: "PiiEntityRecognitionLROResults", + + /** Key phrase extraction LRO results */ + KeyPhraseExtractionLROResults: "KeyPhraseExtractionLROResults", + + /** Entity linking LRO results */ + EntityLinkingLROResults: "EntityLinkingLROResults", + + /** Healthcare LRO results */ + HealthcareLROResults: "HealthcareLROResults", + + /** Custom entity recognition LRO results */ + CustomEntityRecognitionLROResults: "CustomEntityRecognitionLROResults", + + /** Custom single label classification LRO results */ + CustomSingleLabelClassificationLROResults: "CustomSingleLabelClassificationLROResults", + + /** Custom multi label classification LRO results */ + CustomMultiLabelClassificationLROResults: "CustomMultiLabelClassificationLROResults", + + /** Extractive summarization LRO results */ + @added(Versions.v2023_04_01) + ExtractiveSummarizationLROResults: "ExtractiveSummarizationLROResults", + + /** Abstractive summarization LRO results */ + @added(Versions.v2023_04_01) + AbstractiveSummarizationLROResults: "AbstractiveSummarizationLROResults", + + /** Custom healthcare LRO results */ + @added(Versions.v2023_11_15_preview) + CustomHealthcareLROResults: "CustomHealthcareLROResults", + + /** Custom sentiment analysis LRO results */ + @added(Versions.v2023_11_15_preview) + CustomSentimentAnalysisLROResults: "CustomSentimentAnalysisLROResults", + + /** Custom abstractive summarization LRO results */ + @added(Versions.v2023_11_15_preview) + CustomAbstractiveSummarizationLROResults: "CustomAbstractiveSummarizationLROResults", +} + +/** Collection of input documents to be analyzed by the service. */ +model MultiLanguageAnalysisInput { + /** The input documents to be analyzed. */ + documents?: Array; +} + +/** Collection of documents to analyze and a single task to execute. */ +@discriminator("kind") +model AnalyzeTextTask { + /** The kind of task to perform. */ + kind: AnalyzeTextTaskKind; +} +/** The long running task to be performed by the service on the input documents. */ +#suppress "@azure-tools/typespec-azure-core/casing-style" +@discriminator("kind") +model AnalyzeTextLROTask is TaskIdentifier { + /** The kind of task to perform. */ + kind: AnalyzeTextLROTaskKind; +} + +/** The result object for the analyze task. */ +@discriminator("kind") +model AnalyzeTextTaskResult { + /** The kind of task result. */ + kind: AnalyzeTextTaskResultsKind; +} + +/** The input object for the analyze text LRO. */ +model AnalyzeTextJobsInput { + /** Name for the task. */ + displayName?: string; + + /** Contains the input to be analyzed. */ + analysisInput: MultiLanguageAnalysisInput; + + /** List of tasks to be performed as part of the LRO. */ + tasks: Array; + + /** Default language to use for records requesting automatic language detection. */ + @added(Versions.v2023_11_15_preview) + defaultLanguage?: string; +} + +/** The input object for the prebuilt/default result. */ +model AnalyzeTextPreBuiltResult { + /** Errors by document id. */ + errors: Array; + + /** if showStats=true was specified in the request this field will contain information about the request payload. */ + statistics?: RequestStatistics; + + /** This field indicates which model is used for analysis. */ + modelVersion: string; +} + +/** The object containing the analyze job LRO job state. */ +@resource("analyze-text/jobs") +model AnalyzeTextJobState { + ...JobState; + ...TasksState; + ...AnalyzeTextJobStatistics; +} + +/** Contains the pagination information. */ +model Pagination { + /** The nextLink for getting the next paginated response. */ + nextLink?: string; +} + +/** Contains the analyze text LRO errors */ +model AnalyzeTextJobErrors { + /** Collection of errors encountered during processing. */ + errors: Array; +} + +/** Contains the analyze text job statistics returned only when showStats=true. */ +model AnalyzeTextJobStatistics { + /** if showStats=true was specified in the request this field will contain information about the request payload. */ + statistics?: RequestStatistics; +} + +/** Contains the analyze text job tasks. */ +model TasksState { + /** List of tasks. */ + tasks: Tasks; +} + +/** Container for the tasks status for the LRO job. */ +model Tasks { + /** Count of completed tasks. */ + completed: int32; + + /** Count of failed tasks. */ + failed: int32; + + /** Count of inprogress tasks. */ + inProgress: int32; + + /** Count of total tasks. */ + total: int32; + + /** Enumerable of Analyze text job results. */ + items?: Array; +} + +/** List of job statuses. */ +union Status { + string, + + /** Not started status */ + notStarted: "notStarted", + + /** Running status */ + running: "running", + + /** Succeeded status */ + succeeded: "succeeded", + + /** Failed status */ + failed: "failed", + + /** Cancelled status */ + cancelled: "cancelled", + + /** Cancelling status */ + cancelling: "cancelling", +} + +/** Contains the AnalyzeText long running operation result object. */ +#suppress "@azure-tools/typespec-azure-core/casing-style" +@discriminator("kind") +model AnalyzeTextLROResult { + ...TaskState; + ...TaskIdentifier; + + /** Kind of the task. */ + kind: AnalyzeTextLROResultsKind; +} + +/** Contains the result object for the processed document. */ +model DocumentResult { + /** Unique, non-empty document identifier. */ + id: string; + + /** Warnings encountered while processing document. */ + warnings: Array; + + /** if showStats=true was specified in the request this field will contain information about the document payload. */ + statistics?: DocumentStatistics; +} + +/** Contains the error object with errors encountered for the processed document. */ +model AnalyzeTextDocumentError { + /** Document Id. */ + id: string; + + /** Document Error. */ + error: Error; +} + +/** Contains the warnings object with warnings encountered for the processed document. */ +model DocumentWarning { + /** Warning code. */ + code: WarningCodeValue; + + /** Warning message. */ + message: string; + + /** A JSON pointer reference indicating the target object. */ + targetRef?: string; +} + +/** Defines the list of the warning codes. */ +union WarningCodeValue { + string, + + /** Long words in document warning */ + LongWordsInDocument: "LongWordsInDocument", + + /** Document truncated warning */ + DocumentTruncated: "DocumentTruncated", +} + +/** if showStats=true was specified in the request this field will contain information about the document payload. */ +model DocumentStatistics { + /** Number of text elements recognized in the document. */ + charactersCount: int32; + + /** Number of transactions for the document. */ + transactionsCount: int32; +} + +/** Contains an input document to be analyzed by the service. */ +model MultiLanguageInput { + /** A unique, non-empty document identifier. */ + id: string; + + /** The input text to process. */ + text: string; + + /** (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. (Following only applies to 2023-04-15-preview and above) For Auto Language Detection, use \"auto\". If not set, use \"en\" for English as default. */ + language?: string; +} + +/** Defines the detected language for the document. */ +@added(Versions.v2023_11_15_preview) +model DocumentDetectedLanguage { + /** If 'language' is set to 'auto' for the document in the request this field will contain a 2 letter ISO 639-1 representation of the language detected for this document. */ + detectedLanguage?: DetectedLanguage; +} + +/** Error response. */ +@error +model ErrorResponse is Azure.Core.Foundations.ErrorResponseBase; + +/** An object containing more specific information about the error. As per Microsoft One API guidelines - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses. */ +model InnerErrorModel { + /** One of a server-defined set of error codes. */ + code: InnerErrorCode; + + /** Error message. */ + message: string; + + /** Error details. */ + details?: Record; + + /** Error target. */ + target?: string; + + /** An object containing more specific information than the current object about the error. */ + innererror?: InnerErrorModel; +} + +/** Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see https://aka.ms/text-analytics-offsets. */ +union StringIndexType { + string, + + /** Returned offset and length values will correspond to TextElements (Graphemes and Grapheme clusters) confirming to the Unicode 8.0.0 standard. Use this option if your application is written in .Net Framework or .Net Core and you will be using StringInfo. */ + TextElements_v8: "TextElements_v8", + + /** Returned offset and length values will correspond to Unicode code points. Use this option if your application is written in a language that support Unicode, for example Python. */ + UnicodeCodePoint: "UnicodeCodePoint", + + /** Returned offset and length values will correspond to UTF-16 code units. Use this option if your application is written in a language that support Unicode, for example Java, JavaScript. */ + Utf16CodeUnit: "Utf16CodeUnit", +} + +/** Returns the current state of the task. */ +model TaskState { + /** The last updated time in UTC for the task. */ + lastUpdateDateTime: utcDateTime; + + /** The status of the task at the mentioned last update time. */ + status: State; +} + +/** The status of the task at the mentioned last update time. */ +@lroStatus +union State { + string, + + /** Not started status */ + notStarted: "notStarted", + + /** Running status */ + running: "running", + + /** Succeeded status */ + @lroSucceeded + succeeded: "succeeded", + + /** Partially completed status */ + partiallyCompleted: "partiallyCompleted", + + /** Failed status */ + @lroFailed + failed: "failed", + + /** Cancelled status */ + @lroCanceled + cancelled: "cancelled", + + /** Cancelling status */ + cancelling: "cancelling", +} + +/** Base task object. */ +model TaskIdentifier { + /** task name */ + taskName?: string; +} + +/** Base parameters object for a text analysis task. */ +model TaskParameters { + /** logging opt out */ + loggingOptOut?: boolean = false; +} + +/** Parameters object for a text analysis task using pre-built models. */ +model PreBuiltTaskParameters is TaskParameters { + /** model version */ + modelVersion?: string = "latest"; +} + +alias ShowStatsQueryParameter = QueryParametersTrait<{ + /** (Optional) if set to true, response will contain request and document level statistics. */ + @query + showStats?: boolean; +}>; + +alias AnalyzeTextJobQueryParameters = QueryParametersTrait<{ + /** (Optional) if set to true, response will contain request and document level statistics. */ + @query + showStats?: boolean; + + /** The maximum number of resources to return from the collection. */ + @query + top?: int32; + + /** An offset into the collection of the first resource to be returned. */ + @query + skip?: int32; +}>; + +alias AnalyzeTextQueryParameters = { + /** (Optional) if set to true, response will contain request and document level statistics. */ + @query + showStats?: boolean; +}; + +/** job state */ +model JobState { + /** display name */ + displayName?: string; + + /** Date and time job created */ + createdDateTime: utcDateTime; + + /** Date and time job expires */ + expirationDateTime?: utcDateTime; + + /** job ID */ + @key + @visibility("read") + jobId: uuid; + + /** last updated date and time */ + lastUpdatedDateTime: utcDateTime; + + /** status */ + status: State; + + /** errors */ + errors?: Array; + + /** next link */ + nextLink?: string; +} + +/** job errors */ +model JobErrors { + /** errors */ + errors?: Array; +} + +/** Contains details of errors encountered during a job execution. */ +model DocumentError { + /** The ID of the input document. */ + id: string; + + /** Error encountered. */ + error: Error; +} + +/** Contains details of warnings encountered during a job execution. */ +model InputWarning { + /** Warning code. */ + code: string; + + /** Warning message. */ + message: string; + + /** A JSON pointer reference indicating the target object. */ + targetRef?: string; +} + +/** if showStats=true was specified in the request this field will contain information about the request payload. */ +model RequestStatistics { + /** Number of documents submitted in the request. */ + documentsCount: int32; + + /** Number of valid documents. This excludes empty, over-size limit or non-supported languages documents. */ + validDocumentsCount: int32; + + /** Number of invalid documents. This includes empty, over-size limit or non-supported languages documents. */ + erroneousDocumentsCount: int32; + + /** Number of transactions for the request. */ + transactionsCount: int64; +} + +/** Pre built result */ +model PreBuiltResult { + /** Errors by document id. */ + errors: Array; + + /** if showStats=true was specified in the request this field will contain information about the request payload. */ + statistics?: RequestStatistics; + + /** This field indicates which model is used for scoring. */ + modelVersion: string; +} + +/** Human-readable error code. */ +union InnerErrorCode { + string, + + /** Invalid request error */ + InvalidRequest: "InvalidRequest", + + /** Invalid parameter value error */ + InvalidParameterValue: "InvalidParameterValue", + + /** Knowledge base not found error */ + KnowledgeBaseNotFound: "KnowledgeBaseNotFound", + + /** Azure Cognitive Search not found error */ + AzureCognitiveSearchNotFound: "AzureCognitiveSearchNotFound", + + /** Azure Cognitive Search throttling error */ + AzureCognitiveSearchThrottling: "AzureCognitiveSearchThrottling", + + /** Extraction failure error */ + ExtractionFailure: "ExtractionFailure", + + /** Invalid request body format error */ + InvalidRequestBodyFormat: "InvalidRequestBodyFormat", + + /** Empty request error */ + EmptyRequest: "EmptyRequest", + + /** Missing input documents error */ + MissingInputDocuments: "MissingInputDocuments", + + /** Invalid document error */ + InvalidDocument: "InvalidDocument", + + /** Model version incorrect error */ + ModelVersionIncorrect: "ModelVersionIncorrect", + + /** Invalid document batch error */ + InvalidDocumentBatch: "InvalidDocumentBatch", + + /** Unsupported language code error */ + UnsupportedLanguageCode: "UnsupportedLanguageCode", + + /** Invalid country hint error */ + InvalidCountryHint: "InvalidCountryHint", +} + +/** Human-readable error code. */ +union ErrorCode { + string, + + /** Invalid request error */ + InvalidRequest: "InvalidRequest", + + /** Invalid argument error */ + InvalidArgument: "InvalidArgument", + + /** Unauthorized access error */ + Unauthorized: "Unauthorized", + + /** Forbidden access error */ + Forbidden: "Forbidden", + + /** Not found error */ + NotFound: "NotFound", + + /** Project not found error */ + ProjectNotFound: "ProjectNotFound", + + /** Operation not found error */ + OperationNotFound: "OperationNotFound", + + /** Azure Cognitive Search not found error */ + AzureCognitiveSearchNotFound: "AzureCognitiveSearchNotFound", + + /** Azure Cognitive Search index not found error */ + AzureCognitiveSearchIndexNotFound: "AzureCognitiveSearchIndexNotFound", + + /** Too many requests error */ + TooManyRequests: "TooManyRequests", + + /** Azure Cognitive Search throttling error */ + AzureCognitiveSearchThrottling: "AzureCognitiveSearchThrottling", + + /** Azure Cognitive Search index limit reached error */ + AzureCognitiveSearchIndexLimitReached: "AzureCognitiveSearchIndexLimitReached", + + /** Internal server error */ + InternalServerError: "InternalServerError", + + /** Service unavailable error */ + ServiceUnavailable: "ServiceUnavailable", + + /** Timeout error */ + Timeout: "Timeout", + + /** Quota exceeded error */ + QuotaExceeded: "QuotaExceeded", + + /** Conflict error */ + Conflict: "Conflict", + + /** Warning error */ + Warning: "Warning", +} + +/** Predicted sentiment for document (Negative, Neutral, Positive, or Mixed). */ +#suppress "@azure-tools/typespec-azure-core/no-closed-literal-union" // defined as closed enum +union DocumentSentimentValue { + /** Positive statement */ + positive: "positive", + + /** Neutral statement */ + neutral: "neutral", + + /** Negative statement */ + negative: "negative", + + /** Mixed statement */ + mixed: "mixed", +} + +/** Represents the confidence scores between 0 and 1 across all sentiment classes: positive, neutral, negative. */ +model SentimentConfidenceScores { + /** Confidence score for positive sentiment */ + positive: float64; + + /** Confidence score for neutral sentiment */ + neutral: float64; + + /** Confidence score for negative sentiment */ + negative: float64; +} + +/** Enum that defines the length of the output summaries. */ +@added(Versions.v2023_11_15_preview) +union SummaryLengthBucket { + string, + + /** Instructs model to generate shorter length summaries. */ + short: "short", + + /** Instructs model to generate medium length summaries. */ + medium: "medium", + + /** Instructs model to generate longer length summaries. */ + long: "long", +} + +/** Supported parameters for an Abstractive Summarization task. */ +@added(Versions.v2023_04_01) +model AbstractiveSummarizationTaskParametersBase { + /** Controls the approximate number of sentences in the output summaries. */ + sentenceCount?: int32; + + /** String index type */ + stringIndexType?: StringIndexType = StringIndexType.TextElements_v8; + + /** (NOTE: Recommended to use summaryLength over sentenceCount) Controls the approximate length of the output summaries. */ + @added(Versions.v2023_11_15_preview) + summaryLength?: SummaryLengthBucket; +} + +/** The context of the summary. */ +model SummaryContext { + /** Start position for the context. Use of different 'stringIndexType' values can affect the offset returned. */ + offset: int32; + + /** The length of the context. Use of different 'stringIndexType' values can affect the length returned. */ + length: int32; +} + +/** Parameters object for a text analysis task using custom models. */ +model CustomTaskParameters is TaskParameters { + /** This field indicates the project name for the model. */ + projectName: string; + + /** This field indicates the deployment name for the model. */ + deploymentName: string; +} + +/** Custom Task Results */ +model CustomResult { + /** Errors by document id. */ + errors: Array; + + /** if showStats=true was specified in the request this field will contain information about the request payload. */ + statistics?: RequestStatistics; + + /** This field indicates the project name for the model. */ + projectName: string; + + /** This field indicates the deployment name for the model. */ + deploymentName: string; +} + +/** Optional parameter to use a Custom Character to be used for redaction in PII responses. Default character will be * as before. We allow specific ascii characters for redaction. */ +union redactionCharacter { + string, + + /** Exclamation point character */ + exclamationPoint: "!", + + /** Number sign character */ + numberSign: "#", + + /** Dollar sign character */ + dollar: "$", + + /** Percent sign character */ + perCent: "%", + + /** Ampersand character */ + ampersand: "&", + + /** Asterisk character */ + asterisk: "*", + + /** Plus sign character */ + plus: "+", + + /** Minus sign character */ + minus: "-", + + /** Equals sign character */ + equals: "=", + + /** Question mark character */ + questionMark: "?", + + /** At sign character */ + atSign: "@", + + /** Caret character */ + caret: "^", + + /** Underscore character */ + underscore: "_", + + /** Tilde character */ + tilde: "~", +} + +/** The error response object returned when the service encounters some errors during processing the request. */ +model Error { + /** One of a server-defined set of error codes. */ + code: ErrorCode; + + /** A human-readable representation of the error. */ + message: string; + + /** The target of the error. */ + target?: string; + + /** An array of details about specific errors that led to this reported error. */ + details?: Array; + + /** An object containing more specific information than the current object about the error. */ + innererror?: InnerErrorModel; +} diff --git a/specification/cognitiveservices/Language.AnalyzeText/models/custom.healthcare.tsp b/specification/cognitiveservices/Language.AnalyzeText/models/custom.healthcare.tsp new file mode 100644 index 000000000000..4c1fb9aabdbd --- /dev/null +++ b/specification/cognitiveservices/Language.AnalyzeText/models/custom.healthcare.tsp @@ -0,0 +1,65 @@ +import "@typespec/versioning"; + +using Azure.ClientGenerator.Core; +using TypeSpec.Versioning; + +namespace Language.AnalyzeText; +/** Supported parameters for a custom Healthcare task. */ +@added(Versions.v2023_11_15_preview) +model CustomHealthcareTaskParameters is CustomTaskParameters { + /** Optional parameter to provide the string index type used to interpret string offsets. Defaults to TextElements (Graphemes). */ + stringIndexType?: StringIndexType = StringIndexType.TextElements_v8; +} + +/** Contains the custom healthcare task definition. */ +#suppress "@azure-tools/typespec-azure-core/casing-style" +@added(Versions.v2023_11_15_preview) +model CustomHealthcareLROTask extends AnalyzeTextLROTask { + /** Kind of the task. */ + kind: AnalyzeTextLROTaskKind.CustomHealthcare; + + /** Contains the custom healthcare task parameters. */ + parameters?: CustomHealthcareTaskParameters; +} + +/** Contains the custom healthcare result for the request. */ +@added(Versions.v2023_11_15_preview) +model CustomHealthcareResult is CustomResult { + /** List of custom healthcare results for the document. */ + documents: Array; +} + +/** Contains the document custom healthcare results with detected language. */ +@added(Versions.v2023_11_15_preview) +model CustomHealthcareEntitiesDocumentResultWithDocumentDetectedLanguage + is CustomHealthcareEntitiesDocumentResult { + ...DocumentDetectedLanguage; +} + +/** Contains the document custom healthcare results. */ +@added(Versions.v2023_11_15_preview) +model CustomHealthcareEntitiesDocumentResult is DocumentResult { + /** Healthcare entities. */ + entities: Array; + + /** Healthcare entity relations. */ + relations: Array; +} + +/** Contains the custom healthcare entity. */ +@added(Versions.v2023_11_15_preview) +model CustomHealthcareEntity is HealthcareEntity { + /** (Optional) Entity component information listing fired components of the extracted entity. This object only applies for custom healthcare. */ + entityComponentInformation?: Array; +} + +/** Contains the custom healthcare job result. */ +#suppress "@azure-tools/typespec-azure-core/casing-style" +@added(Versions.v2023_11_15_preview) +model CustomHealthcareLROResult extends AnalyzeTextLROResult { + /** Kind of the task. */ + kind: AnalyzeTextLROResultsKind.CustomHealthcareLROResults; + + /** Contains the list of document results. */ + results: CustomHealthcareResult; +} diff --git a/specification/cognitiveservices/Language.AnalyzeText/models/custom.text.tsp b/specification/cognitiveservices/Language.AnalyzeText/models/custom.text.tsp new file mode 100644 index 000000000000..ee612ada5fcf --- /dev/null +++ b/specification/cognitiveservices/Language.AnalyzeText/models/custom.text.tsp @@ -0,0 +1,252 @@ +import "@typespec/rest"; +import "@typespec/http"; +import "@typespec/versioning"; +import "@azure-tools/typespec-client-generator-core"; + +using Azure.ClientGenerator.Core; +using TypeSpec.Http; +using TypeSpec.Rest; +using TypeSpec.Versioning; + +namespace Language.AnalyzeText; + +/** Supported parameters for a Custom Entities task. */ +model CustomEntitiesTaskParameters is CustomTaskParameters { + /** Optional parameter to provide the string index type used to interpret string offsets. Defaults to TextElements (Graphemes). */ + stringIndexType?: StringIndexType = StringIndexType.TextElements_v8; +} + +/** Contains the custom text LRO task. */ +#suppress "@azure-tools/typespec-azure-core/casing-style" +model CustomEntitiesLROTask extends AnalyzeTextLROTask { + /** Kind of the task. */ + kind: AnalyzeTextLROTaskKind.CustomEntityRecognition; + + /** task parameters. */ + parameters?: CustomEntitiesTaskParameters; +} + +/** Contains the list of detected custom entities result for the documents. */ +model CustomEntitiesResult is CustomResult { + /** Enumeration of the document results. */ + documents: Array; +} + +/** Contains the list of detected custom entities result for the documents along with detected language. */ +@added(Versions.v2023_11_15_preview) +model CustomEntitiesResultWithDocumentDetectedLanguage is CustomResult { + /** Enumeration of the document results with detected language. */ + documents: Array; +} + +/** Supported parameters for a Custom Single Classification task. */ +model CustomSingleLabelClassificationTaskParameters is CustomTaskParameters; + +/** Use custom models to classify text into single label taxonomy */ +#suppress "@azure-tools/typespec-azure-core/casing-style" +model CustomSingleLabelClassificationLROTask extends AnalyzeTextLROTask { + /** Kind of the task. */ + kind: AnalyzeTextLROTaskKind.CustomSingleLabelClassification; + + /** Task parameters */ + parameters?: CustomSingleLabelClassificationTaskParameters; +} + +/** Contains the custom label classification results. */ +model CustomLabelClassificationResult is CustomResult { + /** Response by document */ + documents: Array; +} + +/** Contains the custom label classification with detected language results. */ +@added(Versions.v2023_11_15_preview) +model CustomLabelClassificationResultWithDocumentDetectedLanguage + is CustomResult { + /** Response by document */ + documents: Array; +} + +/** Contains the classification result. */ +model ClassificationResult { + /** Classification type. */ + category: string; + + /** Confidence score between 0 and 1 of the recognized class. */ + confidenceScore: float64; +} + +/** Supported parameters for a Custom Multi Classification task. */ +model CustomMultiLabelClassificationTaskParameters is CustomTaskParameters; + +/** Use custom models to classify text into multi label taxonomy */ +#suppress "@azure-tools/typespec-azure-core/casing-style" +model CustomMultiLabelClassificationLROTask extends AnalyzeTextLROTask { + /** Kind of the task. */ + kind: AnalyzeTextLROTaskKind.CustomMultiLabelClassification; + + /** Task parameters. */ + parameters?: CustomMultiLabelClassificationTaskParameters; +} + +/** Contains the classification doc result for the task. */ +model ClassificationDocumentResult is DocumentResult { + /** Contains the classification doc results for all docs. */ + class: Array; +} + +/** Contains the classification doc result for the task with detected language. */ +model ClassificationDocumentResultWithDetectedLanguage + is ClassificationDocumentResult { + ...DocumentDetectedLanguage; +} + +/** Contains the custom entity recognition job result. */ +#suppress "@azure-tools/typespec-azure-core/casing-style" +model CustomEntityRecognitionLROResult extends AnalyzeTextLROResult { + /** Kind of the task. */ + kind: AnalyzeTextLROResultsKind.CustomEntityRecognitionLROResults; + + /** List of results. */ + @typeChangedFrom(Versions.v2023_11_15_preview, CustomEntitiesResult) + results: CustomEntitiesResultWithDocumentDetectedLanguage; +} + +/** Contains the custom single label classification job result. */ +#suppress "@azure-tools/typespec-azure-core/casing-style" +model CustomSingleLabelClassificationLROResult extends AnalyzeTextLROResult { + /** Kind of the task. */ + kind: AnalyzeTextLROResultsKind.CustomSingleLabelClassificationLROResults; + + /** List of results. */ + @typeChangedFrom( + Versions.v2023_11_15_preview, + CustomLabelClassificationResult + ) + results: CustomLabelClassificationResultWithDocumentDetectedLanguage; +} + +/** Contains the custom multi label classification job result. */ +#suppress "@azure-tools/typespec-azure-core/casing-style" +model CustomMultiLabelClassificationLROResult extends AnalyzeTextLROResult { + /** Kind of the task. */ + kind: AnalyzeTextLROResultsKind.CustomMultiLabelClassificationLROResults; + + /** List of results. */ + @typeChangedFrom( + Versions.v2023_11_15_preview, + CustomLabelClassificationResult + ) + results: CustomLabelClassificationResultWithDocumentDetectedLanguage; +} + +/** Contains the analyze text dynamic classifications input. */ +@added(Versions.v2023_11_15_preview) +model AnalyzeTextDynamicClassificationInput extends AnalyzeTextTask { + /** Kind of the task. */ + kind: AnalyzeTextTaskKind.DynamicClassification; + + /** Input to be analyzed. */ + analysisInput?: MultiLanguageAnalysisInput; + + /** Task parameters. */ + parameters?: DynamicClassificationTaskParameters; +} + +/** Contains the Dynamic Classification document result. */ +@added(Versions.v2023_11_15_preview) +model DynamicClassificationDocumentResult is DocumentResult { + /** Array of classification results. */ + classifications: Array; +} + +/** This object contains information of the detected entity components. The possible component types may expand in the future. Parsing code should handle unexpected values gracefully */ +@added(Versions.v2023_11_15_preview) +@discriminator("entityComponentKind") +model EntityComponentInformation { + /** Kind of entity component. */ + entityComponentKind: entityComponentKind; +} + +/** Kind of entity components supported. */ +@added(Versions.v2023_11_15_preview) +union entityComponentKind { + string, + + /** Prebuilt component */ + PrebuiltComponent: "PrebuiltComponent", + + /** Learned component */ + LearnedComponent: "LearnedComponent", + + /** List component */ + ListComponent: "ListComponent", +} + +/** This object contains information of the prebuilt component of the detected entity. */ +@added(Versions.v2023_11_15_preview) +model PrebuiltComponent extends EntityComponentInformation { + /** Kind of entity component. */ + entityComponentKind: entityComponentKind.PrebuiltComponent; + + /** The prebuilt component of an extracted entity type. */ + value?: string; +} + +/** This object contains information of the learned component of the detected entity. */ +@added(Versions.v2023_11_15_preview) +model LearnedComponent extends EntityComponentInformation { + /** Kind of entity component. */ + entityComponentKind: entityComponentKind.LearnedComponent; + + /** The learned component of an extracted entity type. */ + value?: string; +} + +/** This object contains information of the list component of the detected entity. */ +@added(Versions.v2023_11_15_preview) +model ListComponent extends EntityComponentInformation { + /** Kind of entity component. */ + entityComponentKind: entityComponentKind.ListComponent; + + /** The list key of an extracted entity type. */ + value?: string; +} + +/** Supported parameters for a Dynamic Classification task. */ +@added(Versions.v2023_11_15_preview) +model DynamicClassificationTaskParameters is PreBuiltTaskParameters { + /** Specifies either one or multiple categories per document. Defaults to multi classification which may return more than one class for each document. */ + classificationType?: ClassificationType = ClassificationType.Multi; + + /** a list of categories to which input is classified to. */ + categories: Array; +} + +/** Specifies either one or multiple categories per document. Defaults to multi classification which may return more than one class for each document. */ +@added(Versions.v2023_11_15_preview) +union ClassificationType { + string, + + /** Multi selection */ + Multi: "Multi", + + /** Single selection */ + Single: "Single", +} + +/** Contains the Dynamic Classification result. */ +@added(Versions.v2023_11_15_preview) +model DynamicClassificationResult is PreBuiltResult { + /** Response by document */ + documents: Array; +} + +/** Result for Dynamic Classification task. */ +@added(Versions.v2023_11_15_preview) +model DynamicClassificationTaskResult extends AnalyzeTextTaskResult { + /** Kind of task result */ + kind: AnalyzeTextTaskResultsKind.DynamicClassificationResults; + + /** Results for Dynamic Classification task */ + results: DynamicClassificationResult; +} diff --git a/specification/cognitiveservices/Language.AnalyzeText/models/entity.linking.tsp b/specification/cognitiveservices/Language.AnalyzeText/models/entity.linking.tsp new file mode 100644 index 000000000000..b4e43671fc75 --- /dev/null +++ b/specification/cognitiveservices/Language.AnalyzeText/models/entity.linking.tsp @@ -0,0 +1,116 @@ +import "@typespec/versioning"; +import "@azure-tools/typespec-client-generator-core"; + +using Azure.ClientGenerator.Core; +using TypeSpec.Versioning; + +namespace Language.AnalyzeText; + +/** Contains the analyze text Entity linking input. */ +model AnalyzeTextEntityLinkingInput extends AnalyzeTextTask { + /** Kind for Entity linking input. */ + kind: AnalyzeTextTaskKind.EntityLinking; + + /** Contains the analysis input to be handled by the service. */ + analysisInput?: MultiLanguageAnalysisInput; + + /** Task parameters. */ + parameters?: EntityLinkingTaskParameters; +} + +/** Supported parameters for an Entity Linking task. */ +model EntityLinkingTaskParameters is PreBuiltTaskParameters { + /** Optional parameter to provide the string index type used to interpret string offsets. Defaults to TextElements (Graphemes). */ + stringIndexType?: StringIndexType = StringIndexType.TextElements_v8; +} + +/** Contains the analyze text Entity linking LRO task. */ +#suppress "@azure-tools/typespec-azure-core/casing-style" +model EntityLinkingLROTask extends AnalyzeTextLROTask { + /** Kind of task result */ + kind: AnalyzeTextLROTaskKind.EntityLinking; + + /** Task parameters. */ + parameters?: EntityLinkingTaskParameters; +} + +/** Contains the analyze text Entity linking task result. */ +model EntityLinkingTaskResult extends AnalyzeTextTaskResult { + /** Kind of task result */ + kind: AnalyzeTextTaskResultsKind.EntityLinkingResults; + + /** Entity linking result. */ + results: EntityLinkingResult; +} + +/** Entity linking result. */ +model EntityLinkingResult is PreBuiltResult { + /** Response by document */ + @typeChangedFrom( + Versions.v2023_11_15_preview, + Array + ) + documents: Array; +} + +/** Entity linking document result. */ +model LinkedEntitiesDocumentResult is DocumentResult { + /** Recognized well known entities in the document. */ + entities: Array; +} + +/** Entity linking document result with auto language detection. */ +@added(Versions.v2023_11_15_preview) +model EntityLinkingResultWithDetectedLanguage { + ...LinkedEntitiesDocumentResult; + ...DocumentDetectedLanguage; +} + +/** The LinkedEntity object containing the detected entity with the associated sources/links. */ +model LinkedEntity { + /** Entity Linking formal name. */ + name: string; + + /** List of instances this entity appears in the text. */ + matches: Array; + + /** Language used in the data source. */ + language: string; + + /** Unique identifier of the recognized entity from the data source. */ + id?: string; + + /** URL for the entity's page from the data source. */ + url: string; + + /** Data source used to extract entity linking, such as Wiki/Bing etc. */ + dataSource: string; + + /** Bing Entity Search API unique identifier of the recognized entity. */ + bingId?: string; +} + +/** The Match object containing the detected entity text with the offset and the length. */ +model Match { + /** If a well known item is recognized, a decimal number denoting the confidence level between 0 and 1 will be returned. */ + confidenceScore: float64; + + /** Entity text as appears in the request. */ + text: string; + + /** Start position for the entity match text. */ + offset: int32; + + /** Length for the entity match text. */ + length: int32; +} + +/** Contains the analyze text Entity linking task LRO result. */ +#suppress "@azure-tools/typespec-azure-core/casing-style" +model EntityLinkingLROResult extends AnalyzeTextLROResult { + /** Kind of the task. */ + kind: AnalyzeTextLROResultsKind.EntityLinkingLROResults; + + /** Entity linking result. */ + results: EntityLinkingResult; +} diff --git a/specification/cognitiveservices/Language.AnalyzeText/models/entity.recognition.tsp b/specification/cognitiveservices/Language.AnalyzeText/models/entity.recognition.tsp new file mode 100644 index 000000000000..79a85d32bd4f --- /dev/null +++ b/specification/cognitiveservices/Language.AnalyzeText/models/entity.recognition.tsp @@ -0,0 +1,1203 @@ +import "@typespec/versioning"; +import "@azure-tools/typespec-client-generator-core"; + +using Azure.ClientGenerator.Core; +using TypeSpec.Versioning; + +namespace Language.AnalyzeText; + +/** The entity recognition analyze text input task request. */ +model AnalyzeTextEntityRecognitionInput extends AnalyzeTextTask { + /** The kind of task. */ + kind: AnalyzeTextTaskKind.EntityRecognition; + + /** The input to be analyzed. */ + analysisInput?: MultiLanguageAnalysisInput; + + /** Task parameters. */ + parameters?: EntitiesTaskParameters; +} + +/** Supported parameters for an Entity Recognition task. */ +model EntitiesTaskParameters is PreBuiltTaskParameters { + /** (Optional) parameter to provide the string index type used to interpret string offsets. Defaults to TextElements (Graphemes). */ + stringIndexType?: StringIndexType = StringIndexType.TextElements_v8; + + /** (Optional) request parameter that limits the output to the requested entity types included in this list. We will apply inclusionList before exclusionList */ + @added(Versions.v2023_11_15_preview) + inclusionList?: Array; + + /** (Optional) request parameter that filters out any entities that are included the excludeList. When a user specifies an excludeList, they cannot get a prediction returned with an entity in that list. We will apply inclusionList before exclusionList */ + @added(Versions.v2023_11_15_preview) + exclusionList?: Array; + + /** (Optional) describes the type of overlap policy to apply to the ner output. */ + @added(Versions.v2023_11_15_preview) + overlapPolicy?: BaseEntityOverlapPolicy; + + /** (Optional) request parameter that allows the user to provide settings for running the inference. */ + @added(Versions.v2023_11_15_preview) + inferenceOptions?: EntityInferenceOptions; +} + +/** An object representing the task definition for an Entities Recognition task. */ +#suppress "@azure-tools/typespec-azure-core/casing-style" +model EntitiesLROTask extends AnalyzeTextLROTask { + /** The kind of task. */ + kind: AnalyzeTextLROTaskKind.EntityRecognition; + + /** Task parameters. */ + parameters?: EntitiesTaskParameters; +} + +/** Contains the entity task */ +model EntitiesTaskResult extends AnalyzeTextTaskResult { + /** kind of the task */ + kind: AnalyzeTextTaskResultsKind.EntityRecognitionResults; + + /** Results for entity recognition. */ + results: EntitiesResult; +} + +/** Contains the entity recognition task result. */ +model EntitiesResult is PreBuiltResult { + /** Response by document */ + @typeChangedFrom(Versions.v2023_11_15_preview, Array) + documents: Array; +} + +/** Contains the entity recognition task result for the document. */ +model EntitiesDocumentResult is DocumentResult { + /** Recognized entities in the document. */ + entities: Array; +} + +/** Contains the entity recognition task result for the document with detected language. */ +@added(Versions.v2023_11_15_preview) +model EntitiesDocumentResultWithDetectedLanguage { + ...EntitiesDocumentResult; + ...DocumentDetectedLanguage; +} + +/** Contains the entity recognition task result for the document with metadata and detected language. */ +@added(Versions.v2023_11_15_preview) +model EntitiesDocumentResultWithMetadataDetectedLanguage + is EntitiesDocumentResultWithMetadata { + ...DocumentDetectedLanguage; +} + +/** Defines the detected entity object containing the entity category and entity text detected, etc. */ +model Entity { + /** Entity text as appears in the request. */ + text: string; + + /** Entity type. */ + category: string; + + /** (Optional) Entity sub type. */ + subcategory?: string; + + /** Start position for the entity text. Use of different 'stringIndexType' values can affect the offset returned. */ + offset: int32; + + /** Length for the entity text. Use of different 'stringIndexType' values can affect the length returned. */ + length: int32; + + /** Confidence score between 0 and 1 of the extracted entity. */ + confidenceScore: float64; +} + +/** Contains the entity recognition job task result. */ +#suppress "@azure-tools/typespec-azure-core/casing-style" +model EntityRecognitionLROResult extends AnalyzeTextLROResult { + /** Kind of the task. */ + kind: AnalyzeTextLROResultsKind.EntityRecognitionLROResults; + + /** Results for the task. */ + results: EntitiesResult; +} + +/** Contains all the entity categories detected by entity recognition. */ +@added(Versions.v2023_11_15_preview) +union EntityCategory { + string, + + /** Specific street-level mentions of locations: house/building numbers, streets, avenues, highways, intersections referenced by name. */ + Address: "Address", + + /** Numeric values, including digits and number words. */ + Numeric: "Numeric", + + /** Age-related values. */ + Age: "Age", + + /** Currency-related values. */ + Currency: "Currency", + + /** Numbers without a unit */ + Number: "Number", + + /** Range of Numbers */ + NumberRange: "NumberRange", + + /** Percentage-related values. */ + Percentage: "Percentage", + + /** Ordinal numbers. */ + Ordinal: "Ordinal", + + /** Temperature-related values. */ + Temperature: "Temperature", + + /** Dimension of measurements */ + Dimension: "Dimension", + + /** Length of an object. */ + Length: "Length", + + /** Weight of an object. */ + Weight: "Weight", + + /** Height of an object. */ + Height: "Height", + + /** Speed of an object. */ + Speed: "Speed", + + /** Area of an object. */ + Area: "Area", + + /** Volume of an object. */ + Volume: "Volume", + + /** Unit of measure for digital information. */ + Information: "Information", + + /** Items relating to time. */ + Temporal: "Temporal", + + /** Calendar dates. */ + Date: "Date", + + /** Times of day. */ + Time: "Time", + + /** Calendar dates with time. */ + DateTime: "DateTime", + + /** Range of dates. */ + DateRange: "DateRange", + + /** Range of times. */ + TimeRange: "TimeRange", + + /** Range of date and time. */ + DateTimeRange: "DateTimeRange", + + /** Duration of time. */ + Duration: "Duration", + + /** Set of time-related values. */ + SetTemporal: "SetTemporal", + + /** Social, sports, business, political, educational, natural, historical, criminal, violent, legal, military events with a timed period. */ + Event: "Event", + + /** Sports event-related values. */ + SportsEvent: "SportsEvent", + + /** Cultural event-related values. */ + CulturalEvent: "CulturalEvent", + + /** Natural event-related values. */ + NaturalEvent: "NaturalEvent", + + /** Particular point or place in physical space. */ + Location: "Location", + + /** Cities, countries/regions, states. */ + GPE: "GPE", + + /** City-related values. */ + City: "City", + + /** State-related values. */ + State: "State", + + /** Country or region-related values. */ + CountryRegion: "CountryRegion", + + /** Continent-related values. */ + Continent: "Continent", + + /** Manmade structures. */ + Structural: "Structural", + + /** Airports. */ + Airport: "Airport", + + /** Geographic and natural features such as rivers, oceans, and deserts. */ + Geological: "Geological", + + /** Corporations, agencies, and other groups of people defined by some established organizational structure. These labels can include companies, political parties/movements, musical bands, sport clubs, government bodies, and public organizations. Nationalities or religions are not ORGANIZATION. */ + Organization: "Organization", + + /** Medical companies and groups. */ + OrganizationMedical: "OrganizationMedical", + + /** Stock exchange groups. */ + OrganizationStockExchange: "OrganizationStockExchange", + + /** Sports-related organizations. */ + OrganizationSports: "OrganizationSports", + + /** First, last, and middle names, names of fictional characters, and aliases. Titles, such as 'Mr.' or 'President', are not considered part of the named entity. */ + Person: "Person", + + /** Human roles classified by a group membership. */ + PersonType: "PersonType", + + /** Email addresses. */ + Email: "Email", + + /** URLs to websites. */ + URL: "URL", + + /** network IP addresses. */ + IP: "IP", + + /** Phone numbers (US and EU phone numbers only). */ + PhoneNumber: "PhoneNumber", + + /** Single or group of commercial, consumable objects, electronics, vehicles, food groups. */ + Product: "Product", + + /** Computing products. */ + ComputingProduct: "ComputingProduct", + + /** A capability, skill, or expertise. */ + Skill: "Skill", +} + +/** The class that houses the inference options allowed for named entity recognition. */ +@added(Versions.v2023_11_15_preview) +model EntityInferenceOptions { + /** Option to include/exclude the detected entity values to be normalized and included in the metadata. The numeric and temporal entity types support value normalization. */ + excludeNormalizedValues?: boolean = false; +} + +/** The abstract base class for entity OverlapPolicy. */ +@added(Versions.v2023_11_15_preview) +@discriminator("policyKind") +model BaseEntityOverlapPolicy { + /** The entity OverlapPolicy object kind. */ + policyKind: policyKind = policyKind.matchLongest; +} + +/** Kinds of overlap policies supported. */ +@added(Versions.v2023_11_15_preview) +union policyKind { + string, + + /** Represents MatchLongestEntityPolicyType */ + matchLongest: "matchLongest", + + /** Represents AllowOverlapEntityPolicyType */ + allowOverlap: "allowOverlap", +} + +/** Represents the Match longest overlap policy. No overlapping entities as far as it is possible. 1. If there are overlapping entities, the longest one will be returned. 2. If the set of characters predicted for 2 or more entities are exactly the same, select the entity that has the higher confidence score.3. If the entity scores are identical, return all entities that are still present after applying the previous rules. 3. If there is partial overlap (as in Hello Text Analytics) follow the above steps starting from 1. */ +@added(Versions.v2023_11_15_preview) +model MatchLongestEntityPolicyType extends BaseEntityOverlapPolicy { + /** The entity OverlapPolicy object kind. */ + policyKind: policyKind.matchLongest; +} + +/** Represents the allow overlap policy. Will apply no post processing logic for the entities. Whatever the model predicts is what will be returned to the user. This allows the user to get a full view of every single model's possible values and apply their own custom logic on entity selection */ +@added(Versions.v2023_11_15_preview) +model AllowOverlapEntityPolicyType extends BaseEntityOverlapPolicy { + /** The entity OverlapPolicy object kind. */ + policyKind: policyKind.allowOverlap; +} + +/** Entity documents result with metadata. */ +@added(Versions.v2023_11_15_preview) +model EntitiesDocumentResultWithMetadata is DocumentResult { + /** Recognized entities in the document. */ + entities: Array; +} + +/** Entity tag object which contains the name of the tags abd any associated confidence score. Entity Tags are used to express some similarities/affinity between entities. */ +@added(Versions.v2023_11_15_preview) +model EntityTag { + /** Name of the tag. Entity Tag names will be unique globally. */ + name: string; + + /** Detection score between 0 and 1 of the extracted entity. */ + confidenceScore?: float64; +} + +/** Entity object with tags. */ +@added(Versions.v2023_11_15_preview) +model EntityWithTags is Entity { + /** An entity type is the lowest (or finest) granularity at which the entity has been detected. The type maps to the specific metadata attributes associated with the entity detected. */ + type: string; + + /** List of entity tags. Tags are to express some similarities/affinity between entities. */ + tags: Array; +} + +/** Entity object with tags and metadata. */ +@added(Versions.v2023_11_15_preview) +model EntityWithMetadata is EntityWithTags { + /** The entity metadata object. */ + metadata?: BaseMetadata; +} + +/** The Age Unit of measurement */ +@added(Versions.v2023_11_15_preview) +union AgeUnit { + string, + + /** Unspecified time period */ + Unspecified: "Unspecified", + + /** Time period of a year */ + Year: "Year", + + /** Time period of a month */ + Month: "Month", + + /** Time period of a week */ + Week: "Week", + + /** Time period of a day */ + Day: "Day", +} + +/** The Volume Unit of measurement */ +@added(Versions.v2023_11_15_preview) +union VolumeUnit { + string, + + /** Unspecified volume unit. */ + Unspecified: "Unspecified", + + /** Volume unit in cubic meters. */ + CubicMeter: "CubicMeter", + + /** Volume unit in cubic centimeters. */ + CubicCentimeter: "CubicCentimeter", + + /** Volume unit in cubic millimeters. */ + CubicMillimeter: "CubicMillimeter", + + /** Volume unit in hectoliters. */ + Hectoliter: "Hectoliter", + + /** Volume unit in decaliters. */ + Decaliter: "Decaliter", + + /** Volume unit in liters. */ + Liter: "Liter", + + /** Volume unit in centiliters. */ + Centiliter: "Centiliter", + + /** Volume unit in milliliters. */ + Milliliter: "Milliliter", + + /** Volume unit in cubic yards. */ + CubicYard: "CubicYard", + + /** Volume unit in cubic inches. */ + CubicInch: "CubicInch", + + /** Volume unit in cubic feet. */ + CubicFoot: "CubicFoot", + + /** Volume unit in cubic miles. */ + CubicMile: "CubicMile", + + /** Volume unit in fluid ounces. */ + FluidOunce: "FluidOunce", + + /** Volume unit in teaspoons. */ + Teaspoon: "Teaspoon", + + /** Volume unit in tablespoons. */ + Tablespoon: "Tablespoon", + + /** Volume unit in pints. */ + Pint: "Pint", + + /** Volume unit in quarts. */ + Quart: "Quart", + + /** Volume unit in cups. */ + Cup: "Cup", + + /** Volume unit in gills. */ + Gill: "Gill", + + /** Volume unit in pinches. */ + Pinch: "Pinch", + + /** Volume unit in fluid drams. */ + FluidDram: "FluidDram", + + /** Volume unit in barrels. */ + Barrel: "Barrel", + + /** Volume unit in minims. */ + Minim: "Minim", + + /** Volume unit in cords. */ + Cord: "Cord", + + /** Volume unit in pecks. */ + Peck: "Peck", + + /** Volume unit in bushels. */ + Bushel: "Bushel", + + /** Volume unit in hogsheads. */ + Hogshead: "Hogshead", +} + +/** The speed Unit of measurement */ +@added(Versions.v2023_11_15_preview) +union SpeedUnit { + string, + + /** Unspecified speed unit. */ + Unspecified: "Unspecified", + + /** Speed unit in meters per second. */ + MetersPerSecond: "MetersPerSecond", + + /** Speed unit in kilometers per hour. */ + KilometersPerHour: "KilometersPerHour", + + /** Speed unit in kilometers per minute. */ + KilometersPerMinute: "KilometersPerMinute", + + /** Speed unit in kilometers per second. */ + KilometersPerSecond: "KilometersPerSecond", + + /** Speed unit in miles per hour. */ + MilesPerHour: "MilesPerHour", + + /** Speed unit in knots. */ + Knots: "Knots", + + /** Speed unit in feet per second. */ + FeetPerSecond: "FeetPerSecond", + + /** Speed unit in feet per minute. */ + FeetPerMinute: "FeetPerMinute", + + /** Speed unit in yards per minute. */ + YardsPerMinute: "YardsPerMinute", + + /** Speed unit in yards per second. */ + YardsPerSecond: "YardsPerSecond", + + /** Speed unit in meters per millisecond. */ + MetersPerMillisecond: "MetersPerMillisecond", + + /** Speed unit in centimeters per millisecond. */ + CentimetersPerMillisecond: "CentimetersPerMillisecond", + + /** Speed unit in Kilometers per millisecond. */ + KilometersPerMillisecond: "KilometersPerMillisecond", +} +/** The area unit of measurement. */ +@added(Versions.v2023_11_15_preview) +union AreaUnit { + string, + + /** Unspecified area unit */ + Unspecified: "Unspecified", + + /** Area unit in square kilometers */ + SquareKilometer: "SquareKilometer", + + /** Area unit in square hectometers */ + SquareHectometer: "SquareHectometer", + + /** Area unit in square decameters */ + SquareDecameter: "SquareDecameter", + + /** Area unit in square decimeters */ + SquareDecimeter: "SquareDecimeter", + + /** Area unit in square meters */ + SquareMeter: "SquareMeter", + + /** Area unit in square centimeters */ + SquareCentimeter: "SquareCentimeter", + + /** Area unit in square millimeters */ + SquareMillimeter: "SquareMillimeter", + + /** Area unit in square inches */ + SquareInch: "SquareInch", + + /** Area unit in square feet */ + SquareFoot: "SquareFoot", + + /** Area unit in square miles */ + SquareMile: "SquareMile", + + /** Area unit in square yards */ + SquareYard: "SquareYard", + + /** Area unit in acres */ + Acre: "Acre", +} + +/** The length unit of measurement. */ +@added(Versions.v2023_11_15_preview) +union LengthUnit { + string, + + /** Unspecified length unit. */ + Unspecified: "Unspecified", + + /** Length unit in kilometers. */ + Kilometer: "Kilometer", + + /** Length unit in hectometers. */ + Hectometer: "Hectometer", + + /** Length unit in decameters. */ + Decameter: "Decameter", + + /** Length unit in meters. */ + Meter: "Meter", + + /** Length unit in decimeters. */ + Decimeter: "Decimeter", + + /** Length unit in centimeters. */ + Centimeter: "Centimeter", + + /** Length unit in millimeters. */ + Millimeter: "Millimeter", + + /** Length unit in micrometers. */ + Micrometer: "Micrometer", + + /** Length unit in nanometers. */ + Nanometer: "Nanometer", + + /** Length unit in picometers. */ + Picometer: "Picometer", + + /** Length unit in miles. */ + Mile: "Mile", + + /** Length unit in yards. */ + Yard: "Yard", + + /** Length unit in inches. */ + Inch: "Inch", + + /** Length unit in feet. */ + Foot: "Foot", + + /** Length unit in light years. */ + LightYear: "LightYear", + + /** Length unit in points. */ + Point: "Point", +} + +/** The information (data) Unit of measurement. */ +@added(Versions.v2023_11_15_preview) +union InformationUnit { + string, + + /** Unspecified data size unit */ + Unspecified: "Unspecified", + + /** Data size unit in bits */ + Bit: "Bit", + + /** Data size unit in kilobits */ + Kilobit: "Kilobit", + + /** Data size unit in megabits */ + Megabit: "Megabit", + + /** Data size unit in gigabits */ + Gigabit: "Gigabit", + + /** Data size unit in terabits */ + Terabit: "Terabit", + + /** Data size unit in petabits */ + Petabit: "Petabit", + + /** Data size unit in bytes */ + Byte: "Byte", + + /** Data size unit in kilobytes */ + Kilobyte: "Kilobyte", + + /** Data size unit in megabytes */ + Megabyte: "Megabyte", + + /** Data size unit in gigabytes */ + Gigabyte: "Gigabyte", + + /** Data size unit in terabytes */ + Terabyte: "Terabyte", + + /** Data size unit in petabytes */ + Petabyte: "Petabyte", +} + +/** The temperature Unit of measurement. */ +@added(Versions.v2023_11_15_preview) +union TemperatureUnit { + string, + + /** Unspecified temperature unit */ + Unspecified: "Unspecified", + + /** Temperature unit in Fahrenheit */ + Fahrenheit: "Fahrenheit", + + /** Temperature unit in Kelvin */ + Kelvin: "Kelvin", + + /** Temperature unit in Rankine */ + Rankine: "Rankine", + + /** Temperature unit in Celsius */ + Celsius: "Celsius", +} + +/** The weight Unit of measurement. */ +@added(Versions.v2023_11_15_preview) +union WeightUnit { + string, + + /** Unspecified weight unit */ + Unspecified: "Unspecified", + + /** Weight unit in kilograms */ + Kilogram: "Kilogram", + + /** Weight unit in grams */ + Gram: "Gram", + + /** Weight unit in milligrams */ + Milligram: "Milligram", + + /** Volume unit in gallons */ + Gallon: "Gallon", + + /** Weight unit in metric tons */ + MetricTon: "MetricTon", + + /** Weight unit in tons */ + Ton: "Ton", + + /** Weight unit in pounds */ + Pound: "Pound", + + /** Weight unit in ounces */ + Ounce: "Ounce", + + /** Weight unit in grains */ + Grain: "Grain", + + /** Weight unit in pennyweights */ + PennyWeight: "PennyWeight", + + /** Weight unit in long tons (British) */ + LongTonBritish: "LongTonBritish", + + /** Weight unit in short tons (US) */ + ShortTonUS: "ShortTonUS", + + /** Weight unit in short hundredweights (US) */ + ShortHundredWeightUS: "ShortHundredWeightUS", + + /** Weight unit in stones */ + Stone: "Stone", + + /** Weight unit in drams */ + Dram: "Dram", +} + +/** The type of the extracted number entity. */ +@added(Versions.v2023_11_15_preview) +union NumberKind { + string, + + /** Integer number */ + Integer: "Integer", + + /** Decimal number */ + Decimal: "Decimal", + + /** Power number */ + Power: "Power", + + /** Fraction number */ + Fraction: "Fraction", + + /** Percent number */ + Percent: "Percent", + + /** Unspecified number kind */ + Unspecified: "Unspecified", +} + +/** The reference point that the ordinal number denotes. */ +@added(Versions.v2023_11_15_preview) +union RelativeTo { + string, + + /** Current state or position */ + Current: "Current", + + /** End state or position */ + End: "End", + + /** Start state or position */ + Start: "Start", +} + +/** The range inclusiveness of this property property. */ +@added(Versions.v2023_11_15_preview) +union RangeInclusivity { + string, + + /** No inclusivity */ + NoneInclusive: "NoneInclusive", + + /** Left side inclusive */ + LeftInclusive: "LeftInclusive", + + /** Right side inclusive */ + RightInclusive: "RightInclusive", + + /** Both sides inclusive */ + LeftRightInclusive: "LeftRightInclusive", +} + +/** An optional modifier of a date/time instance. */ +@added(Versions.v2023_11_15_preview) +union TemporalModifier { + string, + + /** After an approximate time */ + AfterApprox: "AfterApprox", + + /** Before a specific time */ + Before: "Before", + + /** Before the start of a time period */ + BeforeStart: "BeforeStart", + + /** Approximately at a specific time */ + Approx: "Approx", + + /** Reference to an undefined time */ + ReferenceUndefined: "ReferenceUndefined", + + /** Since the end of a time period */ + SinceEnd: "SinceEnd", + + /** After the middle of a time period */ + AfterMid: "AfterMid", + + /** At the start of a time period */ + Start: "Start", + + /** After a specific time */ + After: "After", + + /** Before the end of a time period */ + BeforeEnd: "BeforeEnd", + + /** Until a specific time */ + Until: "Until", + + /** At the end of a time period */ + End: "End", + + /** Less than a specific time */ + Less: "Less", + + /** Since a specific time */ + Since: "Since", + + /** After the start of a time period */ + AfterStart: "AfterStart", + + /** Before an approximate time */ + BeforeApprox: "BeforeApprox", + + /** In the middle of a time period */ + Mid: "Mid", + + /** More than a specific time */ + More: "More", +} + +/** The kind of the number range entity. */ +union RangeKind { + string, + + /** Number range */ + Number: "Number", + + /** Speed range */ + Speed: "Speed", + + /** Weight range */ + Weight: "Weight", + + /** Length range */ + Length: "Length", + + /** Volume range */ + Volume: "Volume", + + /** Area range */ + Area: "Area", + + /** Age range */ + Age: "Age", + + /** Information range */ + Information: "Information", + + /** Temperature range */ + Temperature: "Temperature", + + /** Currency range */ + Currency: "Currency", +} + +/** The abstract base class for entity Metadata. */ +@added(Versions.v2023_11_15_preview) +@discriminator("metadataKind") +model BaseMetadata { + /** The entity Metadata object kind. */ + metadataKind: MetadataKind; +} + +/** The entity Metadata object kind. */ +@added(Versions.v2023_11_15_preview) +union MetadataKind { + string, + + /** Metadata for date-related values. */ + DateMetadata: "DateMetadata", + + /** Metadata for date and time-related values. */ + DateTimeMetadata: "DateTimeMetadata", + + /** Metadata for time-related values. */ + TimeMetadata: "TimeMetadata", + + /** Metadata for set of time-related values. */ + TemporalSetMetadata: "TemporalSetMetadata", + + /** Metadata for numeric values. */ + NumberMetadata: "NumberMetadata", + + /** Metadata for ordinal numbers. */ + OrdinalMetadata: "OrdinalMetadata", + + /** Metadata for speed-related values. */ + SpeedMetadata: "SpeedMetadata", + + /** Metadata for weight-related values. */ + WeightMetadata: "WeightMetadata", + + /** Metadata for length-related values. */ + LengthMetadata: "LengthMetadata", + + /** Metadata for volume-related values. */ + VolumeMetadata: "VolumeMetadata", + + /** Metadata for area-related values. */ + AreaMetadata: "AreaMetadata", + + /** Metadata for age-related values. */ + AgeMetadata: "AgeMetadata", + + /** Metadata for information-related values. */ + InformationMetadata: "InformationMetadata", + + /** Metadata for temperature-related values. */ + TemperatureMetadata: "TemperatureMetadata", + + /** Metadata for currency-related values. */ + CurrencyMetadata: "CurrencyMetadata", + + /** Metadata for numeric range values. */ + NumericRangeMetadata: "NumericRangeMetadata", + + /** Metadata for temporal span values. */ + TemporalSpanMetadata: "TemporalSpanMetadata", +} + +/** Represents Metadata for quantities. */ +@added(Versions.v2023_11_15_preview) +model QuantityMetadata { + /** The numeric value that the extracted text denotes. */ + value: float64; +} + +/** Represents the Age entity Metadata model. */ +@added(Versions.v2023_11_15_preview) +model AgeMetadata extends BaseMetadata { + ...QuantityMetadata; + + /** Kind of the metadata. */ + metadataKind: MetadataKind.AgeMetadata; + + /** Unit of measure for age. */ + unit: AgeUnit; +} + +/** Represents the Volume entity Metadata model. */ +@added(Versions.v2023_11_15_preview) +model VolumeMetadata extends BaseMetadata { + ...QuantityMetadata; + + /** Kind of the metadata. */ + metadataKind: MetadataKind.VolumeMetadata; + + /** Unit of measure for volume. */ + unit: VolumeUnit; +} + +/** Represents the Speed entity Metadata model. */ +@added(Versions.v2023_11_15_preview) +model SpeedMetadata extends BaseMetadata { + ...QuantityMetadata; + + /** Kind of the metadata. */ + metadataKind: MetadataKind.SpeedMetadata; + + /** Unit of measure for speed. */ + unit: SpeedUnit; +} + +/** Represents the Area entity Metadata model. */ +@added(Versions.v2023_11_15_preview) +model AreaMetadata extends BaseMetadata { + ...QuantityMetadata; + + /** Kind of the metadata. */ + metadataKind: MetadataKind.AreaMetadata; + + /** Unit of measure for area. */ + unit: AreaUnit; +} + +/** Represents the Length entity Metadata model. */ +@added(Versions.v2023_11_15_preview) +model LengthMetadata extends BaseMetadata { + ...QuantityMetadata; + + /** Kind of the metadata. */ + metadataKind: MetadataKind.LengthMetadata; + + /** Unit of measure for length. */ + unit: LengthUnit; +} + +/** Represents the Information (data) entity Metadata model. */ +@added(Versions.v2023_11_15_preview) +model InformationMetadata extends BaseMetadata { + ...QuantityMetadata; + + /** Kind of the metadata. */ + metadataKind: MetadataKind.InformationMetadata; + + /** Unit of measure for information. */ + unit: InformationUnit; +} + +/** Represents the Information entity Metadata model. */ +@added(Versions.v2023_11_15_preview) +model TemperatureMetadata extends BaseMetadata { + ...QuantityMetadata; + + /** Kind of the metadata. */ + metadataKind: MetadataKind.TemperatureMetadata; + + /** Unit of measure for temperature. */ + unit: TemperatureUnit; +} + +/** Represents the Weight ) entity Metadata model. */ +@added(Versions.v2023_11_15_preview) +model WeightMetadata extends BaseMetadata { + ...QuantityMetadata; + + /** Kind of the metadata. */ + metadataKind: MetadataKind.WeightMetadata; + + /** Unit of measure for weight. */ + unit: WeightUnit; +} + +/** Represents the Currency ) entity Metadata model. */ +@added(Versions.v2023_11_15_preview) +model CurrencyMetadata extends BaseMetadata { + ...QuantityMetadata; + + /** Kind of the metadata. */ + metadataKind: MetadataKind.CurrencyMetadata; + + /** Currency unit. */ + unit: string; + + /** The alphabetic code based on another ISO standard, ISO 3166, which lists the codes for country names. The first two letters of the ISO 4217 three-letter code are the same as the code for the country name, and, where possible, the third letter corresponds to the first letter of the currency name. */ + iso4217?: string; +} + +/** Represents the date value. */ +@added(Versions.v2023_11_15_preview) +model DateValue { + /** An extended ISO 8601 date/time representation as described in (https://github.com/Microsoft/Recognizers-Text/blob/master/Patterns/English/English-DateTime.yaml) */ + timex: string; + + /** The actual time that the extracted text denote. */ + value: string; + + /** Modifier for datetime to indicate point of reference like before, after etc. */ + modifier?: TemporalModifier; +} + +/** Base temporal metadata object. */ +@added(Versions.v2023_11_15_preview) +model BaseTemporalMetadata { + /** List of date values. */ + dateValues?: Array; +} + +/** A Metadata for date entity instances. */ +@added(Versions.v2023_11_15_preview) +model DateMetadata extends BaseMetadata { + ...BaseTemporalMetadata; + + /** Kind of the metadata. */ + metadataKind: MetadataKind.DateMetadata; +} + +/** A Metadata for datetime entity instances. */ +@added(Versions.v2023_11_15_preview) +model DateTimeMetadata extends BaseMetadata { + ...BaseTemporalMetadata; + + /** Kind of the metadata. */ + metadataKind: MetadataKind.DateTimeMetadata; +} + +/** A Metadata for temporal set entity instances. */ +@added(Versions.v2023_11_15_preview) +model TemporalSetMetadata extends BaseMetadata { + ...BaseTemporalMetadata; + + /** Kind of the metadata. */ + metadataKind: MetadataKind.TemporalSetMetadata; +} + +/** A Metadata for time entity instances. */ +@added(Versions.v2023_11_15_preview) +model TimeMetadata extends BaseMetadata { + ...BaseTemporalMetadata; + + /** Kind of the metadata. */ + metadataKind: MetadataKind.TimeMetadata; +} + +/** A metadata for numeric entity instances. */ +@added(Versions.v2023_11_15_preview) +model NumberMetadata extends BaseMetadata { + /** Kind of the metadata. */ + metadataKind: MetadataKind.NumberMetadata; + + /** Kind of the number type. */ + numberKind: NumberKind; + + /** A numeric representation of what the extracted text denotes. */ + value: float64; +} + +/** A metadata for numeric entity instances. */ +@added(Versions.v2023_11_15_preview) +model OrdinalMetadata extends BaseMetadata { + /** Kind of the metadata. */ + metadataKind: MetadataKind.OrdinalMetadata; + + /** The offset with respect to the reference (e.g., offset = -1 indicates the second to last) */ + offset: string; + + /** The reference point that the ordinal number denotes. */ + relativeTo: RelativeTo; + + /** A simple arithmetic expression that the ordinal denotes. */ + value: string; +} + +/** represents the Metadata of a date and/or time span. */ +@added(Versions.v2023_11_15_preview) +model TemporalSpanMetadata extends BaseMetadata { + /** Kind of the metadata. */ + metadataKind: MetadataKind.TemporalSpanMetadata; + + /** List of temporal spans detected. */ + spanValues?: TemporalSpanValues[]; +} + +/** Temporal span object. */ +@added(Versions.v2023_11_15_preview) +model TemporalSpanValues { + /** Start value for the span. */ + begin?: string; + + /** End value for the span. */ + end?: string; + + /** An optional duration value formatted based on the ISO 8601 (https://en.wikipedia.org/wiki/ISO_8601#Durations) */ + duration?: string; + + /** Modifier for datetime to indicate point of reference like before, after etc. */ + modifier?: TemporalModifier; + + /** An optional triplet containing the beginning, the end, and the duration all stated as ISO 8601 formatted strings. */ + timex?: string; +} + +/** represents the Metadata of numeric intervals. */ +@added(Versions.v2023_11_15_preview) +model NumericRangeMetadata extends BaseMetadata { + /** Kind of the metadata. */ + metadataKind: MetadataKind.NumericRangeMetadata; + + /** Kind of numeric ranges supported - like Number, Speed, etc. */ + rangeKind: RangeKind; + + /** The beginning value of the interval. */ + minimum: float64; + + /** The ending value of the interval. */ + maximum: float64; + + /** The inclusiveness of this range. */ + rangeInclusivity?: RangeInclusivity; +} diff --git a/specification/cognitiveservices/Language.AnalyzeText/models/healthcare.tsp b/specification/cognitiveservices/Language.AnalyzeText/models/healthcare.tsp new file mode 100644 index 000000000000..7ceb95ddcf54 --- /dev/null +++ b/specification/cognitiveservices/Language.AnalyzeText/models/healthcare.tsp @@ -0,0 +1,495 @@ +import "@typespec/versioning"; +import "@azure-tools/typespec-azure-core"; + +using TypeSpec.Versioning; +using Azure.Core; + +namespace Language.AnalyzeText; + +/** Supported parameters for a Healthcare task. */ +model HealthcareTaskParameters is PreBuiltTaskParameters { + /** Specifies the method used to interpret string offsets. */ + stringIndexType?: StringIndexType = StringIndexType.TextElements_v8; + + /** The FHIR Spec version that the result will use to format the fhirBundle. For additional information see https://www.hl7.org/fhir/overview.html. */ + @added(Versions.v2023_11_15_preview) + fhirVersion?: fhirVersion; + + /** Document type that can be provided as input for Fhir Documents. Expect to have fhirVersion provided when used. Behavior of using None enum is the same as not using the documentType parameter. */ + @added(Versions.v2023_11_15_preview) + documentType?: healthcareDocumentType; +} + +/** The FHIR Spec version. */ +@added(Versions.v2023_11_15_preview) +union fhirVersion { + string, + + /** Version 4.0.1 */ + `4.0.1`: "4.0.1", +} + +/** Document type. */ +@added(Versions.v2023_11_15_preview) +union healthcareDocumentType { + string, + + /** None document type */ + None: "None", + + /** Clinical trial document type */ + ClinicalTrial: "ClinicalTrial", + + /** Discharge summary document type */ + DischargeSummary: "DischargeSummary", + + /** Progress note document type */ + ProgressNote: "ProgressNote", + + /** History and physical document type */ + HistoryAndPhysical: "HistoryAndPhysical", + + /** Consult document type */ + Consult: "Consult", + + /** Imaging document type */ + Imaging: "Imaging", + + /** Pathology document type */ + Pathology: "Pathology", + + /** Procedure note document type */ + ProcedureNote: "ProcedureNote", +} + +/** The long running task to be performed by the service on the Healthcare input documents. */ +#suppress "@azure-tools/typespec-azure-core/casing-style" +model HealthcareLROTask extends AnalyzeTextLROTask { + /** Healthcare kind of the long running task. */ + kind: AnalyzeTextLROTaskKind.Healthcare; + + /** Parameters for the Healthcare task. */ + parameters?: HealthcareTaskParameters; +} + +/** Result object for the processed Healthcare task. */ +model HealthcareResult is PreBuiltResult { + /** List of result objects for the processed Healthcare documents. */ + @typeChangedFrom( + Versions.v2023_11_15_preview, + Array + ) + documents: Array; +} + +/** Result object for the processed Healthcare document. */ +#suppress "@azure-tools/typespec-azure-core/bad-record-type" +model HealthcareEntitiesDocumentResult is DocumentResult { + /** Healthcare entities. */ + entities: Array; + + /** Healthcare entity relations. */ + relations: Array; + + /** JSON bundle containing a FHIR compatible object for consumption in other Healthcare tools. For additional information see https://www.hl7.org/fhir/overview.html. */ + @added(Versions.v2023_11_15_preview) + fhirBundle?: FhirBundle; +} + +/** JSON bundle containing a FHIR compatible object for consumption in other Healthcare tools. For additional information see https://www.hl7.org/fhir/overview.html. */ +#suppress "@azure-tools/typespec-azure-core/bad-record-type" +model FhirBundle is Record; + +/** Healthcare entity extracted from the document */ +model HealthcareEntity { + /** Entity text as appears in the request. */ + text: string; + + /** Healthcare Entity Category. */ + category: healthcareEntityCategory; + + /** (Optional) Entity sub type. */ + subcategory?: string; + + /** Start position for the entity text. Use of different 'stringIndexType' values can affect the offset returned. */ + offset: int32; + + /** Length for the entity text. Use of different 'stringIndexType' values can affect the length returned. */ + length: int32; + + /** Confidence score between 0 and 1 of the extracted entity. */ + confidenceScore: float64; + + /** Assertion of the entity. */ + assertion?: HealthcareAssertion; + + /** Preferred name for the entity. Example: 'histologically' would have a 'name' of 'histologic'. */ + name?: string; + + /** Entity references in known data sources. */ + links?: Array; +} + +/** Healthcare Entity Category. */ +union healthcareEntityCategory { + string, + + /** Body structure */ + BodyStructure: "BodyStructure", + + /** Age */ + Age: "Age", + + /** Gender */ + Gender: "Gender", + + /** Examination name */ + ExaminationName: "ExaminationName", + + /** Date */ + Date: "Date", + + /** Direction */ + Direction: "Direction", + + /** Frequency */ + Frequency: "Frequency", + + /** Measurement value */ + MeasurementValue: "MeasurementValue", + + /** Measurement unit */ + MeasurementUnit: "MeasurementUnit", + + /** Relational operator */ + RelationalOperator: "RelationalOperator", + + /** Time */ + Time: "Time", + + /** Gene or protein */ + GeneOrProtein: "GeneOrProtein", + + /** Variant */ + Variant: "Variant", + + /** Administrative event */ + AdministrativeEvent: "AdministrativeEvent", + + /** Care environment */ + CareEnvironment: "CareEnvironment", + + /** Healthcare profession */ + HealthcareProfession: "HealthcareProfession", + + /** Diagnosis */ + Diagnosis: "Diagnosis", + + /** Symptom or sign */ + SymptomOrSign: "SymptomOrSign", + + /** Condition qualifier */ + ConditionQualifier: "ConditionQualifier", + + /** Medication class */ + MedicationClass: "MedicationClass", + + /** Medication name */ + MedicationName: "MedicationName", + + /** Dosage */ + Dosage: "Dosage", + + /** Medication form */ + MedicationForm: "MedicationForm", + + /** Medication route */ + MedicationRoute: "MedicationRoute", + + /** Family relation */ + FamilyRelation: "FamilyRelation", + + /** Treatment name */ + TreatmentName: "TreatmentName", + + /** Ethnicity */ + @added(Versions.v2023_04_01) + Ethnicity: "Ethnicity", + + /** Course */ + @added(Versions.v2023_04_01) + Course: "Course", + + /** Expression */ + @added(Versions.v2023_04_01) + Expression: "Expression", + + /** Mutation type */ + @added(Versions.v2023_04_01) + MutationType: "MutationType", + + /** Condition scale */ + @added(Versions.v2023_04_01) + ConditionScale: "ConditionScale", + + /** Allergen */ + @added(Versions.v2023_04_01) + Allergen: "Allergen", + + /** Employment */ + @added(Versions.v2023_04_01) + Employment: "Employment", + + /** Living status */ + @added(Versions.v2023_04_01) + LivingStatus: "LivingStatus", + + /** Substance use */ + @added(Versions.v2023_04_01) + SubstanceUse: "SubstanceUse", + + /** Substance use amount */ + @added(Versions.v2023_04_01) + SubstanceUseAmount: "SubstanceUseAmount", +} + +/** Every relation is an entity graph of a certain relationType, where all entities are connected and have specific roles within the relation context. */ +model HealthcareRelation { + /** Type of relation. Examples include: `DosageOfMedication` or 'FrequencyOfMedication', etc. */ + relationType: relationType; + + /** The entities in the relation. */ + entities: Array; + + /** Confidence score between 0 and 1 of the extracted relation. */ + @added(Versions.v2023_04_01) + confidenceScore?: float64; +} + +/** Type of relation. Examples include: `DosageOfMedication` or 'FrequencyOfMedication', etc. */ +union relationType { + string, + + /** Abbreviation */ + Abbreviation: "Abbreviation", + + /** Direction of body structure */ + DirectionOfBodyStructure: "DirectionOfBodyStructure", + + /** Direction of condition */ + DirectionOfCondition: "DirectionOfCondition", + + /** Direction of examination */ + DirectionOfExamination: "DirectionOfExamination", + + /** Direction of treatment */ + DirectionOfTreatment: "DirectionOfTreatment", + + /** Dosage of medication */ + DosageOfMedication: "DosageOfMedication", + + /** Form of medication */ + FormOfMedication: "FormOfMedication", + + /** Frequency of medication */ + FrequencyOfMedication: "FrequencyOfMedication", + + /** Frequency of treatment */ + FrequencyOfTreatment: "FrequencyOfTreatment", + + /** Qualifier of condition */ + QualifierOfCondition: "QualifierOfCondition", + + /** Relation of examination */ + RelationOfExamination: "RelationOfExamination", + + /** Route of medication */ + RouteOfMedication: "RouteOfMedication", + + /** Time of condition */ + TimeOfCondition: "TimeOfCondition", + + /** Time of event */ + TimeOfEvent: "TimeOfEvent", + + /** Time of examination */ + TimeOfExamination: "TimeOfExamination", + + /** Time of medication */ + TimeOfMedication: "TimeOfMedication", + + /** Time of treatment */ + TimeOfTreatment: "TimeOfTreatment", + + /** Unit of condition */ + UnitOfCondition: "UnitOfCondition", + + /** Unit of examination */ + UnitOfExamination: "UnitOfExamination", + + /** Value of condition */ + ValueOfCondition: "ValueOfCondition", + + /** Value of examination */ + ValueOfExamination: "ValueOfExamination", + + /** Body site of condition */ + @added(Versions.v2023_04_01) + BodySiteOfCondition: "BodySiteOfCondition", + + /** Body site of treatment */ + @added(Versions.v2023_04_01) + BodySiteOfTreatment: "BodySiteOfTreatment", + + /** Course of condition */ + @added(Versions.v2023_04_01) + CourseOfCondition: "CourseOfCondition", + + /** Course of examination */ + @added(Versions.v2023_04_01) + CourseOfExamination: "CourseOfExamination", + + /** Course of medication */ + @added(Versions.v2023_04_01) + CourseOfMedication: "CourseOfMedication", + + /** Course of treatment */ + @added(Versions.v2023_04_01) + CourseOfTreatment: "CourseOfTreatment", + + /** Examination finds condition */ + @added(Versions.v2023_04_01) + ExaminationFindsCondition: "ExaminationFindsCondition", + + /** Expression of gene */ + @added(Versions.v2023_04_01) + ExpressionOfGene: "ExpressionOfGene", + + /** Expression of variant */ + @added(Versions.v2023_04_01) + ExpressionOfVariant: "ExpressionOfVariant", + + /** Frequency of condition */ + @added(Versions.v2023_04_01) + FrequencyOfCondition: "FrequencyOfCondition", + + /** Mutation type of gene */ + @added(Versions.v2023_04_01) + MutationTypeOfGene: "MutationTypeOfGene", + + /** Mutation type of variant */ + @added(Versions.v2023_04_01) + MutationTypeOfVariant: "MutationTypeOfVariant", + + /** Scale of condition */ + @added(Versions.v2023_04_01) + ScaleOfCondition: "ScaleOfCondition", + + /** Variant of gene */ + @added(Versions.v2023_04_01) + VariantOfGene: "VariantOfGene", +} + +/** Assertion of the entity. */ +model HealthcareAssertion { + /** Describes any conditionality on the entity. */ + conditionality?: Conditionality; + + /** Describes the entities certainty and polarity. */ + certainty?: Certainty; + + /** Describes if the entity is the subject of the text or if it describes someone else. */ + association?: Association; + + /** Describes temporal information regarding the entity. */ + @added(Versions.v2023_11_15_preview) + temporality?: Temporality; +} + +/** Describes temporal information regarding the entity. */ +#suppress "@azure-tools/typespec-azure-core/no-closed-literal-union" // defined as closed enum +@added(Versions.v2023_11_15_preview) +union Temporality { + /** Current temporality */ + current: "current", + + /** Past temporality */ + past: "past", + + /** Future temporality */ + future: "future", +} + +/** Describes any conditionality on the entity. */ +#suppress "@azure-tools/typespec-azure-core/no-closed-literal-union" // defined as closed enum +union Conditionality { + /** Hypothetical conditionality */ + hypothetical: "hypothetical", + + /** Conditional conditionality */ + conditional: "conditional", +} + +/** Describes the entities certainty and polarity. */ +#suppress "@azure-tools/typespec-azure-core/no-closed-literal-union" // defined as closed enum +union Certainty { + /** Positive certainty */ + positive: "positive", + + /** Possibly positive certainty */ + positivePossible: "positivePossible", + + /** Possibly neutral certainty */ + neutralPossible: "neutralPossible", + + /** Possibly negative certainty */ + negativePossible: "negativePossible", + + /** Negative certainty */ + negative: "negative", +} + +/** Describes if the entity is the subject of the text or if it describes someone else. */ +#suppress "@azure-tools/typespec-azure-core/no-closed-literal-union" // defined as closed enum +union Association { + /** Subject association */ + subject: "subject", + + /** Other association */ + other: "other", +} + +/** Entity in the relation. */ +model HealthcareRelationEntity { + /** Reference link object, using a JSON pointer RFC 6901 (URI Fragment Identifier Representation), pointing to the entity . */ + ref: string; + + /** Role of entity in the relationship. For example: 'CD20-positive diffuse large B-cell lymphoma' has the following entities with their roles in parenthesis: CD20 (GeneOrProtein), Positive (Expression), diffuse large B-cell lymphoma (Diagnosis). */ + role: string; +} + +/** Reference to an entity in known data sources. */ +model HealthcareEntityLink { + /** Entity Catalog. Examples include: UMLS, CHV, MSH, etc. */ + dataSource: string; + + /** Entity id in the given source catalog. */ + id: string; +} + +/** Healthcare Analyze Text long tunning operation result object. */ +#suppress "@azure-tools/typespec-azure-core/casing-style" +model HealthcareLROResult extends AnalyzeTextLROResult { + /** Kind of the task. */ + kind: AnalyzeTextLROResultsKind.HealthcareLROResults; + + /** Results of the task. */ + results: HealthcareResult; +} + +/** Result object for the processed Healthcare document with detected language. */ +@added(Versions.v2023_11_15_preview) +model HealthcareEntitiesDocumentResultWithDocumentDetectedLanguage + is HealthcareEntitiesDocumentResult { + ...DocumentDetectedLanguage; +} diff --git a/specification/cognitiveservices/Language.AnalyzeText/models/key.phrase.extraction.tsp b/specification/cognitiveservices/Language.AnalyzeText/models/key.phrase.extraction.tsp new file mode 100644 index 000000000000..30c753d5478d --- /dev/null +++ b/specification/cognitiveservices/Language.AnalyzeText/models/key.phrase.extraction.tsp @@ -0,0 +1,74 @@ +import "@typespec/versioning"; +import "@azure-tools/typespec-client-generator-core"; + +using Azure.ClientGenerator.Core; +using TypeSpec.Versioning; + +namespace Language.AnalyzeText; + +@doc("Contains the analyze text KeyPhraseExtraction task input.") +model AnalyzeTextKeyPhraseExtractionInput extends AnalyzeTextTask { + @doc("Kind of the task.") + kind: AnalyzeTextTaskKind.KeyPhraseExtraction; + + @doc("Contains the input documents.") + analysisInput?: MultiLanguageAnalysisInput; + + @doc("Key phrase extraction task parameters.") + parameters?: KeyPhraseTaskParameters; +} + +@doc("Supported parameters for a Key Phrase Extraction task.") +model KeyPhraseTaskParameters is PreBuiltTaskParameters; + +#suppress "@azure-tools/typespec-azure-core/casing-style" +@doc("An object representing the task definition for a Key Phrase Extraction task.") +model KeyPhraseLROTask extends AnalyzeTextLROTask { + @doc("Kind of the task.") + kind: AnalyzeTextLROTaskKind.KeyPhraseExtraction; + + @doc("Key phrase extraction task parameters.") + parameters?: KeyPhraseTaskParameters; +} + +@doc("Contains the analyze text KeyPhraseExtraction task result.") +model KeyPhraseTaskResult extends AnalyzeTextTaskResult { + @doc("Kind of the task results.") + kind: AnalyzeTextTaskResultsKind.KeyPhraseExtractionResults; + + @doc("The list of Key phrase extraction results") + results: KeyPhraseResult; +} + +@doc("Contains the KeyPhraseResult.") +model KeyPhraseResult is PreBuiltResult { + @doc("Response by document") + @typeChangedFrom( + Versions.v2023_11_15_preview, + Array + ) + documents: Array; +} + +@doc("Contains the Key phrase extraction results for a document.") +model KeyPhrasesDocumentResult is DocumentResult { + @doc("A list of representative words or phrases. The number of key phrases returned is proportional to the number of words in the input document.") + keyPhrases: Array; +} + +@added(Versions.v2023_04_01) +@doc("A ranked list of sentences representing the extracted summary.") +model KeyPhrasesDocumentResultWithDetectedLanguage { + ...KeyPhrasesDocumentResult; + ...DocumentDetectedLanguage; +} + +#suppress "@azure-tools/typespec-azure-core/casing-style" +@doc("Contains the analyze text KeyPhraseExtraction LRO task.") +model KeyPhraseExtractionLROResult extends AnalyzeTextLROResult { + @doc("Kind of the task.") + kind: AnalyzeTextLROResultsKind.KeyPhraseExtractionLROResults; + + @doc("The list of Key phrase extraction results") + results: KeyPhraseResult; +} diff --git a/specification/cognitiveservices/Language.AnalyzeText/models/language.detection.tsp b/specification/cognitiveservices/Language.AnalyzeText/models/language.detection.tsp new file mode 100644 index 000000000000..00a40629fd83 --- /dev/null +++ b/specification/cognitiveservices/Language.AnalyzeText/models/language.detection.tsp @@ -0,0 +1,325 @@ +import "@typespec/versioning"; +import "@azure-tools/typespec-client-generator-core"; + +using Azure.ClientGenerator.Core; +using TypeSpec.Versioning; + +namespace Language.AnalyzeText; + +/** Contains the language detection document analysis input. */ +model LanguageDetectionAnalysisInput { + /** List of documents to be analyzed. */ + documents?: Array; +} + +/** Contains the language detection document analysis task input. */ +model AnalyzeTextLanguageDetectionInput extends AnalyzeTextTask { + /** Kind of the task. */ + kind: AnalyzeTextTaskKind.LanguageDetection; + + /** Documents to be analyzed. */ + analysisInput?: LanguageDetectionAnalysisInput; + + /** task parameters. */ + parameters?: LanguageDetectionTaskParameters; +} + +/** Supported parameters for a Language Detection task. */ +model LanguageDetectionTaskParameters is PreBuiltTaskParameters; + +/** Contains the language detection task result for the request. */ +model LanguageDetectionTaskResult extends AnalyzeTextTaskResult { + /** Kind of the task result. */ + kind: AnalyzeTextTaskResultsKind.LanguageDetectionResults; + + /** Contains the language detection results. */ + results: LanguageDetectionResult; +} + +/** Contains the language detection result for the request. */ +model LanguageDetectionResult is PreBuiltResult { + /** Enumeration of language detection results for each input document. */ + documents: Array; +} + +/** Contains the language detection for a document. */ +model LanguageDetectionDocumentResult is DocumentResult { + /** Detected Language. */ + detectedLanguage: DetectedLanguage; +} + +/** Contains the details of the detected language for the text. */ +model DetectedLanguage { + /** Long name of a detected language (e.g. English, French). */ + name: string; + + /** A two letter representation of the detected language according to the ISO 639-1 standard (e.g. en, fr). */ + iso6391Name: string; + + /** A confidence score between 0 and 1. Scores close to 1 indicate 100% certainty that the identified language is true. */ + confidenceScore: float64; + + /** Identifies the script of the input document. */ + @added(Versions.v2023_11_15_preview) + script?: ScriptKind; + + /** Identifies the script of the input document. */ + @added(Versions.v2023_11_15_preview) + scriptCode?: ScriptCode; +} + +/** Identifies the script of the input document. Maps to the ISO 15924 standard formal name. */ +@added(Versions.v2023_11_15_preview) +union ScriptKind { + string, + + /** Script name for the Arabic script. */ + @added(Versions.v2023_11_15_preview) + Arabic: "Arabic", + + /** Script name for the Armenian script. */ + @added(Versions.v2023_11_15_preview) + Armenian: "Armenian", + + /** Script name for the Bangla script. */ + @added(Versions.v2023_11_15_preview) + Bangla: "Bangla", + + /** Script name for the UnifiedCanadianAboriginalSyllabics script. */ + @added(Versions.v2023_11_15_preview) + UnifiedCanadianAboriginalSyllabics: "UnifiedCanadianAboriginalSyllabics", + + /** Script name for the Cyrillic script. */ + @added(Versions.v2023_11_15_preview) + Cyrillic: "Cyrillic", + + /** Script name for the Devanagari script. */ + @added(Versions.v2023_11_15_preview) + Devanagari: "Devanagari", + + /** Script name for the Ethiopic script. */ + @added(Versions.v2023_11_15_preview) + Ethiopic: "Ethiopic", + + /** Script name for the Georgian script. */ + @added(Versions.v2023_11_15_preview) + Georgian: "Georgian", + + /** Script name for the Greek script. */ + @added(Versions.v2023_11_15_preview) + Greek: "Greek", + + /** Script name for the Gujarati script. */ + @added(Versions.v2023_11_15_preview) + Gujarati: "Gujarati", + + /** Script name for the Gurmukhi script. */ + @added(Versions.v2023_11_15_preview) + Gurmukhi: "Gurmukhi", + + /** Script name for the Hangul script. */ + @added(Versions.v2023_11_15_preview) + Hangul: "Hangul", + + /** Script name for the HanSimplified script. */ + @added(Versions.v2023_11_15_preview) + HanSimplified: "HanSimplified", + + /** Script name for the HanTraditional script. */ + @added(Versions.v2023_11_15_preview) + HanTraditional: "HanTraditional", + + /** Script name for the Hebrew script. */ + @added(Versions.v2023_11_15_preview) + Hebrew: "Hebrew", + + /** Script name for the Japanese script. */ + @added(Versions.v2023_11_15_preview) + Japanese: "Japanese", + + /** Script name for the Khmer script. */ + @added(Versions.v2023_11_15_preview) + Khmer: "Khmer", + + /** Script name for the Kannada script. */ + @added(Versions.v2023_11_15_preview) + Kannada: "Kannada", + + /** Script name for the Lao script. */ + @added(Versions.v2023_11_15_preview) + Lao: "Lao", + + /** Script name for the Latin script. */ + @added(Versions.v2023_11_15_preview) + Latin: "Latin", + + /** Script name for the Malayalam script. */ + @added(Versions.v2023_11_15_preview) + Malayalam: "Malayalam", + + /** Script name for the Myanmar script. */ + @added(Versions.v2023_11_15_preview) + Myanmar: "Myanmar", + + /** Script name for the Odia script. */ + @added(Versions.v2023_11_15_preview) + Odia: "Odia", + + /** Script name for the Sinhala script. */ + @added(Versions.v2023_11_15_preview) + Sinhala: "Sinhala", + + /** Script name for the Tamil script. */ + @added(Versions.v2023_11_15_preview) + Tamil: "Tamil", + + /** Script name for the Telugu script. */ + @added(Versions.v2023_11_15_preview) + Telugu: "Telugu", + + /** Script name for the Thaana script. */ + @added(Versions.v2023_11_15_preview) + Thaana: "Thaana", + + /** Script name for the Thai script. */ + @added(Versions.v2023_11_15_preview) + Thai: "Thai", + + /** Script name for the Tibetan script. */ + @added(Versions.v2023_11_15_preview) + Tibetan: "Tibetan", +} + +/** Identifies the script of the input document. Maps to the ISO 15924 standard script code. */ +@added(Versions.v2023_11_15_preview) +union ScriptCode { + string, + + /** Script code for the Arabic script. */ + @added(Versions.v2023_11_15_preview) + Arab: "Arab", + + /** Script code for the Armenian script. */ + @added(Versions.v2023_11_15_preview) + Armn: "Armn", + + /** Script code for the Bangla script. */ + @added(Versions.v2023_11_15_preview) + Beng: "Beng", + + /** Script code for the UnifiedCanadianAboriginalSyllabics script. */ + @added(Versions.v2023_11_15_preview) + Cans: "Cans", + + /** Script code for the Cyrillic script. */ + @added(Versions.v2023_11_15_preview) + Cyrl: "Cyrl", + + /** Script code for the Devanagari script. */ + @added(Versions.v2023_11_15_preview) + Deva: "Deva", + + /** Script code for the Ethiopic script. */ + @added(Versions.v2023_11_15_preview) + Ethi: "Ethi", + + /** Script code for the Georgian script. */ + @added(Versions.v2023_11_15_preview) + Geor: "Geor", + + /** Script code for the Greek script. */ + @added(Versions.v2023_11_15_preview) + Grek: "Grek", + + /** Script code for the Gujarati script. */ + @added(Versions.v2023_11_15_preview) + Gujr: "Gujr", + + /** Script code for the Gurmukhi script. */ + @added(Versions.v2023_11_15_preview) + Guru: "Guru", + + /** Script code for the Hangul script. */ + @added(Versions.v2023_11_15_preview) + Hang: "Hang", + + /** Script code for the HanSimplified script. */ + @added(Versions.v2023_11_15_preview) + Hans: "Hans", + + /** Script code for the HanTraditional script. */ + @added(Versions.v2023_11_15_preview) + Hant: "Hant", + + /** Script code for the Hebrew script. */ + @added(Versions.v2023_11_15_preview) + Hebr: "Hebr", + + /** Script code for the Japanese script. */ + @added(Versions.v2023_11_15_preview) + Jpan: "Jpan", + + /** Script code for the Khmer script. */ + @added(Versions.v2023_11_15_preview) + Khmr: "Khmr", + + /** Script code for the Kannada script. */ + @added(Versions.v2023_11_15_preview) + Knda: "Knda", + + /** Script code for the Lao script. */ + @added(Versions.v2023_11_15_preview) + Laoo: "Laoo", + + /** Script code for the Latin script. */ + @added(Versions.v2023_11_15_preview) + Latn: "Latn", + + /** Script code for the Malayalam script. */ + @added(Versions.v2023_11_15_preview) + Mlym: "Mlym", + + /** Script code for the Myanmar script. */ + @added(Versions.v2023_11_15_preview) + Mymr: "Mymr", + + /** Script code for the Odia script. */ + @added(Versions.v2023_11_15_preview) + Orya: "Orya", + + /** Script code for the Sinhala script. */ + @added(Versions.v2023_11_15_preview) + Sinh: "Sinh", + + /** Script code for the Tamil script. */ + @added(Versions.v2023_11_15_preview) + Taml: "Taml", + + /** Script code for the Telugu script. */ + @added(Versions.v2023_11_15_preview) + Telu: "Telu", + + /** Script code for the Thaana script. */ + @added(Versions.v2023_11_15_preview) + Thaa: "Thaa", + + /** Script code for the Thai script. */ + @added(Versions.v2023_11_15_preview) + Thai: "Thai", + + /** Script code for the Tibetan script. */ + @added(Versions.v2023_11_15_preview) + Tibt: "Tibt", +} + +/** Contains the language detection input. */ +model LanguageInput { + /** A unique, non-empty document identifier. */ + id: string; + + /** The input text to process. */ + text: string; + + /** The country hint to help with language detection of the text. */ + countryHint?: string; +} diff --git a/specification/cognitiveservices/Language.AnalyzeText/models/pii.entity.recognition.tsp b/specification/cognitiveservices/Language.AnalyzeText/models/pii.entity.recognition.tsp new file mode 100644 index 000000000000..9e85688251ce --- /dev/null +++ b/specification/cognitiveservices/Language.AnalyzeText/models/pii.entity.recognition.tsp @@ -0,0 +1,640 @@ +import "@typespec/versioning"; +import "@azure-tools/typespec-client-generator-core"; + +using Azure.ClientGenerator.Core; +using TypeSpec.Versioning; + +namespace Language.AnalyzeText; + +/** Contains the analyze text PIIEntityRecognition task input. */ +#suppress "@azure-tools/typespec-azure-core/casing-style" +model AnalyzeTextPiiEntitiesRecognitionInput extends AnalyzeTextTask { + /** Kind of the task. */ + kind: AnalyzeTextTaskKind.PiiEntityRecognition; + + /** Contains the input documents. */ + analysisInput?: MultiLanguageAnalysisInput; + + /** Pii task parameters. */ + parameters?: PiiTaskParameters; +} + +/** Supported parameters for a PII Entities Recognition task. */ +#suppress "@azure-tools/typespec-azure-core/casing-style" +model PiiTaskParameters is PreBuiltTaskParameters { + /** Domain for PII task */ + domain?: PiiDomain = PiiDomain.none; + + /** Enumeration of PII categories to be returned in the response. */ + piiCategories?: Array; + + /** StringIndexType to be used for analysis. */ + stringIndexType?: StringIndexType = StringIndexType.TextElements_v8; + + /** Enumeration of PII categories to be excluded in the response. */ + @added(Versions.v2023_11_15_preview) + excludePiiCategories?: Array; + + /** Character to be used for redaction. Default in '*'. */ + @added(Versions.v2023_11_15_preview) + redactionCharacter?: redactionCharacter = redactionCharacter.asterisk; +} + +/** Contains the analyze text PIIEntityRecognition LRO task. */ +#suppress "@azure-tools/typespec-azure-core/casing-style" +model PiiLROTask extends AnalyzeTextLROTask { + /** Kind of the task. */ + kind: AnalyzeTextLROTaskKind.PiiEntityRecognition; + + /** Pii task parameters. */ + parameters?: PiiTaskParameters; +} + +/** Contains the analyze text PIIEntityRecognition LRO task. */ +#suppress "@azure-tools/typespec-azure-core/casing-style" +model PiiTaskResult extends AnalyzeTextTaskResult { + /** The kind of the task. */ + kind: AnalyzeTextTaskResultsKind.PiiEntityRecognitionResults; + + /** The list of pii results */ + results: PiiResult; +} + +/** Contains the PiiResult. */ +#suppress "@azure-tools/typespec-azure-core/casing-style" +model PiiResult is PreBuiltResult { + /** Response by document */ + @typeChangedFrom( + Versions.v2023_11_15_preview, + Array + ) + documents: Array; +} + +/** PII domains. */ +union PiiDomain { + string, + + /** Indicates that entities in the Personal Health Information domain should be redacted. */ + phi: "phi", + + /** Indicates that no domain is specified. */ + none: "none", +} + +/** Contains the PII results. */ +#suppress "@azure-tools/typespec-azure-core/casing-style" +model PiiEntitiesDocumentResult is DocumentResult { + /** Returns redacted text. */ + redactedText: string; + + /** Recognized entities in the document. */ + entities: Array; +} + +/** Contains the PII results with detected language. */ +#suppress "@azure-tools/typespec-azure-core/casing-style" +model PiiResultWithDetectedLanguage { + ...PiiEntitiesDocumentResult; + ...DocumentDetectedLanguage; +} + +/** (Optional) describes the PII categories to return */ +union PiiCategory { + string, + PiiCategoriesExclude, + + /** All PII categories. */ + All: "All", + + /** Default PII categories for the language. */ + Default: "Default", +} + +/** Contains the PII LRO results. */ +#suppress "@azure-tools/typespec-azure-core/casing-style" +model PiiEntityRecognitionLROResult extends AnalyzeTextLROResult { + /** The kind of the task. */ + kind: AnalyzeTextLROResultsKind.PiiEntityRecognitionLROResults; + + /** The list of pii results */ + results: PiiResult; +} + +/** (Optional) describes the PII categories to return */ +union PiiCategoriesExclude { + string, + + /** ABA Routing number */ + ABARoutingNumber: "ABARoutingNumber", + + /** AR National Identity Number */ + ARNationalIdentityNumber: "ARNationalIdentityNumber", + + /** AT Identity Card */ + AUBankAccountNumber: "AUBankAccountNumber", + + /** AU Driver's License Number */ + AUDriversLicenseNumber: "AUDriversLicenseNumber", + + /** AU Medical Account Number */ + AUMedicalAccountNumber: "AUMedicalAccountNumber", + + /** AU Passport Number */ + AUPassportNumber: "AUPassportNumber", + + /** AU Tax File Number */ + AUTaxFileNumber: "AUTaxFileNumber", + + /** AU Business Number */ + AUBusinessNumber: "AUBusinessNumber", + + /** AU Company Number */ + AUCompanyNumber: "AUCompanyNumber", + + /** AT Identity Card */ + ATIdentityCard: "ATIdentityCard", + + /** AT Tax Identification Number */ + ATTaxIdentificationNumber: "ATTaxIdentificationNumber", + + /** AT Value Added Tax Number */ + ATValueAddedTaxNumber: "ATValueAddedTaxNumber", + + /** Azure Document DB Auth Key */ + AzureDocumentDBAuthKey: "AzureDocumentDBAuthKey", + + /** Azure IAAS Database Connection And SQL String */ + AzureIAASDatabaseConnectionAndSQLString: "AzureIAASDatabaseConnectionAndSQLString", + + /** Azure IoT Connection String */ + AzureIoTConnectionString: "AzureIoTConnectionString", + + /** Azure Publish Setting Password */ + AzurePublishSettingPassword: "AzurePublishSettingPassword", + + /** Azure Redis Cache String */ + AzureRedisCacheString: "AzureRedisCacheString", + + /** Azure SAS */ + AzureSAS: "AzureSAS", + + /** Azure Service Bus String */ + AzureServiceBusString: "AzureServiceBusString", + + /** Azure Storage Account Key */ + AzureStorageAccountKey: "AzureStorageAccountKey", + + /** Azure Storage Account Generic */ + AzureStorageAccountGeneric: "AzureStorageAccountGeneric", + + /** BE National Number */ + BENationalNumber: "BENationalNumber", + + /** BE National Number V2 */ + BENationalNumberV2: "BENationalNumberV2", + + /** BE Value Added Tax Number */ + BEValueAddedTaxNumber: "BEValueAddedTaxNumber", + + /** BR CPF Number */ + BRCPFNumber: "BRCPFNumber", + + /** BR Legal Entity Number */ + BRLegalEntityNumber: "BRLegalEntityNumber", + + /** BR National ID RG */ + BRNationalIDRG: "BRNationalIDRG", + + /** BG Uniform Civil Number */ + BGUniformCivilNumber: "BGUniformCivilNumber", + + /** CA Bank Account Number */ + CABankAccountNumber: "CABankAccountNumber", + + /** CA Driver's License Number */ + CADriversLicenseNumber: "CADriversLicenseNumber", + + /** CA Health Service Number */ + CAHealthServiceNumber: "CAHealthServiceNumber", + + /** CA Passport Number */ + CAPassportNumber: "CAPassportNumber", + + /** CA Personal Health Identification */ + CAPersonalHealthIdentification: "CAPersonalHealthIdentification", + + /** CA Social Insurance Number */ + CASocialInsuranceNumber: "CASocialInsuranceNumber", + + /** CL Identity Card Number */ + CLIdentityCardNumber: "CLIdentityCardNumber", + + /** CN Resident Identity Card Number */ + CNResidentIdentityCardNumber: "CNResidentIdentityCardNumber", + + /** Credit Card Number */ + CreditCardNumber: "CreditCardNumber", + + /** HR Identity Card Number */ + HRIdentityCardNumber: "HRIdentityCardNumber", + + /** HR National ID Number */ + HRNationalIDNumber: "HRNationalIDNumber", + + /** HR Personal Identification Number */ + HRPersonalIdentificationNumber: "HRPersonalIdentificationNumber", + + /** HR Personal Identification OIB Number V2 */ + HRPersonalIdentificationOIBNumberV2: "HRPersonalIdentificationOIBNumberV2", + + /** CY Identity Card */ + CYIdentityCard: "CYIdentityCard", + + /** CY Tax Identification Number */ + CYTaxIdentificationNumber: "CYTaxIdentificationNumber", + + /** CZ Personal Identity Number */ + CZPersonalIdentityNumber: "CZPersonalIdentityNumber", + + /** CZ Personal Identity V2 */ + CZPersonalIdentityV2: "CZPersonalIdentityV2", + + /** DK Personal Identification Number */ + DKPersonalIdentificationNumber: "DKPersonalIdentificationNumber", + + /** DK Personal Identification V2 */ + DKPersonalIdentificationV2: "DKPersonalIdentificationV2", + + /** Drug Enforcement Agency Number */ + DrugEnforcementAgencyNumber: "DrugEnforcementAgencyNumber", + + /** EE Personal Identification Code */ + EEPersonalIdentificationCode: "EEPersonalIdentificationCode", + + /** EU Debit Card Number */ + EUDebitCardNumber: "EUDebitCardNumber", + + /** EU Driver's License Number */ + EUDriversLicenseNumber: "EUDriversLicenseNumber", + + /** EU GPS Coordinates */ + EUGPSCoordinates: "EUGPSCoordinates", + + /** EU National Identification Number */ + EUNationalIdentificationNumber: "EUNationalIdentificationNumber", + + /** EU Passport Number */ + EUPassportNumber: "EUPassportNumber", + + /** EU Social Security Number */ + EUSocialSecurityNumber: "EUSocialSecurityNumber", + + /** EU Tax Identification Number */ + EUTaxIdentificationNumber: "EUTaxIdentificationNumber", + + /** FI European Health Number */ + FIEuropeanHealthNumber: "FIEuropeanHealthNumber", + + /** FI National ID */ + FINationalID: "FINationalID", + + /** FI National ID V2 */ + FINationalIDV2: "FINationalIDV2", + + /** FI Passport Number */ + FIPassportNumber: "FIPassportNumber", + + /** FR Driver's License Number */ + FRDriversLicenseNumber: "FRDriversLicenseNumber", + + /** FR Health Insurance Number */ + FRHealthInsuranceNumber: "FRHealthInsuranceNumber", + + /** FR National ID */ + FRNationalID: "FRNationalID", + + /** FR Passport Number */ + FRPassportNumber: "FRPassportNumber", + + /** FR Social Security Number */ + FRSocialSecurityNumber: "FRSocialSecurityNumber", + + /** FR Tax Identification Number */ + FRTaxIdentificationNumber: "FRTaxIdentificationNumber", + + /** FR Value Added Tax Number */ + FRValueAddedTaxNumber: "FRValueAddedTaxNumber", + + /** DE Driver's License Number */ + DEDriversLicenseNumber: "DEDriversLicenseNumber", + + /** DE Passport Number */ + DEPassportNumber: "DEPassportNumber", + + /** DE Identity Card Number */ + DEIdentityCardNumber: "DEIdentityCardNumber", + + /** DE Tax Identification Number */ + DETaxIdentificationNumber: "DETaxIdentificationNumber", + + /** DE Value Added Number */ + DEValueAddedNumber: "DEValueAddedNumber", + + /** GR National ID Card */ + GRNationalIDCard: "GRNationalIDCard", + + /** GR National ID V2 */ + GRNationalIDV2: "GRNationalIDV2", + + /** GR Tax Identification Number */ + GRTaxIdentificationNumber: "GRTaxIdentificationNumber", + + /** HK Identity Card Number */ + HKIdentityCardNumber: "HKIdentityCardNumber", + + /** HU Value Added Number */ + HUValueAddedNumber: "HUValueAddedNumber", + + /** HU Personal Identification Number */ + HUPersonalIdentificationNumber: "HUPersonalIdentificationNumber", + + /** HU Tax Identification Number */ + HUTaxIdentificationNumber: "HUTaxIdentificationNumber", + + /** IN Permanent Account */ + INPermanentAccount: "INPermanentAccount", + + /** IN Unique Identification Number */ + INUniqueIdentificationNumber: "INUniqueIdentificationNumber", + + /** ID Identity Card Number */ + IDIdentityCardNumber: "IDIdentityCardNumber", + + /** International Banking Account Number */ + InternationalBankingAccountNumber: "InternationalBankingAccountNumber", + + /** IE Personal Public Service Number */ + IEPersonalPublicServiceNumber: "IEPersonalPublicServiceNumber", + + /** IE Personal Public Service Number V2 */ + IEPersonalPublicServiceNumberV2: "IEPersonalPublicServiceNumberV2", + + /** IL Bank Account Number */ + ILBankAccountNumber: "ILBankAccountNumber", + + /** IL National ID */ + ILNationalID: "ILNationalID", + + /** IT Driver's License Number */ + ITDriversLicenseNumber: "ITDriversLicenseNumber", + + /** IT Fiscal Code */ + ITFiscalCode: "ITFiscalCode", + + /** IT Value Added Tax Number */ + ITValueAddedTaxNumber: "ITValueAddedTaxNumber", + + /** JP Bank Account Number */ + JPBankAccountNumber: "JPBankAccountNumber", + + /** JP Driver's License Number */ + JPDriversLicenseNumber: "JPDriversLicenseNumber", + + /** JP Passport Number */ + JPPassportNumber: "JPPassportNumber", + + /** JP Resident Registration Number */ + JPResidentRegistrationNumber: "JPResidentRegistrationNumber", + + /** JP Social Insurance Number */ + JPSocialInsuranceNumber: "JPSocialInsuranceNumber", + + /** JP My Number Corporate */ + JPMyNumberCorporate: "JPMyNumberCorporate", + + /** JP My Number Personal */ + JPMyNumberPersonal: "JPMyNumberPersonal", + + /** JP Residence Card Number */ + JPResidenceCardNumber: "JPResidenceCardNumber", + + /** LV Personal Code */ + LVPersonalCode: "LVPersonalCode", + + /** LT Personal Code */ + LTPersonalCode: "LTPersonalCode", + + /** LU National Identification Number Natural */ + LUNationalIdentificationNumberNatural: "LUNationalIdentificationNumberNatural", + + /** LU National Identification Number Non Natural */ + LUNationalIdentificationNumberNonNatural: "LUNationalIdentificationNumberNonNatural", + + /** MY Identity Card Number */ + MYIdentityCardNumber: "MYIdentityCardNumber", + + /** MT Identity Card Number */ + MTIdentityCardNumber: "MTIdentityCardNumber", + + /** MT Tax ID Number */ + MTTaxIDNumber: "MTTaxIDNumber", + + /** NL Citizens Service Number */ + NLCitizensServiceNumber: "NLCitizensServiceNumber", + + /** NL Citizens Service Number V2 */ + NLCitizensServiceNumberV2: "NLCitizensServiceNumberV2", + + /** NL Tax Identification Number */ + NLTaxIdentificationNumber: "NLTaxIdentificationNumber", + + /** NL Value Added Tax Number */ + NLValueAddedTaxNumber: "NLValueAddedTaxNumber", + + /** NZ Bank Account Number */ + NZBankAccountNumber: "NZBankAccountNumber", + + /** NZ Driver's License Number */ + NZDriversLicenseNumber: "NZDriversLicenseNumber", + + /** NZ Inland Revenue Number */ + NZInlandRevenueNumber: "NZInlandRevenueNumber", + + /** NZ Ministry Of Health Number */ + NZMinistryOfHealthNumber: "NZMinistryOfHealthNumber", + + /** NZ Social Welfare Number */ + NZSocialWelfareNumber: "NZSocialWelfareNumber", + + /** NO Identity Number */ + NOIdentityNumber: "NOIdentityNumber", + + /** PH Unified Multi Purpose ID Number */ + PHUnifiedMultiPurposeIDNumber: "PHUnifiedMultiPurposeIDNumber", + + /** PL Identity Card */ + PLIdentityCard: "PLIdentityCard", + + /** PL National ID */ + PLNationalID: "PLNationalID", + + /** PL National ID V2 */ + PLNationalIDV2: "PLNationalIDV2", + + /** PL Passport Number */ + PLPassportNumber: "PLPassportNumber", + + /** PL Tax Identification Number */ + PLTaxIdentificationNumber: "PLTaxIdentificationNumber", + + /** PL REGON Number */ + PLREGONNumber: "PLREGONNumber", + + /** PT Citizen Card Number */ + PTCitizenCardNumber: "PTCitizenCardNumber", + + /** PT Citizen Card Number V2 */ + PTCitizenCardNumberV2: "PTCitizenCardNumberV2", + + /** PT Tax Identification Number */ + PTTaxIdentificationNumber: "PTTaxIdentificationNumber", + + /** RO Personal Numerical Code */ + ROPersonalNumericalCode: "ROPersonalNumericalCode", + + /** RU Passport Number Domestic */ + RUPassportNumberDomestic: "RUPassportNumberDomestic", + + /** RU Passport Number International */ + RUPassportNumberInternational: "RUPassportNumberInternational", + + /** SA National ID */ + SANationalID: "SANationalID", + + /** SG National Registration Identity Card Number */ + SGNationalRegistrationIdentityCardNumber: "SGNationalRegistrationIdentityCardNumber", + + /** SK Personal Number */ + SKPersonalNumber: "SKPersonalNumber", + + /** SI Tax Identification Number */ + SITaxIdentificationNumber: "SITaxIdentificationNumber", + + /** SI Unique Master Citizen Number */ + SIUniqueMasterCitizenNumber: "SIUniqueMasterCitizenNumber", + + /** ZA Identification Number */ + ZAIdentificationNumber: "ZAIdentificationNumber", + + /** KR Resident Registration Number */ + KRResidentRegistrationNumber: "KRResidentRegistrationNumber", + + /** ES DNI */ + ESDNI: "ESDNI", + + /** ES Social Security Number */ + ESSocialSecurityNumber: "ESSocialSecurityNumber", + + /** ES Tax Identification Number */ + ESTaxIdentificationNumber: "ESTaxIdentificationNumber", + + /** SQL Server Connection String */ + SQLServerConnectionString: "SQLServerConnectionString", + + /** SE National ID */ + SENationalID: "SENationalID", + + /** SE National ID V2 */ + SENationalIDV2: "SENationalIDV2", + + /** SE Passport Number */ + SEPassportNumber: "SEPassportNumber", + + /** SE Tax Identification Number */ + SETaxIdentificationNumber: "SETaxIdentificationNumber", + + /** SWIFT Code */ + SWIFTCode: "SWIFTCode", + + /** CH Social Security Number */ + CHSocialSecurityNumber: "CHSocialSecurityNumber", + + /** TW National ID */ + TWNationalID: "TWNationalID", + + /** TW Passport Number */ + TWPassportNumber: "TWPassportNumber", + + /** TW Resident Certificate */ + TWResidentCertificate: "TWResidentCertificate", + + /** TH Population Identification Code */ + THPopulationIdentificationCode: "THPopulationIdentificationCode", + + /** TR National Identification Number */ + TRNationalIdentificationNumber: "TRNationalIdentificationNumber", + + /** UK Driver's License Number */ + UKDriversLicenseNumber: "UKDriversLicenseNumber", + + /** UK Electoral Roll Number */ + UKElectoralRollNumber: "UKElectoralRollNumber", + + /** UK National Health Number */ + UKNationalHealthNumber: "UKNationalHealthNumber", + + /** UK National Insurance Number */ + UKNationalInsuranceNumber: "UKNationalInsuranceNumber", + + /** UK Unique Taxpayer Number */ + UKUniqueTaxpayerNumber: "UKUniqueTaxpayerNumber", + + /** US UK Passport Number */ + USUKPassportNumber: "USUKPassportNumber", + + /** US Bank Account Number */ + USBankAccountNumber: "USBankAccountNumber", + + /** US Driver's License Number */ + USDriversLicenseNumber: "USDriversLicenseNumber", + + /** US Individual Taxpayer Identification */ + USIndividualTaxpayerIdentification: "USIndividualTaxpayerIdentification", + + /** US Social Security Number */ + USSocialSecurityNumber: "USSocialSecurityNumber", + + /** UA Passport Number Domestic */ + UAPassportNumberDomestic: "UAPassportNumberDomestic", + + /** UA Passport Number International */ + UAPassportNumberInternational: "UAPassportNumberInternational", + + /** Organization */ + Organization: "Organization", + + /** Email */ + Email: "Email", + + /** URL */ + URL: "URL", + + /** Age */ + Age: "Age", + + /** Phone Number */ + PhoneNumber: "PhoneNumber", + + /** IP Address */ + IPAddress: "IPAddress", + + /** Date */ + Date: "Date", + + /** Person */ + Person: "Person", + + /** Address */ + Address: "Address", +} diff --git a/specification/cognitiveservices/Language.AnalyzeText/models/sentiment.analysis.tsp b/specification/cognitiveservices/Language.AnalyzeText/models/sentiment.analysis.tsp new file mode 100644 index 000000000000..b51b03ab81f5 --- /dev/null +++ b/specification/cognitiveservices/Language.AnalyzeText/models/sentiment.analysis.tsp @@ -0,0 +1,278 @@ +import "@typespec/versioning"; +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-client-generator-core"; + +using Azure.ClientGenerator.Core; +using TypeSpec.Versioning; +using Azure.Core; + +namespace Language.AnalyzeText; + +/** Contains the analyze text SentimentAnalysis task input. */ +model AnalyzeTextSentimentAnalysisInput extends AnalyzeTextTask { + /** Kind of the task. */ + kind: AnalyzeTextTaskKind.SentimentAnalysis; + + /** Contains the input documents. */ + analysisInput?: MultiLanguageAnalysisInput; + + /** Sentiment Analysis task parameters. */ + parameters?: SentimentAnalysisTaskParameters; +} + +/** Supported parameters for a Sentiment Analysis task. */ +model SentimentAnalysisTaskParameters is PreBuiltTaskParameters { + /** Whether to use opinion mining in the request or not. */ + opinionMining?: boolean = false; + + /** Specifies the method used to interpret string offsets. */ + stringIndexType?: StringIndexType = StringIndexType.TextElements_v8; +} + +/** An object representing the task definition for a Sentiment Analysis task. */ +#suppress "@azure-tools/typespec-azure-core/casing-style" +model SentimentAnalysisLROTask extends AnalyzeTextLROTask { + /** The Sentiment Analysis kind of the long running task. */ + kind: AnalyzeTextLROTaskKind.SentimentAnalysis; + + /** Parameters for the Sentiment Analysis task. */ + parameters?: SentimentAnalysisTaskParameters; +} + +/** Contains the analyze text SentimentAnalysis LRO task result. */ +model SentimentTaskResult extends AnalyzeTextTaskResult { + /** Kind of the task. */ + kind: AnalyzeTextTaskResultsKind.SentimentAnalysisResults; + + /** The sentiment analysis results */ + results: SentimentResponse; +} + +/** The predicted Sentiment for the sentence. */ +#suppress "@azure-tools/typespec-azure-core/no-closed-literal-union" // defined as closed enum +union SentenceSentimentValue { + /** Positive sentiment */ + positive: "positive", + + /** Neutral sentiment */ + neutral: "neutral", + + /** Negative sentiment */ + negative: "negative", +} + +/** The predicted Sentiment for the sentence. */ +#suppress "@azure-tools/typespec-azure-core/no-closed-literal-union" // defined as closed enum +union TokenSentimentValue { + /** Positive sentiment */ + positive: "positive", + + /** Mixed sentiment */ + mixed: "mixed", + + /** Negative sentiment */ + negative: "negative", +} + +/** Sentiment analysis results for the input documents. */ +model SentimentResponse is PreBuiltResult { + /** The sentiment analysis results for each document in the input. */ + @typeChangedFrom(Versions.v2023_11_15_preview, Array) + documents: Array; +} + +/** Sentiment analysis per document. */ +model SentimentDocumentResultWithDetectedLanguage { + ...SentimentDocumentResult; + ...DocumentDetectedLanguage; +} + +/** An object representing the pre-built Sentiment Analysis results of each document. */ +model SentimentDocumentResult is DocumentResult { + /** Predicted sentiment for document (Negative, Neutral, Positive, or Mixed). */ + sentiment: DocumentSentimentValue; + + /** The sentiment confidence score between 0 and 1 for the sentence for all classes. */ + confidenceScores: SentimentConfidenceScores; + + /** The document's sentences sentiment. */ + sentences: Array; +} + +/** A document's sentence sentiment. */ +model SentenceSentiment { + /** The sentence text. */ + text: string; + + /** The predicted Sentiment for the sentence. */ + sentiment: SentenceSentimentValue; + + /** The sentiment confidence score between 0 and 1 for the sentence for all classes. */ + confidenceScores: SentimentConfidenceScores; + + /** The target offset from the start of the sentence. */ + offset: int32; + + /** The length of the target. */ + length: int32; + + /** The array of sentence targets for the sentence. */ + targets?: Array; + + /** The array of assessments for the sentence. */ + assessments?: Array; +} + +/** Represents a sentence target and the assessments or target objects related to it. */ +model SentenceTarget { + /** The sentiment of the sentence. */ + sentiment: TokenSentimentValue; + + /** Represents the confidence scores across all sentiment classes: positive and negative. */ + confidenceScores: TargetConfidenceScoreLabel; + + /** The target offset from the start of the sentence. */ + offset: int32; + + /** The length of the target. */ + length: int32; + + /** The target text detected. */ + text: string; + + /** The array of either assessment or target objects which is related to the target. */ + relations: Array; +} + +/** Represents a sentence assessment and the assessments or target objects related to it. */ +model SentenceAssessment { + /** The sentiment of the sentence. */ + sentiment: TokenSentimentValue; + + /** Represents the confidence scores across all sentiment classes: positive and negative. */ + confidenceScores: TargetConfidenceScoreLabel; + + /** The target offset from the start of the sentence. */ + offset: int32; + + /** The length of the target. */ + length: int32; + + /** The target text detected. */ + text: string; + + /** The indicator representing if the assessment is negated. */ + isNegated: boolean; +} + +/** Represents the relation between assessments and/or targets. */ +model TargetRelation { + /** The JSON pointer indicating the linked object. */ + ref: string; + + /** The type related to the target. */ + relationType: TargetRelationType; +} + +/** The type related to the target. */ +#suppress "@azure-tools/typespec-azure-core/no-closed-literal-union" // defined as closed enum +union TargetRelationType { + #suppress "@azure-tools/typespec-azure-core/documentation-required" + assessment: "assessment", + #suppress "@azure-tools/typespec-azure-core/documentation-required" + target: "target", +} + +/** Represents the confidence scores across all sentiment classes: positive and negative. */ +model TargetConfidenceScoreLabel { + /** Confidence score for positive sentiment */ + positive: float64; + + /** Confidence score for negative sentiment */ + negative: float64; +} + +/** Contains the Sentiment Analysis LRO results. */ +#suppress "@azure-tools/typespec-azure-core/casing-style" +model SentimentLROResult extends AnalyzeTextLROResult { + /** Kind of the task. */ + kind: AnalyzeTextLROResultsKind.SentimentAnalysisLROResults; + + /** The sentiment analysis results */ + results: SentimentResponse; +} + +/** A document's sentence custom sentiment. */ +@added(Versions.v2023_11_15_preview) +model CustomSentenceSentiment { + /** The sentence text. */ + text: string; + + /** The predicted Sentiment for the sentence. */ + sentiment: SentenceSentimentValue; + + /** The sentiment confidence score between 0 and 1 for the sentence for all classes. */ + confidenceScores: SentimentConfidenceScores; + + /** The target offset from the start of the sentence. */ + offset: int32; + + /** The length of the target. */ + length: int32; +} + +/** An object representing the Custom Sentiment Analysis results of each document. */ +@added(Versions.v2023_11_15_preview) +model CustomSentimentDocumentResult is DocumentResult { + /** Predicted sentiment for document (Negative, Neutral, Positive, or Mixed). */ + sentiment: DocumentSentimentValue; + + /** The sentiment confidence score between 0 and 1 for the sentence for all classes. */ + confidenceScores: SentimentConfidenceScores; + + /** The document's sentences sentiment. */ + sentences: Array; +} + +/** Supported parameters for a Custom Sentiment Analysis task. */ +@added(Versions.v2023_11_15_preview) +model CustomSentimentAnalysisTaskParameters is CustomTaskParameters { + /** Specifies the method used to interpret string offsets. */ + stringIndexType?: StringIndexType = StringIndexType.TextElements_v8; +} + +/** Use custom models to ease the process of sentiment analysis from documents like product reviews */ +#suppress "@azure-tools/typespec-azure-core/casing-style" +@added(Versions.v2023_11_15_preview) +model CustomSentimentAnalysisLROTask extends AnalyzeTextLROTask { + /** Kind of the task. */ + kind: AnalyzeTextLROTaskKind.CustomSentimentAnalysis; + + /** Custom Sentiment Analysis task parameters. */ + parameters?: CustomSentimentAnalysisTaskParameters; +} + +/** Custom Sentiment analysis results for the input documents. */ +@added(Versions.v2023_11_15_preview) +model CustomSentimentAnalysisResult is CustomResult { + /** The custom sentiment analysis results for each document in the input. */ + documents: Array; +} + +/** Custom Sentiment analysis result for a specific document. */ +@added(Versions.v2023_11_15_preview) +model CustomSentimentAnalysisResultDocument { + ...CustomSentimentDocumentResult; + ...DocumentDetectedLanguage; +} + +/** Custom Sentiment Analysis Analyze Text long tunning operation result object. */ +#suppress "@azure-tools/typespec-azure-core/casing-style" +@added(Versions.v2023_11_15_preview) +model CustomSentimentAnalysisLROResult extends AnalyzeTextLROResult { + /** Kind of the task. */ + kind: AnalyzeTextLROResultsKind.CustomSentimentAnalysisLROResults; + + /** Results of the task. */ + results: CustomSentimentAnalysisResult; +} diff --git a/specification/cognitiveservices/Language.AnalyzeText/models/summarization.tsp b/specification/cognitiveservices/Language.AnalyzeText/models/summarization.tsp new file mode 100644 index 000000000000..0b740445bbdf --- /dev/null +++ b/specification/cognitiveservices/Language.AnalyzeText/models/summarization.tsp @@ -0,0 +1,210 @@ +import "@typespec/versioning"; +import "@azure-tools/typespec-client-generator-core"; + +using Azure.ClientGenerator.Core; +using TypeSpec.Versioning; + +namespace Language.AnalyzeText; + +/** Supported parameters for an Extractive Summarization task. */ +@added(Versions.v2023_04_01) +model ExtractiveSummarizationTaskParameters is PreBuiltTaskParameters { + /** Specifies the number of sentences in the extracted summary. */ + sentenceCount?: int64 = 3; + + /** Specifies how to sort the extracted summaries. */ + sortBy?: ExtractiveSummarizationSortingCriteria = ExtractiveSummarizationSortingCriteria.Offset; + + /** Specifies the method used to interpret string offsets. */ + stringIndexType?: StringIndexType = StringIndexType.TextElements_v8; + + /** (Optional) If provided, the query will be used to extract most relevant sentences from the document. */ + @added(Versions.v2023_11_15_preview) + query?: string; +} + +/** An object representing the task definition for an Extractive Summarization task. */ +#suppress "@azure-tools/typespec-azure-core/casing-style" +@added(Versions.v2023_04_01) +model ExtractiveSummarizationLROTask extends AnalyzeTextLROTask { + /** The Extractive Summarization kind of the long running task. */ + kind: AnalyzeTextLROTaskKind.ExtractiveSummarization; + + /** Parameters for the Extractive Summarization task. */ + parameters?: ExtractiveSummarizationTaskParameters; +} + +/** An object representing the pre-built Extractive Summarization results of each document. */ +@added(Versions.v2023_04_01) +model ExtractiveSummarizationResult is PreBuiltResult { + /** Response by document */ + @added(Versions.v2023_04_01) + @typeChangedFrom( + Versions.v2023_11_15_preview, + Array + ) + documents: Array; +} + +/** The sorting criteria to use for the results of Extractive Summarization. */ +@added(Versions.v2023_04_01) +union ExtractiveSummarizationSortingCriteria { + string, + + /** Indicates that results should be sorted in order of appearance in the text. */ + Offset: "Offset", + + /** Indicates that results should be sorted in order of importance (i.e. rank score) according to the model. */ + Rank: "Rank", +} + +/** A ranked list of sentences representing the extracted summary. */ +@added(Versions.v2023_04_01) +model ExtractedSummaryDocumentResult is DocumentResult { + /** Specifies the the extracted sentences from the input document. */ + sentences: Array; +} + +/** A ranked list of sentences representing the extracted summary. */ +@added(Versions.v2023_11_15_preview) +model ExtractedSummaryDocumentResultWithDetectedLanguage + is ExtractedSummaryDocumentResult { + ...DocumentDetectedLanguage; +} + +/** Represents an extracted sentences from the input document. */ +@added(Versions.v2023_04_01) +model ExtractedSummarySentence { + /** The extracted sentence text. */ + text: string; + + /** A double value representing the relevance of the sentence within the summary. Higher values indicate higher importance. */ + rankScore: float64; + + /** The sentence offset from the start of the document, based on the value of the parameter StringIndexType. */ + offset: int32; + + /** The length of the sentence. */ + length: int32; +} + +/** An object representing the results for an Extractive Summarization task. */ +#suppress "@azure-tools/typespec-azure-core/casing-style" +@added(Versions.v2023_04_01) +model ExtractiveSummarizationLROResult extends AnalyzeTextLROResult { + /** Kind of the task. */ + kind: AnalyzeTextLROResultsKind.ExtractiveSummarizationLROResults; + + /** Results of the task. */ + results: ExtractiveSummarizationResult; +} + +/** An object representing the task definition for an Abstractive Summarization task. */ +#suppress "@azure-tools/typespec-azure-core/casing-style" +@added(Versions.v2023_04_01) +model AbstractiveSummarizationLROTask extends AnalyzeTextLROTask { + /** The Abstractive Summarization kind of the long running task. */ + kind: AnalyzeTextLROTaskKind.AbstractiveSummarization; + + /** Parameters for the Abstractive Summarization task. */ + parameters: AbstractiveSummarizationTaskParameters; +} + +/** Supported parameters for the pre-built Abstractive Summarization task. */ +@added(Versions.v2023_04_01) +model AbstractiveSummarizationTaskParameters is PreBuiltTaskParameters { + ...AbstractiveSummarizationTaskParametersBase; + + /** (Optional) If provided, the query will be used to generate the summary. */ + @added(Versions.v2023_11_15_preview) + query?: string; +} + +/** An object representing the results for an Abstractive Summarization task. */ +#suppress "@azure-tools/typespec-azure-core/casing-style" +@added(Versions.v2023_04_01) +model AbstractiveSummarizationLROResult extends AnalyzeTextLROResult { + /** Kind of the task. */ + kind: AnalyzeTextLROResultsKind.AbstractiveSummarizationLROResults; + + /** Results of the task. */ + results: AbstractiveSummarizationResult; +} + +/** An object representing the summarization results of each document. */ +@added(Versions.v2023_04_01) +model AbstractiveSummarizationResultBase { + /** Response by document */ + @added(Versions.v2023_04_01) + @typeChangedFrom( + Versions.v2023_11_15_preview, + Array + ) + documents: Array; +} + +/** An object representing the pre-built Abstractive Summarization results of each document. */ +@added(Versions.v2023_04_01) +model AbstractiveSummarizationResult is PreBuiltResult { + ...AbstractiveSummarizationResultBase; +} + +/** An object representing the pre-built Abstractive Summarization results of each document. */ +@added(Versions.v2023_04_01) +model AbstractiveSummaryDocumentResult is DocumentResult { + /** A list of abstractive summaries. */ + summaries: Array; +} + +/** An object representing the Abstractive Summarization result of a single document with detected language. */ +@added(Versions.v2023_11_15_preview) +model AbstractiveSummaryDocumentResultWithDetectedLanguage + is AbstractiveSummaryDocumentResult { + ...DocumentDetectedLanguage; +} + +/** An object representing a single summary with context for given document. */ +@added(Versions.v2023_04_01) +model AbstractiveSummary { + /** The text of the summary. */ + text: string; + + /** The context list of the summary. */ + contexts?: Array; +} + +/** An object representing the task definition for an Custom Abstractive Summarization task. */ +#suppress "@azure-tools/typespec-azure-core/casing-style" +@added(Versions.v2023_11_15_preview) +model CustomAbstractiveSummarizationLROTask extends AnalyzeTextLROTask { + /** The Custom Abstractive Summarization kind of the long running task. */ + kind: AnalyzeTextLROTaskKind.CustomAbstractiveSummarization; + + /** Parameters for the Custom Abstractive Summarization task. */ + parameters: CustomAbstractiveSummarizationTaskParameters; +} + +/** Supported parameters for the Custom Abstractive Summarization task. */ +@added(Versions.v2023_11_15_preview) +model CustomAbstractiveSummarizationTaskParameters + is AbstractiveSummarizationTaskParametersBase { + ...CustomTaskParameters; +} + +/** An object representing the results for an Custom Abstractive Summarization task. */ +#suppress "@azure-tools/typespec-azure-core/casing-style" +@added(Versions.v2023_11_15_preview) +model CustomAbstractiveSummarizationLROResult extends AnalyzeTextLROResult { + /** Kind of the task. */ + kind: AnalyzeTextLROResultsKind.CustomAbstractiveSummarizationLROResults; + + /** Results of the task. */ + results: CustomAbstractiveSummarizationResult; +} + +/** An object representing the custom summarization results of each document. */ +@added(Versions.v2023_11_15_preview) +model CustomAbstractiveSummarizationResult + is AbstractiveSummarizationResultBase { + ...CustomResult; +} diff --git a/specification/cognitiveservices/Language.AnalyzeText/tspconfig.yaml b/specification/cognitiveservices/Language.AnalyzeText/tspconfig.yaml new file mode 100644 index 000000000000..6203c95f9ff2 --- /dev/null +++ b/specification/cognitiveservices/Language.AnalyzeText/tspconfig.yaml @@ -0,0 +1,21 @@ +parameters: + "service-dir": + default: "sdk/textanalytics" +emit: + - "@azure-tools/typespec-autorest" +linter: + extends: + - "@azure-tools/typespec-azure-core/all" +options: + "@azure-tools/typespec-autorest": + omit-unreachable-types: true + azure-resource-provider-folder: "data-plane" + emitter-output-dir: "{project-root}/.." + examples-directory: "{project-root}/examples" + output-file: "{azure-resource-provider-folder}/Language/{version-status}/{version}/analyzetext.json" + "@azure-tools/typespec-csharp": + package-dir: "Azure.AI.Language.AnalyzeText" + clear-output-folder: true + model-namespace: false + namespace: "Azure.AI.Language.AnalyzeText" + flavor: azure diff --git a/specification/cognitiveservices/Language.Conversations/client.tsp b/specification/cognitiveservices/Language.Conversations/client.tsp new file mode 100644 index 000000000000..55b51393af61 --- /dev/null +++ b/specification/cognitiveservices/Language.Conversations/client.tsp @@ -0,0 +1,33 @@ +import "./main.tsp"; +import "@azure-tools/typespec-client-generator-core"; + +using Azure.ClientGenerator.Core; +using Language.Conversations; + +namespace Language.ConversationsClientCustomizations; + +@@clientName(ConversationEntity.confidenceScore, "confidence", "csharp"); +@@clientName(ConversationIntent.confidenceScore, "confidence", "csharp"); +@@clientName(TargetIntentResult.confidenceScore, "confidence", "csharp"); +@@clientName(KnowledgeBaseAnswer.confidenceScore, "confidence", "csharp"); +@@clientName(KnowledgeBaseAnswer.id, "qnaId", "csharp"); +@@clientName(KnowledgeBaseAnswer.answerSpan, "shortAnswer", "csharp"); +@@clientName(KnowledgeBaseAnswer.confidenceScore, "confidence", "csharp"); +@@clientName(KnowledgeBaseAnswerContext.previousUserQuery, + "previousQuestion", + "csharp" +); + +@@clientName(AnswersOptions.confidenceScoreThreshold, + "confidenceThreshold", + "csharp" +); +@@clientName(AnswersOptions.context, "answerContext", "csharp"); +@@clientName(AnswersOptions.rankerType, "rankerKind", "csharp"); +@@clientName(AnswersOptions.answerSpanRequest, "shortAnswerOptions", "csharp"); + +@@clientName(ShortAnswerOptions.confidenceScoreThreshold, + "confidenceThreshold", + "csharp" +); +@@clientName(ShortAnswerOptions.topAnswersWithSpan, "top", "csharp"); diff --git a/specification/cognitiveservices/Language.Conversations/common.tsp b/specification/cognitiveservices/Language.Conversations/common.tsp new file mode 100644 index 000000000000..5d08bb5eb3f5 --- /dev/null +++ b/specification/cognitiveservices/Language.Conversations/common.tsp @@ -0,0 +1,720 @@ +import "@typespec/rest"; +import "@typespec/http"; +import "@typespec/versioning"; +import "@azure-tools/typespec-azure-core"; + +using TypeSpec.Http; +using TypeSpec.Rest; +using TypeSpec.Versioning; +using Azure.Core; +using Azure.Core.Traits; + +namespace Language.Conversations; + +/** Error response. */ +@error +model ErrorResponse is Azure.Core.Foundations.ErrorResponseBase; + +/** The error object. */ +model Error { + /** One of a server-defined set of error codes. */ + code: ErrorCode; + + /** A human-readable representation of the error. */ + message: string; + + /** The target of the error. */ + target?: string; + + /** An array of details about specific errors that led to this reported error. */ + details?: Array; + + /** An object containing more specific information than the current object about the error. */ + innererror?: InnerErrorModel; +} + +/** An object containing more specific information about the error. As per Microsoft One API guidelines - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses. */ +model InnerErrorModel { + /** One of a server-defined set of error codes. */ + code: InnerErrorCode; + + /** Error message. */ + message: string; + + /** Error details. */ + details?: Record; + + /** Error target. */ + target?: string; + + /** An object containing more specific information than the current object about the error. */ + innererror?: InnerErrorModel; +} + +/** Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see https://aka.ms/text-analytics-offsets. */ +union StringIndexType { + string, + + /** Returned offset and length values will correspond to TextElements (Graphemes and Grapheme clusters) confirming to the Unicode 8.0.0 standard. Use this option if your application is written in .Net Framework or .Net Core and you will be using StringInfo. */ + TextElements_v8: "TextElements_v8", + + /** Returned offset and length values will correspond to Unicode code points. Use this option if your application is written in a language that support Unicode, for example Python. */ + UnicodeCodePoint: "UnicodeCodePoint", + + /** Returned offset and length values will correspond to UTF-16 code units. Use this option if your application is written in a language that support Unicode, for example Java, JavaScript. */ + Utf16CodeUnit: "Utf16CodeUnit", +} + +/** Returns the current state of the task. */ +@added(Versions.v2023_04_01) +model TaskState { + /** The last updated time in UTC for the task. */ + lastUpdateDateTime: utcDateTime; + + /** The status of the task at the mentioned last update time. */ + status: State; +} + +/** The status of the task at the mentioned last update time. */ +@lroStatus +@added(Versions.v2023_04_01) +union State { + string, + + /** Not started state */ + notStarted: "notStarted", + + /** Running state */ + running: "running", + + /** Succeeded state */ + @lroSucceeded + succeeded: "succeeded", + + /** Partially completed state */ + partiallyCompleted: "partiallyCompleted", + + /** Failed state */ + @lroFailed + failed: "failed", + + /** Cancelled state */ + @lroCanceled + cancelled: "cancelled", + + /** Cancelling state */ + cancelling: "cancelling", +} + +/** Base task object. */ +@added(Versions.v2023_04_01) +model TaskIdentifier { + /** task name */ + taskName?: string; +} + +/** Base parameters object for a text analysis task. */ +@added(Versions.v2023_04_01) +model TaskParameters { + /** logging opt out */ + loggingOptOut?: boolean = false; +} + +/** Parameters object for a text analysis task using pre-built models. */ +@added(Versions.v2023_04_01) +model PreBuiltTaskParameters is TaskParameters { + /** model version */ + modelVersion?: string = "latest"; +} + +alias ShowStatsQueryParameter = QueryParametersTrait<{ + /** (Optional) if set to true, response will contain request and document level statistics. */ + @query + showStats?: boolean; +}>; + +/** job state */ +@added(Versions.v2023_04_01) +model JobState { + /** display name */ + displayName?: string; + + /** Date and time job created */ + createdDateTime: utcDateTime; + + /** Date and time job expires */ + expirationDateTime?: utcDateTime; + + /** job ID */ + @key + @visibility("read") + jobId: uuid; + + /** last updated date and time */ + lastUpdatedDateTime: utcDateTime; + + /** status */ + status: State; + + /** errors */ + errors?: Array; + + /** next link */ + nextLink?: string; +} + +/** job errors */ +model JobErrors { + /** errors */ + errors: Array; +} + +/** Contains details of errors encountered during a job execution. */ +model DocumentError { + /** The ID of the input document. */ + id: string; + + /** Error encountered. */ + error: Error; +} + +/** Contains details of warnings encountered during a job execution. */ +model InputWarning { + /** Warning code. */ + code: string; + + /** Warning message. */ + message: string; + + /** A JSON pointer reference indicating the target object. */ + targetRef?: string; +} + +/** if showStats=true was specified in the request this field will contain information about the request payload. */ +model RequestStatistics { + /** Number of documents submitted in the request. */ + documentsCount: int32; + + /** Number of valid documents. This excludes empty, over-size limit or non-supported languages documents. */ + validDocumentsCount: int32; + + /** Number of invalid documents. This includes empty, over-size limit or non-supported languages documents. */ + erroneousDocumentsCount: int32; + + /** Number of transactions for the request. */ + transactionsCount: int64; +} + +/** Pre built result */ +model PreBuiltResult { + /** Errors by document id. */ + errors: Array; + + /** statistics */ + statistics?: RequestStatistics; + + /** This field indicates which model is used for scoring. */ + modelVersion: string; +} + +/** Represents List of Question Answers. */ +model AnswersResult { + /** Represents Answer Result list. */ + answers?: Array; +} + +/** Represents knowledge base answer. */ +model KnowledgeBaseAnswer { + /** List of questions associated with the answer. */ + questions?: Array; + + /** Answer text. */ + answer?: string; + + /** Answer confidence score, value ranges from 0 to 1. */ + @minValue(0) + @maxValue(1) + confidenceScore?: float64; + + /** ID of the QnA result. */ + id?: int32; + + /** Source of QnA result. */ + source?: string; + + /** Metadata associated with the answer, useful to categorize or filter question answers. */ + metadata?: Record; + + /** Dialog associated with Answer. */ + dialog?: KnowledgeBaseAnswerDialog; + + /** Answer span object of QnA with respect to user's question. */ + answerSpan?: AnswerSpan; +} + +/** Dialog associated with Answer. */ +model KnowledgeBaseAnswerDialog { + /** To mark if a prompt is relevant only with a previous question or not. If true, do not include this QnA as search result for queries without context; otherwise, if false, ignores context and includes this QnA in search result. */ + isContextOnly?: boolean; + + /** List of prompts associated with the answer. */ + @maxItems(20) + prompts?: Array; +} + +/** Prompt for an answer. */ +model KnowledgeBaseAnswerPrompt { + /** Index of the prompt - used in ordering of the prompts. */ + displayOrder?: int32; + + /** QnA ID corresponding to the prompt. */ + qnaId?: int32; + + /** Text displayed to represent a follow up question prompt. */ + @maxLength(200) + displayText?: string; +} + +/** Answer span object of QnA. */ +model AnswerSpan { + /** Predicted text of answer span. */ + text?: string; + + /** Predicted score of answer span, value ranges from 0 to 1. */ + @minValue(0) + @maxValue(1) + confidenceScore?: float64; + + /** The answer span offset from the start of answer. */ + offset?: int32; + + /** The length of the answer span. */ + length?: int32; +} + +/** Parameters to query a knowledge base. */ +model AnswersOptions { + /** Exact QnA ID to fetch from the knowledge base, this field takes priority over question. */ + qnaId?: int32; + + /** User question to query against the knowledge base. */ + question?: string; + + /** Max number of answers to be returned for the question. */ + top?: int32; + + /** Unique identifier for the user. */ + userId?: string; + + /** Minimum threshold score for answers, value ranges from 0 to 1. */ + @maxValue(1) + @minValue(0) + confidenceScoreThreshold?: float64; + + /** Context object with previous QnA's information. */ + context?: KnowledgeBaseAnswerContext; + + /** Type of ranker to be used. */ + rankerType?: RankerKind; + + /** Filter QnAs based on given metadata list and knowledge base sources. */ + filters?: QueryFilters; + + /** To configure Answer span prediction feature. */ + answerSpanRequest?: ShortAnswerOptions; + + /** (Optional) Flag to enable Query over Unstructured Sources. */ + includeUnstructuredSources?: boolean; +} + +/** Type of ranker to be used */ +union RankerKind { + string, + + /** Default ranker. */ + Default: "Default", + + /** Question only ranker. */ + QuestionOnly: "QuestionOnly", +} + +/** To configure Answer span prediction feature. */ +model ShortAnswerOptions { + /** Enable or disable Answer Span prediction. */ + enable?: boolean = true; + + /** Minimum threshold score required to include an answer span, value ranges from 0 to 1. */ + @maxValue(1) + @minValue(0) + confidenceScoreThreshold?: float64; + + /** Number of Top answers to be considered for span prediction from 1 to 10. */ + @maxValue(10) + @minValue(1) + topAnswersWithSpan?: int32; +} + +/** Context object with previous QnA's information. */ +model KnowledgeBaseAnswerContext { + /** Previous turn top answer result QnA ID. */ + previousQnaId: int32; + + /** Previous user query. */ + previousUserQuery?: string; +} + +/** filters over knowledge base. */ +model QueryFilters { + /** filters over knowledge base. */ + metadataFilter?: MetadataFilter; + + /** filters over knowledge base. */ + sourceFilter?: SourceFilter; + + /** Logical operation used to join metadata filter with source filter. */ + logicalOperation?: LogicalOperationKind = LogicalOperationKind.AND; +} + +/** Find QnAs that are associated with the given list of metadata. */ +model MetadataFilter { + /** List of metadata. */ + metadata?: Array; + + /** Operation used to join metadata filters. */ + logicalOperation?: LogicalOperationKind = LogicalOperationKind.AND; +} + +/** Object to provide the key value pair for each metadata. */ +model MetadataRecord { + /** Metadata Key from Metadata dictionary used in the QnA. */ + key: string; + + /** Metadata Value from Metadata dictionary used in the QnA. */ + value: string; +} + +/** Find QnAs that are associated with any of the given list of sources in knowledge base. */ +model SourceFilter is Array; + +/** Set to 'OR' or 'AND' for using corresponding logical operation. */ +union LogicalOperationKind { + string, + #suppress "@azure-tools/typespec-azure-core/documentation-required" "The EnumMember named 'AND' should have a documentation or description, please use decorator @doc to add it." + AND: "AND", + #suppress "@azure-tools/typespec-azure-core/documentation-required" "The EnumMember named 'OR' should have a documentation or description, please use decorator @doc to add it." + OR: "OR", +} + +/** Human-readable error code. */ +union InnerErrorCode { + string, + + /** Invalid request error */ + InvalidRequest: "InvalidRequest", + + /** Invalid parameter value error */ + InvalidParameterValue: "InvalidParameterValue", + + /** Knowledge base not found error */ + KnowledgeBaseNotFound: "KnowledgeBaseNotFound", + + /** Azure Cognitive Search not found error */ + AzureCognitiveSearchNotFound: "AzureCognitiveSearchNotFound", + + /** Azure Cognitive Search throttling error */ + AzureCognitiveSearchThrottling: "AzureCognitiveSearchThrottling", + + /** Extraction failure error */ + ExtractionFailure: "ExtractionFailure", + + /** Invalid request body format error */ + InvalidRequestBodyFormat: "InvalidRequestBodyFormat", + + /** Empty request error */ + EmptyRequest: "EmptyRequest", + + /** Missing input documents error */ + MissingInputDocuments: "MissingInputDocuments", + + /** Invalid document error */ + InvalidDocument: "InvalidDocument", + + /** Model version incorrect error */ + ModelVersionIncorrect: "ModelVersionIncorrect", + + /** Invalid document batch error */ + InvalidDocumentBatch: "InvalidDocumentBatch", + + /** Unsupported language code error */ + UnsupportedLanguageCode: "UnsupportedLanguageCode", + + /** Invalid country hint error */ + InvalidCountryHint: "InvalidCountryHint", +} + +/** Human-readable error code. */ +union ErrorCode { + string, + + /** Invalid request error */ + InvalidRequest: "InvalidRequest", + + /** Invalid argument error */ + InvalidArgument: "InvalidArgument", + + /** Unauthorized access error */ + Unauthorized: "Unauthorized", + + /** Forbidden access error */ + Forbidden: "Forbidden", + + /** Not found error */ + NotFound: "NotFound", + + /** Project not found error */ + ProjectNotFound: "ProjectNotFound", + + /** Operation not found error */ + OperationNotFound: "OperationNotFound", + + /** Azure Cognitive Search not found error */ + AzureCognitiveSearchNotFound: "AzureCognitiveSearchNotFound", + + /** Azure Cognitive Search index not found error */ + AzureCognitiveSearchIndexNotFound: "AzureCognitiveSearchIndexNotFound", + + /** Too many requests error */ + TooManyRequests: "TooManyRequests", + + /** Azure Cognitive Search throttling error */ + AzureCognitiveSearchThrottling: "AzureCognitiveSearchThrottling", + + /** Azure Cognitive Search index limit reached error */ + AzureCognitiveSearchIndexLimitReached: "AzureCognitiveSearchIndexLimitReached", + + /** Internal server error */ + InternalServerError: "InternalServerError", + + /** Service unavailable error */ + ServiceUnavailable: "ServiceUnavailable", + + /** Timeout error */ + Timeout: "Timeout", + + /** Quota exceeded error */ + QuotaExceeded: "QuotaExceeded", + + /** Conflict error */ + Conflict: "Conflict", + + /** Warning error */ + Warning: "Warning", +} + +/** Predicted sentiment */ +@added(Versions.v2023_04_01) +union TextSentiment { + string, + + /** Positive statement */ + positive: "positive", + + /** Neutral statement */ + neutral: "neutral", + + /** Negative statement */ + negative: "negative", + + /** Mixed statement */ + mixed: "mixed", +} + +/** Represents the confidence scores between 0 and 1 across all sentiment classes: positive, neutral, negative. */ +@added(Versions.v2023_04_01) +model SentimentConfidenceScores { + /** Confidence score for positive sentiment */ + positive: float64; + + /** Confidence score for neutral sentiment */ + neutral: float64; + + /** Confidence score for negative sentiment */ + negative: float64; +} + +/** Enum that defines the length of the output summaries. */ +@added(Versions.v2023_11_15_preview) +union SummaryLengthBucket { + string, + + /** Instructs model to generate shorter length summaries. */ + short: "short", + + /** Instructs model to generate medium length summaries. */ + medium: "medium", + + /** Instructs model to generate longer length summaries. */ + long: "long", +} + +/** Supported parameters for an Abstractive Summarization task. */ +@added(Versions.v2023_04_01) +model AbstractiveSummarizationTaskParametersBase { + /** It controls the approximate number of sentences in the output summaries. */ + sentenceCount?: int32; + + /** String index type */ + stringIndexType?: StringIndexType = StringIndexType.TextElements_v8; + + /** (NOTE: Recommended to use summaryLength over sentenceCount) Controls the approximate length of the output summaries. */ + @added(Versions.v2023_11_15_preview) + summaryLength?: SummaryLengthBucket; +} + +/** The context of the summary. */ +@added(Versions.v2023_04_01) +model SummaryContext { + /** Start position for the context. Use of different 'stringIndexType' values can affect the offset returned. */ + offset: int32; + + /** The length of the context. Use of different 'stringIndexType' values can affect the length returned. */ + length: int32; +} + +/** Parameters object for a text analysis task using custom models. */ +model CustomTaskParameters { + ...TaskParameters; + + /** This field indicates the project name for the model. */ + projectName: string; + + /** This field indicates the deployment name for the model. */ + deploymentName: string; +} + +/** Custom Task Results */ +model CustomResult { + /** Errors by document id. */ + errors: Array; + + /** if showStats=true was specified in the request this field will contain information about the request payload. */ + statistics?: RequestStatistics; + + /** This field indicates the project name for the model. */ + projectName: string; + + /** This field indicates the deployment name for the model. */ + deploymentName: string; +} + +/** Optional parameter to use a Custom Character to be used for redaction in PII responses. Default character will be * as before. We allow specific ascii characters for redaction. */ +union redactionCharacter { + string, + + /** Exclamation point character */ + exclamationPoint: "!", + + /** Number sign character */ + numberSign: "#", + + /** Dollar sign character */ + dollar: "$", + + /** Percent sign character */ + perCent: "%", + + /** Ampersand character */ + ampersand: "&", + + /** Asterisk character */ + asterisk: "*", + + /** Plus sign character */ + plus: "+", + + /** Minus sign character */ + minus: "-", + + /** Equals sign character */ + equals: "=", + + /** Question mark character */ + questionMark: "?", + + /** At sign character */ + atSign: "@", + + /** Caret character */ + caret: "^", + + /** Underscore character */ + underscore: "_", + + /** Tilde character */ + tilde: "~", +} + +/** Long running operation template to match Azure Language. */ +#suppress "@azure-tools/typespec-azure-core/long-running-polling-operation-required" "template" +@post +op LanguageLongRunningOperation< + TParams extends TypeSpec.Reflection.Model, + TStatusResult extends TypeSpec.Reflection.Model, + TStatusError = Foundations.Error, + Traits extends TypeSpec.Reflection.Model = {}, + TErrorResponse = ErrorResponse +> is Foundations.Operation< + TParams & + Azure.Core.Traits.Private.TraitProperties< + Traits, + Azure.Core.Traits.TraitLocation.Parameters + >, + Azure.Core.Foundations.AcceptedResponse & + Foundations.LongRunningStatusLocation & + Azure.Core.Traits.Private.TraitProperties< + Traits, + Azure.Core.Traits.TraitLocation.Response + >, + Traits, + TErrorResponse +>; + +/** Long running operation template to match Azure Language. */ +#suppress "@azure-tools/typespec-azure-core/long-running-polling-operation-required" "template" +@post +op LanguageLongRunningResourceCancel< + TParams extends TypeSpec.Reflection.Model, + Traits extends TypeSpec.Reflection.Model = {}, + TErrorResponse = ErrorResponse +> is Foundations.ResourceOperation< + TParams, + Azure.Core.Traits.Private.TraitProperties, + Foundations.AcceptedResponse>, + Traits, + TErrorResponse +>; + +/** Long running operation template to match Azure Language. */ +#suppress "@azure-tools/typespec-azure-core/long-running-polling-operation-required" "template" +@get +op LanguageLongRunningResourceRead< + Resource extends TypeSpec.Reflection.Model, + Traits extends TypeSpec.Reflection.Model = {}, + TErrorResponse = ErrorResponse +> is Foundations.ResourceOperation< + Resource, + Azure.Core.Traits.Private.TraitProperties< + Traits, + TraitLocation.Parameters, + TraitContext.Read + >, + Resource & + Azure.Core.Traits.Private.TraitProperties< + Traits, + TraitLocation.Response, + TraitContext.Read + >, + Traits, + TErrorResponse +>; diff --git a/specification/cognitiveservices/data-plane/Language/stable/2022-05-01/examples/conversations/SuccessfulAnalyzeConversations.json b/specification/cognitiveservices/Language.Conversations/examples/2022-05-01/SuccessfulAnalyzeConversations.json similarity index 94% rename from specification/cognitiveservices/data-plane/Language/stable/2022-05-01/examples/conversations/SuccessfulAnalyzeConversations.json rename to specification/cognitiveservices/Language.Conversations/examples/2022-05-01/SuccessfulAnalyzeConversations.json index 7aebc0f85d7c..9aa899d5320d 100644 --- a/specification/cognitiveservices/data-plane/Language/stable/2022-05-01/examples/conversations/SuccessfulAnalyzeConversations.json +++ b/specification/cognitiveservices/Language.Conversations/examples/2022-05-01/SuccessfulAnalyzeConversations.json @@ -1,4 +1,6 @@ { + "operationId": "AnalyzeConversations", + "title": "SuccessfulAnalyzeConversations", "parameters": { "Endpoint": "{Endpoint}", "Ocp-Apim-Subscription-Key": "{API key}", diff --git a/specification/cognitiveservices/data-plane/Language/stable/2022-05-01/examples/conversations/SuccessfulAnalyzeConversationsArbitration.json b/specification/cognitiveservices/Language.Conversations/examples/2022-05-01/SuccessfulAnalyzeConversationsArbitration.json similarity index 95% rename from specification/cognitiveservices/data-plane/Language/stable/2022-05-01/examples/conversations/SuccessfulAnalyzeConversationsArbitration.json rename to specification/cognitiveservices/Language.Conversations/examples/2022-05-01/SuccessfulAnalyzeConversationsArbitration.json index 896cb3a17afd..19f20be27a49 100644 --- a/specification/cognitiveservices/data-plane/Language/stable/2022-05-01/examples/conversations/SuccessfulAnalyzeConversationsArbitration.json +++ b/specification/cognitiveservices/Language.Conversations/examples/2022-05-01/SuccessfulAnalyzeConversationsArbitration.json @@ -1,4 +1,6 @@ { + "operationId": "AnalyzeConversations", + "title": "SuccessfulAnalyzeConversationsArbitration", "parameters": { "Endpoint": "{Endpoint}", "Ocp-Apim-Subscription-Key": "{API key}", diff --git a/specification/cognitiveservices/data-plane/Language/stable/2022-05-01/examples/conversations/SuccessfulAnalyzeConversationsArbitrationDirectTarget.json b/specification/cognitiveservices/Language.Conversations/examples/2022-05-01/SuccessfulAnalyzeConversationsArbitrationDirectTarget.json similarity index 95% rename from specification/cognitiveservices/data-plane/Language/stable/2022-05-01/examples/conversations/SuccessfulAnalyzeConversationsArbitrationDirectTarget.json rename to specification/cognitiveservices/Language.Conversations/examples/2022-05-01/SuccessfulAnalyzeConversationsArbitrationDirectTarget.json index ce9308a12ac2..0d0f70f6b8bd 100644 --- a/specification/cognitiveservices/data-plane/Language/stable/2022-05-01/examples/conversations/SuccessfulAnalyzeConversationsArbitrationDirectTarget.json +++ b/specification/cognitiveservices/Language.Conversations/examples/2022-05-01/SuccessfulAnalyzeConversationsArbitrationDirectTarget.json @@ -1,4 +1,6 @@ { + "operationId": "AnalyzeConversations", + "title": "SuccessfulAnalyzeConversationsArbitrationDirectTarget", "parameters": { "Endpoint": "{Endpoint}", "Ocp-Apim-Subscription-Key": "{API key}", diff --git a/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/conversations/SuccessfulAnalyzeConversations.json b/specification/cognitiveservices/Language.Conversations/examples/2023-04-01/SuccessfulAnalyzeConversations.json similarity index 94% rename from specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/conversations/SuccessfulAnalyzeConversations.json rename to specification/cognitiveservices/Language.Conversations/examples/2023-04-01/SuccessfulAnalyzeConversations.json index bc8f8805bc81..a9c0d16aa049 100644 --- a/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/conversations/SuccessfulAnalyzeConversations.json +++ b/specification/cognitiveservices/Language.Conversations/examples/2023-04-01/SuccessfulAnalyzeConversations.json @@ -1,4 +1,6 @@ { + "operationId": "AnalyzeConversations", + "title": "SuccessfulAnalyzeConversations", "parameters": { "Endpoint": "{Endpoint}", "Ocp-Apim-Subscription-Key": "{API key}", diff --git a/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/conversations/SuccessfulAnalyzeConversationsArbitration.json b/specification/cognitiveservices/Language.Conversations/examples/2023-04-01/SuccessfulAnalyzeConversationsArbitration.json similarity index 95% rename from specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/conversations/SuccessfulAnalyzeConversationsArbitration.json rename to specification/cognitiveservices/Language.Conversations/examples/2023-04-01/SuccessfulAnalyzeConversationsArbitration.json index 875e1e807b15..c490d574bed4 100644 --- a/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/conversations/SuccessfulAnalyzeConversationsArbitration.json +++ b/specification/cognitiveservices/Language.Conversations/examples/2023-04-01/SuccessfulAnalyzeConversationsArbitration.json @@ -1,4 +1,6 @@ { + "operationId": "AnalyzeConversations", + "title": "SuccessfulAnalyzeConversationsArbitration", "parameters": { "Endpoint": "{Endpoint}", "Ocp-Apim-Subscription-Key": "{API key}", diff --git a/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/conversations/SuccessfulAnalyzeConversationsArbitrationDirectTarget.json b/specification/cognitiveservices/Language.Conversations/examples/2023-04-01/SuccessfulAnalyzeConversationsArbitrationDirectTarget.json similarity index 95% rename from specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/conversations/SuccessfulAnalyzeConversationsArbitrationDirectTarget.json rename to specification/cognitiveservices/Language.Conversations/examples/2023-04-01/SuccessfulAnalyzeConversationsArbitrationDirectTarget.json index f23d13781902..9389697a7896 100644 --- a/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/conversations/SuccessfulAnalyzeConversationsArbitrationDirectTarget.json +++ b/specification/cognitiveservices/Language.Conversations/examples/2023-04-01/SuccessfulAnalyzeConversationsArbitrationDirectTarget.json @@ -1,4 +1,6 @@ { + "operationId": "AnalyzeConversations", + "title": "SuccessfulAnalyzeConversationsArbitrationDirectTarget", "parameters": { "Endpoint": "{Endpoint}", "Ocp-Apim-Subscription-Key": "{API key}", diff --git a/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/conversations/SuccessfulAnalyzeConversationsJobsCancelRequest.json b/specification/cognitiveservices/Language.Conversations/examples/2023-04-01/SuccessfulAnalyzeConversationsJobsCancelRequest.json similarity index 76% rename from specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/conversations/SuccessfulAnalyzeConversationsJobsCancelRequest.json rename to specification/cognitiveservices/Language.Conversations/examples/2023-04-01/SuccessfulAnalyzeConversationsJobsCancelRequest.json index 705087d1ddf6..d6fc005abb2d 100644 --- a/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/conversations/SuccessfulAnalyzeConversationsJobsCancelRequest.json +++ b/specification/cognitiveservices/Language.Conversations/examples/2023-04-01/SuccessfulAnalyzeConversationsJobsCancelRequest.json @@ -1,4 +1,6 @@ { + "operationId": "AnalyzeConversationsCancelJob", + "title": "SuccessfulAnalyzeConversationsJobsCancelRequest", "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", "api-version": "2023-04-01", diff --git a/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/conversations/SuccessfulConversationSummarizationTaskResult.json b/specification/cognitiveservices/Language.Conversations/examples/2023-04-01/SuccessfulConversationSummarizationTaskResult.json similarity index 95% rename from specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/conversations/SuccessfulConversationSummarizationTaskResult.json rename to specification/cognitiveservices/Language.Conversations/examples/2023-04-01/SuccessfulConversationSummarizationTaskResult.json index 4f49bdcd04a8..2311c12a9a19 100644 --- a/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/conversations/SuccessfulConversationSummarizationTaskResult.json +++ b/specification/cognitiveservices/Language.Conversations/examples/2023-04-01/SuccessfulConversationSummarizationTaskResult.json @@ -1,4 +1,6 @@ { + "operationId": "AnalyzeConversationsJobStatus", + "title": "SuccessfulConversationSummarizationTaskResult", "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", "api-version": "2023-04-01", diff --git a/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/conversations/SuccessfulConversationSummarizationTaskStatusRequest.json b/specification/cognitiveservices/Language.Conversations/examples/2023-04-01/SuccessfulConversationSummarizationTaskStatusRequest.json similarity index 94% rename from specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/conversations/SuccessfulConversationSummarizationTaskStatusRequest.json rename to specification/cognitiveservices/Language.Conversations/examples/2023-04-01/SuccessfulConversationSummarizationTaskStatusRequest.json index fb4d61aacc88..faab96c58233 100644 --- a/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/conversations/SuccessfulConversationSummarizationTaskStatusRequest.json +++ b/specification/cognitiveservices/Language.Conversations/examples/2023-04-01/SuccessfulConversationSummarizationTaskStatusRequest.json @@ -1,4 +1,6 @@ { + "operationId": "AnalyzeConversationsJobStatus", + "title": "SuccessfulConversationSummarizationTaskStatusRequest", "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", "api-version": "2023-04-01", diff --git a/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/conversations/SuccessfulConversationSummarizationTaskSubmit.json b/specification/cognitiveservices/Language.Conversations/examples/2023-04-01/SuccessfulConversationSummarizationTaskSubmit.json similarity index 95% rename from specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/conversations/SuccessfulConversationSummarizationTaskSubmit.json rename to specification/cognitiveservices/Language.Conversations/examples/2023-04-01/SuccessfulConversationSummarizationTaskSubmit.json index 3f7e3e9682f5..692a6cebe5d8 100644 --- a/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/conversations/SuccessfulConversationSummarizationTaskSubmit.json +++ b/specification/cognitiveservices/Language.Conversations/examples/2023-04-01/SuccessfulConversationSummarizationTaskSubmit.json @@ -1,4 +1,6 @@ { + "operationId": "AnalyzeConversationsSubmitJob", + "title": "SuccessfulConversationSummarizationTaskSubmit", "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", "api-version": "2023-04-01", diff --git a/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/conversations/SuccessfulConversationSummarySubmit.json b/specification/cognitiveservices/Language.Conversations/examples/2023-04-01/SuccessfulConversationSummarySubmit.json similarity index 94% rename from specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/conversations/SuccessfulConversationSummarySubmit.json rename to specification/cognitiveservices/Language.Conversations/examples/2023-04-01/SuccessfulConversationSummarySubmit.json index 00a71497cd67..b311f55cdd41 100644 --- a/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/conversations/SuccessfulConversationSummarySubmit.json +++ b/specification/cognitiveservices/Language.Conversations/examples/2023-04-01/SuccessfulConversationSummarySubmit.json @@ -1,4 +1,6 @@ { + "operationId": "AnalyzeConversationsSubmitJob", + "title": "SuccessfulConversationSummarySubmit", "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", "api-version": "2023-04-01", diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/conversations/SuccessfulAnalyzeConversations.json b/specification/cognitiveservices/Language.Conversations/examples/2023-11-15-preview/SuccessfulAnalyzeConversations.json similarity index 94% rename from specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/conversations/SuccessfulAnalyzeConversations.json rename to specification/cognitiveservices/Language.Conversations/examples/2023-11-15-preview/SuccessfulAnalyzeConversations.json index 569a88a1d766..b7c349c9c4ae 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/conversations/SuccessfulAnalyzeConversations.json +++ b/specification/cognitiveservices/Language.Conversations/examples/2023-11-15-preview/SuccessfulAnalyzeConversations.json @@ -1,4 +1,6 @@ { + "operationId": "AnalyzeConversations", + "title": "SuccessfulAnalyzeConversations", "parameters": { "Endpoint": "{Endpoint}", "Ocp-Apim-Subscription-Key": "{API key}", diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/conversations/SuccessfulAnalyzeConversationsArbitration.json b/specification/cognitiveservices/Language.Conversations/examples/2023-11-15-preview/SuccessfulAnalyzeConversationsArbitration.json similarity index 95% rename from specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/conversations/SuccessfulAnalyzeConversationsArbitration.json rename to specification/cognitiveservices/Language.Conversations/examples/2023-11-15-preview/SuccessfulAnalyzeConversationsArbitration.json index e77a2e689645..63886997c41e 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/conversations/SuccessfulAnalyzeConversationsArbitration.json +++ b/specification/cognitiveservices/Language.Conversations/examples/2023-11-15-preview/SuccessfulAnalyzeConversationsArbitration.json @@ -1,4 +1,6 @@ { + "operationId": "AnalyzeConversations", + "title": "SuccessfulAnalyzeConversationsArbitration", "parameters": { "Endpoint": "{Endpoint}", "Ocp-Apim-Subscription-Key": "{API key}", diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/conversations/SuccessfulAnalyzeConversationsArbitrationDirectTarget.json b/specification/cognitiveservices/Language.Conversations/examples/2023-11-15-preview/SuccessfulAnalyzeConversationsArbitrationDirectTarget.json similarity index 95% rename from specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/conversations/SuccessfulAnalyzeConversationsArbitrationDirectTarget.json rename to specification/cognitiveservices/Language.Conversations/examples/2023-11-15-preview/SuccessfulAnalyzeConversationsArbitrationDirectTarget.json index a2fbc169030e..b7c39ef12d28 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/conversations/SuccessfulAnalyzeConversationsArbitrationDirectTarget.json +++ b/specification/cognitiveservices/Language.Conversations/examples/2023-11-15-preview/SuccessfulAnalyzeConversationsArbitrationDirectTarget.json @@ -1,4 +1,6 @@ { + "operationId": "AnalyzeConversations", + "title": "SuccessfulAnalyzeConversationsArbitrationDirectTarget", "parameters": { "Endpoint": "{Endpoint}", "Ocp-Apim-Subscription-Key": "{API key}", diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/conversations/SuccessfulAnalyzeConversationsJobsCancelRequest.json b/specification/cognitiveservices/Language.Conversations/examples/2023-11-15-preview/SuccessfulAnalyzeConversationsJobsCancelRequest.json similarity index 77% rename from specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/conversations/SuccessfulAnalyzeConversationsJobsCancelRequest.json rename to specification/cognitiveservices/Language.Conversations/examples/2023-11-15-preview/SuccessfulAnalyzeConversationsJobsCancelRequest.json index 493b9064df40..8a06b3663db0 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/conversations/SuccessfulAnalyzeConversationsJobsCancelRequest.json +++ b/specification/cognitiveservices/Language.Conversations/examples/2023-11-15-preview/SuccessfulAnalyzeConversationsJobsCancelRequest.json @@ -1,4 +1,6 @@ { + "operationId": "AnalyzeConversationsCancelJob", + "title": "SuccessfulAnalyzeConversationsJobsCancelRequest", "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", "api-version": "2023-11-15-preview", diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/conversations/SuccessfulConversationPIIExclusionSubmit.json b/specification/cognitiveservices/Language.Conversations/examples/2023-11-15-preview/SuccessfulConversationPIIExclusionSubmit.json similarity index 95% rename from specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/conversations/SuccessfulConversationPIIExclusionSubmit.json rename to specification/cognitiveservices/Language.Conversations/examples/2023-11-15-preview/SuccessfulConversationPIIExclusionSubmit.json index b4f57b71d7ed..6855d85571fd 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/conversations/SuccessfulConversationPIIExclusionSubmit.json +++ b/specification/cognitiveservices/Language.Conversations/examples/2023-11-15-preview/SuccessfulConversationPIIExclusionSubmit.json @@ -1,4 +1,6 @@ { + "operationId": "AnalyzeConversationsSubmitJob", + "title": "SuccessfulConversationPIIExclusionSubmit", "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", "api-version": "2023-11-15-preview", diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/conversations/SuccessfulConversationPIIExclusionTaskStatusRequest.json b/specification/cognitiveservices/Language.Conversations/examples/2023-11-15-preview/SuccessfulConversationPIIExclusionTaskStatusRequest.json similarity index 94% rename from specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/conversations/SuccessfulConversationPIIExclusionTaskStatusRequest.json rename to specification/cognitiveservices/Language.Conversations/examples/2023-11-15-preview/SuccessfulConversationPIIExclusionTaskStatusRequest.json index b1c597611e38..9bb019ec6772 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/conversations/SuccessfulConversationPIIExclusionTaskStatusRequest.json +++ b/specification/cognitiveservices/Language.Conversations/examples/2023-11-15-preview/SuccessfulConversationPIIExclusionTaskStatusRequest.json @@ -1,4 +1,6 @@ { + "operationId": "AnalyzeConversationsJobStatus", + "title": "SuccessfulConversationPIIExclusionTaskStatusRequest", "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", "api-version": "2023-11-15-preview", diff --git a/specification/cognitiveservices/Language.Conversations/examples/2023-11-15-preview/SuccessfulConversationPIIRedactionCharSubmit.json b/specification/cognitiveservices/Language.Conversations/examples/2023-11-15-preview/SuccessfulConversationPIIRedactionCharSubmit.json new file mode 100644 index 000000000000..377aef55f9e3 --- /dev/null +++ b/specification/cognitiveservices/Language.Conversations/examples/2023-11-15-preview/SuccessfulConversationPIIRedactionCharSubmit.json @@ -0,0 +1,77 @@ +{ + "operationId": "AnalyzeConversationsSubmitJob", + "title": "SuccessfulConversationPIIRedactionCharSubmit", + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "api-version": "2023-11-15-preview", + "Endpoint": "{Endpoint}", + "jobId": "{Job ID}", + "body": { + "displayName": "Redacting PII data from transcribed audio", + "analysisInput": { + "conversations": [ + { + "id": "1", + "language": "en", + "modality": "transcript", + "domain": "generic", + "conversationItems": [ + { + "participantId": "1", + "id": "1", + "text": "Good morning John Doe.", + "itn": "good morning john doe", + "maskedItn": "good morning john doe", + "lexical": "good morning john doe", + "wordLevelTimings": [ + { + "word": "good", + "offset": 390000, + "duration": 2700000 + }, + { + "word": "morning", + "offset": 4500000, + "duration": 920000 + }, + { + "word": "john", + "offset": 590000, + "duration": 2700000 + }, + { + "word": "doe", + "offset": 6300000, + "duration": 920000 + } + ] + } + ] + } + ] + }, + "tasks": [ + { + "taskName": "Conversation PII", + "kind": "ConversationalPIITask", + "parameters": { + "modelVersion": "latest", + "piiCategories": [ + "All" + ], + "redactionCharacter": "-", + "redactionSource": "lexical", + "redactAudioTiming": true + } + } + ] + } + }, + "responses": { + "202": { + "headers": { + "Operation-Location": "{Endpoint}/language/analyze-conversation/jobs/{jobId}?api-version=2023-11-15-preview" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/conversations/SuccessfulConversationPIIRedactionCharTaskStatusRequest.json b/specification/cognitiveservices/Language.Conversations/examples/2023-11-15-preview/SuccessfulConversationPIIRedactionCharTaskStatusRequest.json similarity index 95% rename from specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/conversations/SuccessfulConversationPIIRedactionCharTaskStatusRequest.json rename to specification/cognitiveservices/Language.Conversations/examples/2023-11-15-preview/SuccessfulConversationPIIRedactionCharTaskStatusRequest.json index b9ee5c46f77c..208290d2b267 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/conversations/SuccessfulConversationPIIRedactionCharTaskStatusRequest.json +++ b/specification/cognitiveservices/Language.Conversations/examples/2023-11-15-preview/SuccessfulConversationPIIRedactionCharTaskStatusRequest.json @@ -1,4 +1,6 @@ { + "operationId": "AnalyzeConversationsJobStatus", + "title": "SuccessfulConversationPIIRedactionCharTaskStatusRequest", "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", "api-version": "2023-11-15-preview", diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/conversations/SuccessfulConversationPIISubmit.json b/specification/cognitiveservices/Language.Conversations/examples/2023-11-15-preview/SuccessfulConversationPIISubmit.json similarity index 95% rename from specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/conversations/SuccessfulConversationPIISubmit.json rename to specification/cognitiveservices/Language.Conversations/examples/2023-11-15-preview/SuccessfulConversationPIISubmit.json index 4b9fa1bb5de2..d94e207ea7c9 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/conversations/SuccessfulConversationPIISubmit.json +++ b/specification/cognitiveservices/Language.Conversations/examples/2023-11-15-preview/SuccessfulConversationPIISubmit.json @@ -1,4 +1,6 @@ { + "operationId": "AnalyzeConversationsSubmitJob", + "title": "SuccessfulConversationPIISubmit", "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", "api-version": "2023-11-15-preview", diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/conversations/SuccessfulConversationPIITaskStatusRequest.json b/specification/cognitiveservices/Language.Conversations/examples/2023-11-15-preview/SuccessfulConversationPIITaskStatusRequest.json similarity index 95% rename from specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/conversations/SuccessfulConversationPIITaskStatusRequest.json rename to specification/cognitiveservices/Language.Conversations/examples/2023-11-15-preview/SuccessfulConversationPIITaskStatusRequest.json index ec075dec0d60..f6ee2c914a85 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/conversations/SuccessfulConversationPIITaskStatusRequest.json +++ b/specification/cognitiveservices/Language.Conversations/examples/2023-11-15-preview/SuccessfulConversationPIITaskStatusRequest.json @@ -1,4 +1,6 @@ { + "operationId": "AnalyzeConversationsJobStatus", + "title": "SuccessfulConversationPIITaskStatusRequest", "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", "api-version": "2023-11-15-preview", diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/conversations/SuccessfulConversationSentimentSubmit.json b/specification/cognitiveservices/Language.Conversations/examples/2023-11-15-preview/SuccessfulConversationSentimentSubmit.json similarity index 92% rename from specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/conversations/SuccessfulConversationSentimentSubmit.json rename to specification/cognitiveservices/Language.Conversations/examples/2023-11-15-preview/SuccessfulConversationSentimentSubmit.json index d8791a0f2a28..cd06fcaf794c 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/conversations/SuccessfulConversationSentimentSubmit.json +++ b/specification/cognitiveservices/Language.Conversations/examples/2023-11-15-preview/SuccessfulConversationSentimentSubmit.json @@ -1,4 +1,6 @@ { + "operationId": "AnalyzeConversationsSubmitJob", + "title": "SuccessfulConversationSentimentSubmit", "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", "api-version": "2023-11-15-preview", diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/conversations/SuccessfulConversationSentimentTaskStatusRequest.json b/specification/cognitiveservices/Language.Conversations/examples/2023-11-15-preview/SuccessfulConversationSentimentTaskStatusRequest.json similarity index 94% rename from specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/conversations/SuccessfulConversationSentimentTaskStatusRequest.json rename to specification/cognitiveservices/Language.Conversations/examples/2023-11-15-preview/SuccessfulConversationSentimentTaskStatusRequest.json index a90ed5d6988f..72221e7c7a24 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/conversations/SuccessfulConversationSentimentTaskStatusRequest.json +++ b/specification/cognitiveservices/Language.Conversations/examples/2023-11-15-preview/SuccessfulConversationSentimentTaskStatusRequest.json @@ -1,4 +1,6 @@ { + "operationId": "AnalyzeConversationsJobStatus", + "title": "SuccessfulConversationSentimentTaskStatusRequest", "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", "api-version": "2023-11-15-preview", diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/conversations/SuccessfulConversationSummarizationTaskResult.json b/specification/cognitiveservices/Language.Conversations/examples/2023-11-15-preview/SuccessfulConversationSummarizationTaskResult.json similarity index 95% rename from specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/conversations/SuccessfulConversationSummarizationTaskResult.json rename to specification/cognitiveservices/Language.Conversations/examples/2023-11-15-preview/SuccessfulConversationSummarizationTaskResult.json index 034cd9bd6e68..73d39d18dd18 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/conversations/SuccessfulConversationSummarizationTaskResult.json +++ b/specification/cognitiveservices/Language.Conversations/examples/2023-11-15-preview/SuccessfulConversationSummarizationTaskResult.json @@ -1,4 +1,6 @@ { + "operationId": "AnalyzeConversationsJobStatus", + "title": "SuccessfulConversationSummarizationTaskResult", "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", "api-version": "2023-11-15-preview", diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/conversations/SuccessfulConversationSummarizationTaskStatusRequest.json b/specification/cognitiveservices/Language.Conversations/examples/2023-11-15-preview/SuccessfulConversationSummarizationTaskStatusRequest.json similarity index 94% rename from specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/conversations/SuccessfulConversationSummarizationTaskStatusRequest.json rename to specification/cognitiveservices/Language.Conversations/examples/2023-11-15-preview/SuccessfulConversationSummarizationTaskStatusRequest.json index b6ec30204e30..7be32fe638d1 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/conversations/SuccessfulConversationSummarizationTaskStatusRequest.json +++ b/specification/cognitiveservices/Language.Conversations/examples/2023-11-15-preview/SuccessfulConversationSummarizationTaskStatusRequest.json @@ -1,4 +1,6 @@ { + "operationId": "AnalyzeConversationsJobStatus", + "title": "SuccessfulConversationSummarizationTaskStatusRequest", "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", "api-version": "2023-11-15-preview", diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/conversations/SuccessfulConversationSummarizationTaskSubmit.json b/specification/cognitiveservices/Language.Conversations/examples/2023-11-15-preview/SuccessfulConversationSummarizationTaskSubmit.json similarity index 95% rename from specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/conversations/SuccessfulConversationSummarizationTaskSubmit.json rename to specification/cognitiveservices/Language.Conversations/examples/2023-11-15-preview/SuccessfulConversationSummarizationTaskSubmit.json index 1924472a9ca0..fb8d74f4917b 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/conversations/SuccessfulConversationSummarizationTaskSubmit.json +++ b/specification/cognitiveservices/Language.Conversations/examples/2023-11-15-preview/SuccessfulConversationSummarizationTaskSubmit.json @@ -1,4 +1,6 @@ { + "operationId": "AnalyzeConversationsSubmitJob", + "title": "SuccessfulConversationSummarizationTaskSubmit", "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", "api-version": "2023-11-15-preview", diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/conversations/SuccessfulConversationSummarySubmit.json b/specification/cognitiveservices/Language.Conversations/examples/2023-11-15-preview/SuccessfulConversationSummarySubmit.json similarity index 94% rename from specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/conversations/SuccessfulConversationSummarySubmit.json rename to specification/cognitiveservices/Language.Conversations/examples/2023-11-15-preview/SuccessfulConversationSummarySubmit.json index 935120aeb914..1d06f87a2bed 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/conversations/SuccessfulConversationSummarySubmit.json +++ b/specification/cognitiveservices/Language.Conversations/examples/2023-11-15-preview/SuccessfulConversationSummarySubmit.json @@ -1,4 +1,6 @@ { + "operationId": "AnalyzeConversationsSubmitJob", + "title": "SuccessfulConversationSummarySubmit", "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", "api-version": "2023-11-15-preview", diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/conversations/SuccessfulCustomConversationSummarizationTaskResult.json b/specification/cognitiveservices/Language.Conversations/examples/2023-11-15-preview/SuccessfulCustomConversationSummarizationTaskResult.json similarity index 94% rename from specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/conversations/SuccessfulCustomConversationSummarizationTaskResult.json rename to specification/cognitiveservices/Language.Conversations/examples/2023-11-15-preview/SuccessfulCustomConversationSummarizationTaskResult.json index 0a1149def91d..5ce4948fe18d 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/conversations/SuccessfulCustomConversationSummarizationTaskResult.json +++ b/specification/cognitiveservices/Language.Conversations/examples/2023-11-15-preview/SuccessfulCustomConversationSummarizationTaskResult.json @@ -1,4 +1,6 @@ { + "operationId": "AnalyzeConversationsJobStatus", + "title": "SuccessfulCustomConversationSummarizationTaskResult", "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", "api-version": "2023-11-15-preview", diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/conversations/SuccessfulCustomConversationSummarizationTaskSubmit.json b/specification/cognitiveservices/Language.Conversations/examples/2023-11-15-preview/SuccessfulCustomConversationSummarizationTaskSubmit.json similarity index 95% rename from specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/conversations/SuccessfulCustomConversationSummarizationTaskSubmit.json rename to specification/cognitiveservices/Language.Conversations/examples/2023-11-15-preview/SuccessfulCustomConversationSummarizationTaskSubmit.json index 7207d7204a58..d68630c0ab7e 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/conversations/SuccessfulCustomConversationSummarizationTaskSubmit.json +++ b/specification/cognitiveservices/Language.Conversations/examples/2023-11-15-preview/SuccessfulCustomConversationSummarizationTaskSubmit.json @@ -1,4 +1,6 @@ { + "operationId": "AnalyzeConversationsSubmitJob", + "title": "SuccessfulCustomConversationSummarizationTaskSubmit", "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", "api-version": "2023-11-15-preview", diff --git a/specification/cognitiveservices/Language.Conversations/main.tsp b/specification/cognitiveservices/Language.Conversations/main.tsp new file mode 100644 index 000000000000..dce0f6939cf4 --- /dev/null +++ b/specification/cognitiveservices/Language.Conversations/main.tsp @@ -0,0 +1,1996 @@ +import "@typespec/rest"; +import "@typespec/http"; +import "@typespec/versioning"; +import "@azure-tools/typespec-azure-core"; +import "./common.tsp"; + +using TypeSpec.Http; +using TypeSpec.Rest; +using TypeSpec.Versioning; +using Azure.Core; +using Azure.Core.Traits; + +/** The language service conversations API is a suite of natural language processing (NLP) skills that can be used to analyze structured conversations (textual or spoken). The synchronous API in this suite accepts a request and mediates among multiple language projects, such as LUIS Generally Available, Question Answering, Conversational Language Understanding, and then calls the best candidate service to handle the request. At last, it returns a response with the candidate service's response as a payload.\n\n In some cases, this API needs to forward requests and responses between the caller and an upstream service. The asynchronous APIs in this suite enable tasks like Conversation Summarization and Conversational PII detection. */ +@useAuth( + TypeSpec.Http.ApiKeyAuth< + TypeSpec.Http.ApiKeyLocation.header, + "Ocp-Apim-Subscription-Key" + > +) +@service({ + title: "Microsoft Cognitive Language Service - Analyze Conversations", +}) +@server( + "{Endpoint}/language", + "Single server endpoint", + { + /** Supported Cognitive Services endpoint (e.g., https://.api.cognitiveservices.azure.com). */ + Endpoint: string, + } +) +@versioned(Versions) +namespace Language.Conversations; + +/** Analyze Conversations Service Versions */ +enum Versions { + /** Version 2022-05-01 */ + @useDependency(Azure.Core.Versions.v1_0_Preview_2) + v2022_05_01: "2022-05-01", + + /** Version 2023-04-01 */ + @useDependency(Azure.Core.Versions.v1_0_Preview_2) + v2023_04_01: "2023-04-01", + + /** Version 2023-11-15-preview */ + @useDependency(Azure.Core.Versions.v1_0_Preview_2) + v2023_11_15_preview: "2023-11-15-preview", +} + +/** These are the [Azure Active Directory OAuth2](https://docs.microsoft.com/azure/active-directory/develop/v1-overview) Flows. When paired with [Azure role-based access](https://docs.microsoft.com/azure/role-based-access-control/overview) control it can be used to control access to Azure Maps REST APIs. Azure role-based access controls are used to designate access to one or more Azure Maps resource account or sub-resources. Any user, group, or service principal can be granted access via a built-in role or a custom role composed of one or more permissions to Azure Maps REST APIs.\n\nTo implement scenarios, we recommend viewing [authentication concepts](https://aka.ms/amauth). In summary, this security definition provides a solution for modeling application(s) via objects capable of access control on specific APIs and scopes.\n\n#### Notes\n* This security definition **requires** the use of the `x-ms-client-id` header to indicate which Azure Maps resource the application is requesting access to. This can be acquired from the [Maps management API](https://aka.ms/amauthdetails).\n* \nThe `Authorization URL` is specific to the Azure public cloud instance. Sovereign clouds have unique Authorization URLs and Azure Active directory configurations. \n* \nThe Azure role-based access control is configured from the [Azure management plane](https://aka.ms/amrbac) via Azure portal, PowerShell, CLI, Azure SDKs, or REST APIs.\n* \nUsage of the [Azure Maps Web SDK](https://aka.ms/amaadmc) allows for configuration based setup of an application for multiple use cases.\n* Currently, Azure Active Directory [v1.0 or v2.0](https://docs.microsoft.com/azure/active-directory/develop/azure-ad-endpoint-comparison) supports Work, School, and Guests but does not support Personal accounts. */ +#suppress "@azure-tools/typespec-azure-core/casing-style" "The names of Model types must use PascalCase" +model AADToken + is OAuth2Auth<[ + { + type: OAuth2FlowType.implicit; + authorizationUrl: "https://login.microsoftonline.com/common/oauth2/authorize"; + scopes: ["https://cognitiveservices.azure.com/.default"]; + } + ]>; + +/** Enumeration of supported Conversation tasks. */ +union AnalyzeConversationTaskKind { + string, + + /** Conversation task kind */ + Conversation: "Conversation", +} + +/** Enumeration of supported conversational task results. */ +union AnalyzeConversationTaskResultsKind { + string, + + /** Conversation result task kind */ + ConversationResult: "ConversationResult", +} + +/** The base class of a conversation input task. */ +@discriminator("kind") +@resource("language") +model AnalyzeConversationTask { + /** The base class of a conversation input task. */ + @key + @visibility("read", "create", "query") + kind: AnalyzeConversationTaskKind; +} + +/** The base class of a conversation input task result. */ +@discriminator("kind") +model AnalyzeConversationTaskResult { + /** The base class of a conversation input task result. */ + kind: AnalyzeConversationTaskResultsKind; +} + +/** The input for a custom conversation task. */ +model ConversationalTask extends AnalyzeConversationTask { + /** The input for a custom conversation task. */ + kind: AnalyzeConversationTaskKind.Conversation; + + /** The input ConversationItem and its optional parameters */ + analysisInput: ConversationAnalysisOptions; + + /** Input parameters necessary for a Conversation task. */ + parameters: ConversationTaskParameters; +} + +/** The input ConversationItem and its optional parameters */ +model ConversationAnalysisOptions { + /** The abstract base for a user input formatted conversation (e.g., Text, Transcript). */ + conversationItem: TextConversationItem; +} + +/** The abstract base for a user input formatted conversation (e.g., Text, Transcript). */ +model ConversationItemBase { + /** The ID of a conversation item. */ + id: string; + + /** The participant ID of a conversation item. */ + participantId: string; + + /** The override language of a conversation item in BCP 47 language representation. */ + language?: string; + + /** Enumeration of supported conversational modalities. */ + modality?: InputModality; + + /** Role of the participant. */ + @added(Versions.v2023_04_01) + role?: role; +} + +/** Role of the participant. */ +@added(Versions.v2023_04_01) +union role { + string, + + /** The participant is a customer. */ + @added(Versions.v2023_04_01) + customer: "customer", + + /** The participant is an agent. */ + @added(Versions.v2023_04_01) + agent: "agent", + + /** The is a generic participant. */ + @added(Versions.v2023_04_01) + generic: "generic", +} + +/** The text modality of an input conversation. */ +#suppress "@azure-tools/typespec-azure-core/bad-record-type" +model TextConversationItem is ConversationItemBase { + /** The text input */ + text: string; +} + +/** This is the parameter set of either the Orchestration project itself or one of the target services. */ +@discriminator("targetProjectKind") +model AnalysisParameters { + /** The type of a target service */ + targetProjectKind: targetProjectKind; + + /** The API version to use when call a specific target service. */ + apiVersion?: string; +} + +/** A wrap up of non-linked intent response. */ +model NoneLinkedTargetIntentResult extends TargetIntentResult { + /** The actual response from a Conversation project. */ + targetProjectKind: targetProjectKind.NonLinked; + + /** The actual response from a Conversation project. */ + result?: ConversationResult; +} + +/** This is a set of request parameters for LUIS Generally Available projects. */ +model LuisParameters extends AnalysisParameters { + /** The type of a target service */ + targetProjectKind: targetProjectKind.Luis; + + /** The utterance to predict. */ + @maxLength(500) + query?: string; + + /** This customizes how the service calls LUIS Generally Available projects. */ + callingOptions?: LuisCallingOptions; +} + +/** This customizes how the service calls LUIS Generally Available projects. */ +model LuisCallingOptions { + /** Enable verbose response. */ + verbose?: boolean; + + /** Save log to add in training utterances later. */ + log?: boolean; + + /** Set true to show all intents. */ + #suppress "@azure-tools/typespec-azure-core/casing-style" "The names of Property types must use camelCase" + `show-all-intents`?: boolean; + + /** The timezone offset for the location of the request. */ + timezoneOffset?: int32; + + /** Enable spell checking. */ + spellCheck?: boolean; + + /** The subscription key to use when enabling Bing spell check */ + #suppress "@azure-tools/typespec-azure-core/casing-style" "The names of Property types must use camelCase" + `bing-spell-check-subscription-key`?: string; +} + +/** This is a set of request parameters for Question Answering knowledge bases. */ +model QuestionAnsweringParameters extends AnalysisParameters { + /** This is a set of request parameters for Question Answering knowledge bases. */ + targetProjectKind: targetProjectKind.QuestionAnswering; + + /** The options sent to a Question Answering KB. */ + callingOptions?: AnswersOptions; +} + +/** This is a set of request parameters for Customized Conversation projects. */ +model ConversationParameters extends AnalysisParameters { + /** This is a set of request parameters for Customized Conversation projects. */ + targetProjectKind: targetProjectKind.Conversation; + + /** The option to set to call a Conversation project. */ + callingOptions?: ConversationCallingOptions; +} + +/** The option to set to call a Conversation project. */ +model ConversationCallingOptions { + /** The language of the query in BCP 47 language representation. */ + language?: string; + + /** If true, the service will return more detailed information. */ + verbose?: boolean; + + /** If true, the query will be saved for customers to further review in authoring, to improve the model quality. */ + isLoggingEnabled?: boolean; +} + +/** This is the base class of an intent prediction */ +@discriminator("targetProjectKind") +model TargetIntentResult { + /** This is the base class of an intent prediction */ + targetProjectKind: targetProjectKind; + + /** The API version used to call a target service. */ + apiVersion?: string; + + /** The prediction score and it ranges from 0.0 to 1.0. */ + @minValue(0) + @maxValue(1) + confidenceScore: float64; +} + +/** A wrap up of Conversation project response. */ +model ConversationTargetIntentResult extends TargetIntentResult { + /** A wrap up of Conversation project response. */ + targetProjectKind: targetProjectKind.Conversation; + + /** The actual response from a Conversation project. */ + result?: ConversationResult; +} + +/** The response returned by a Conversation project. */ +model ConversationResult { + /** The same query given in request. */ + query: string; + + /** The detected language from the query in BCP 47 language representation. */ + detectedLanguage?: string; + + /** The predicted result for the query. */ + prediction?: ConversationPrediction; +} + +/** Represents the prediction section of a Conversation project. */ +model ConversationPrediction extends BasePrediction { + /** Represents the prediction section of a Conversation project. */ + projectKind: projectKind.Conversation; + + /** The intent classification results. */ + intents: Array; + + /** The entity extraction results. */ + entities: Array; +} + +/** The intent classification result of a Conversation project. */ +model ConversationIntent { + /** A predicted class. */ + category: string; + + /** The confidence score of the class from 0.0 to 1.0. */ + @minValue(0) + @maxValue(1) + confidenceScore: float32; +} + +/** The entity extraction result of a Conversation project. */ +model ConversationEntity { + /** The entity category. */ + category: string; + + /** The predicted entity text. */ + text: string; + + /** The starting index of this entity in the query. */ + offset: int32; + + /** The length of the text. */ + length: int32; + + /** The entity confidence score. */ + confidenceScore: float32; + + /** The collection of entity resolution objects. */ + resolutions?: Array; + + /** The collection of entity extra information objects. */ + extraInformation?: Array; +} + +/** The abstract base object for entity extra information. */ +@discriminator("extraInformationKind") +model BaseExtraInformation { + /** The extra information object kind. */ + extraInformationKind: ExtraInformationKind; +} + +/** The extra information object kind. */ +union ExtraInformationKind { + string, + + /** Entity subtype extra information kind */ + EntitySubtype: "EntitySubtype", + + /** List key extra information kind */ + ListKey: "ListKey", + + /** Regex key extra information kind */ + @added(Versions.v2023_04_01) + RegexKey: "RegexKey", +} + +/** The concrete entity Subtype model of extra information. */ +model EntitySubtype extends BaseExtraInformation { + /** The extra information object kind. */ + extraInformationKind: ExtraInformationKind.EntitySubtype; + + /** The Subtype of an extracted entity type. */ + value?: string; +} + +/** The list key extra data kind. */ +model ListKey extends BaseExtraInformation { + /** The list key extra data kind. */ + extraInformationKind: ExtraInformationKind.ListKey; + + /** The canonical form of the extracted entity. */ + key?: string; +} + +/** The regex key extra data kind. */ +@added(Versions.v2023_04_01) +model RegexKey extends BaseExtraInformation { + /** The regex key extra data kind. */ + extraInformationKind: ExtraInformationKind.RegexKey; + + /** The key of the regex pattern used in extracting the entity. */ + key?: string; + + /** The .NET regex pattern used in extracting the entity. Please visit https://docs.microsoft.com/dotnet/standard/base-types/regular-expressions for more information about .NET regular expressions. */ + regexPattern?: string; +} + +/** The abstract base class for entity resolutions. */ +@discriminator("resolutionKind") +model BaseResolution { + /** The entity resolution object kind. */ + resolutionKind: ResolutionKind; +} + +/** Represents resolutions for quantities. */ +model QuantityResolution { + /** The numeric value that the extracted text denotes. */ + value: float64; +} + +/** Represents the Age entity resolution model. */ +model AgeResolution extends BaseResolution { + /** Represents the Age entity resolution model. */ + resolutionKind: ResolutionKind.AgeResolution; + + ...QuantityResolution; + + /** The Age Unit of measurement */ + unit: AgeUnit; +} + +/** Represents the volume entity resolution model. */ +model VolumeResolution extends BaseResolution { + /** Represents the volume entity resolution model. */ + resolutionKind: ResolutionKind.VolumeResolution; + + ...QuantityResolution; + + /** The Volume Unit of measurement */ + unit: VolumeUnit; +} + +/** Represents the speed entity resolution model. */ +model SpeedResolution extends BaseResolution { + /** Represents the speed entity resolution model. */ + resolutionKind: ResolutionKind.SpeedResolution; + + ...QuantityResolution; + + /** The speed Unit of measurement */ + unit: SpeedUnit; +} + +/** Represents the area entity resolution model. */ +model AreaResolution extends BaseResolution { + /** Represents the area entity resolution model. */ + resolutionKind: ResolutionKind.AreaResolution; + + ...QuantityResolution; + + /** The area Unit of measurement */ + unit: AreaUnit; +} +/** Represents the length entity resolution model. */ +model LengthResolution extends BaseResolution { + /** Represents the length entity resolution model. */ + resolutionKind: ResolutionKind.LengthResolution; + + ...QuantityResolution; + + /** The length Unit of measurement */ + unit: LengthUnit; +} + +/** Represents the information (data) entity resolution model. */ +model InformationResolution extends BaseResolution { + /** Represents the information (data) entity resolution model. */ + resolutionKind: ResolutionKind.InformationResolution; + + ...QuantityResolution; + + /** The information (data) Unit of measurement. */ + unit: InformationUnit; +} + +/** Represents the temperature entity resolution model. */ +model TemperatureResolution extends BaseResolution { + /** Represents the temperature entity resolution model. */ + resolutionKind: ResolutionKind.TemperatureResolution; + + ...QuantityResolution; + + /** The temperature Unit of measurement. */ + unit: TemperatureUnit; +} + +/** Represents the weight entity resolution model. */ +model WeightResolution extends BaseResolution { + /** Represents the weight entity resolution model. */ + resolutionKind: ResolutionKind.WeightResolution; + + ...QuantityResolution; + + /** The weight Unit of measurement. */ + unit: WeightUnit; +} + +/** Represents the currency entity resolution model. */ +model CurrencyResolution extends BaseResolution { + /** Represents the currency entity resolution model. */ + resolutionKind: ResolutionKind.CurrencyResolution; + + /** The alphabetic code based on another ISO standard, ISO 3166, which lists the codes for country names. The first two letters of the ISO 4217 three-letter code are the same as the code for the country name, and, where possible, the third letter corresponds to the first letter of the currency name. */ + @encodedName("application/json", "ISO4217") + iso4217?: string; + + /** The money amount captured in the extracted entity */ + value: float64; + + /** The unit of the amount captured in the extracted entity */ + unit: string; +} + +/** A resolution for boolean expressions */ +model BooleanResolution extends BaseResolution { + /** A resolution for boolean expressions */ + resolutionKind: ResolutionKind.BooleanResolution; + + /** A resolution for boolean expressions */ + value: boolean; +} + +/** A resolution for datetime entity instances. */ +model DateTimeResolution extends BaseResolution { + /** A resolution for datetime entity instances. */ + resolutionKind: ResolutionKind.DateTimeResolution; + + /** An extended ISO 8601 date/time representation as described in (https://github.com/Microsoft/Recognizers-Text/blob/master/Patterns/English/English-DateTime.yaml) */ + timex: string; + + /** The DateTime SubKind */ + dateTimeSubKind: DateTimeSubKind; + + /** The actual time that the extracted text denote. */ + value: string; + + /** An optional modifier of a date/time instance. */ + modifier?: TemporalModifier; +} + +/** A resolution for numeric entity instances. */ +model NumberResolution extends BaseResolution { + /** A resolution for numeric entity instances. */ + resolutionKind: ResolutionKind.NumberResolution; + + /** The type of the extracted number entity. */ + numberKind: NumberKind; + + /** A numeric representation of what the extracted text denotes. */ + value: float64; +} + +/** A resolution for ordinal numbers entity instances. */ +model OrdinalResolution extends BaseResolution { + /** A resolution for ordinal numbers entity instances. */ + resolutionKind: ResolutionKind.OrdinalResolution; + + /** The offset with respect to the reference (e.g., offset = -1 indicates the second to last) */ + offset: string; + + /** The reference point that the ordinal number denotes. */ + relativeTo: RelativeTo; + + /** A simple arithmetic expression that the ordinal denotes. */ + value: string; +} + +/** represents the resolution of a date and/or time span. */ +model TemporalSpanResolution extends BaseResolution { + /** represents the resolution of a date and/or time span. */ + resolutionKind: ResolutionKind.TemporalSpanResolution; + + /** represents the resolution of a date and/or time span. An extended ISO 8601 date/time representation as described in (https://github.com/Microsoft/Recognizers-Text/blob/master/Patterns/English/English-DateTime.yaml) */ + begin?: string; + + /** represents the resolution of a date and/or time span. An extended ISO 8601 date/time representation as described in (https://github.com/Microsoft/Recognizers-Text/blob/master/Patterns/English/English-DateTime.yaml) */ + end?: string; + + /** An optional duration value formatted based on the ISO 8601 (https://en.wikipedia.org/wiki/ISO_8601#Durations) */ + duration?: string; + + /** An optional modifier of a date/time instance. */ + modifier?: TemporalModifier; + + /** An optional triplet containing the beginning, the end, and the duration all stated as ISO 8601 formatted strings. */ + @added(Versions.v2023_04_01) + timex?: string; +} + +/** represents the resolution of numeric intervals. */ +model NumericRangeResolution extends BaseResolution { + /** represents the resolution of numeric intervals. */ + resolutionKind: ResolutionKind.NumericRangeResolution; + + /** The kind of range that the resolution object represents. */ + rangeKind: RangeKind; + + /** The beginning value of the interval. */ + minimum: float64; + + /** The ending value of the interval. */ + maximum: float64; +} + +/** It is a wrap up of LUIS Generally Available response. */ +#suppress "@azure-tools/typespec-azure-core/bad-record-type" +model LuisTargetIntentResult extends TargetIntentResult { + /** Kind of the project. */ + targetProjectKind: targetProjectKind.Luis; + + /** The actual response from a LUIS Generally Available application. */ + result?: LuisResult; +} + +/** It is a wrap up a Question Answering KB response. */ +model QuestionAnsweringTargetIntentResult extends TargetIntentResult { + /** It is a wrap up a Question Answering KB response. */ + targetProjectKind: targetProjectKind.QuestionAnswering; + + /** The generated answer by a Question Answering KB. */ + result?: AnswersResult; +} + +/** It is the response from a LUIS Generally Available application. */ +#suppress "@azure-tools/typespec-azure-core/bad-record-type" +model LuisResult is Record; + +/** It is a wrap up a Question Answering KB response. */ +@added(Versions.v2023_04_01) +@resource("language/analyze-conversations/jobs") +model AnalyzeConversationJobsInput { + /** Display name for the analysis job. */ + displayName?: string; + + /** Analysis Input */ + @key + @visibility("read", "create", "query") + analysisInput: MultiLanguageConversationAnalysisInput; + + /** Set of tasks to execute on the input conversation. */ + tasks: Array; +} + +/** Base class for a long-running conversation input task. */ +#suppress "@azure-tools/typespec-azure-core/casing-style" "The names of Model types must use PascalCase" +@discriminator("kind") +@added(Versions.v2023_04_01) +model AnalyzeConversationLROTask is TaskIdentifier { + /** Enumeration of supported analysis tasks on a collection of conversations. */ + kind: AnalyzeConversationLROTaskKind; +} + +/** Enumeration of supported analysis tasks on a collection of conversations. */ +@added(Versions.v2023_04_01) +union AnalyzeConversationLROTaskKind { + string, + + /** Conversational Summarization Task */ + ConversationalSummarizationTask: "ConversationalSummarizationTask", + + /** Conversational PII Task */ + @added(Versions.v2023_11_15_preview) + ConversationalPIITask: "ConversationalPIITask", + + /** Custom Conversational Summarization Task */ + @added(Versions.v2023_11_15_preview) + CustomConversationalSummarizationTask: "CustomConversationalSummarizationTask", + + /** Conversational Sentiment Task */ + @added(Versions.v2023_11_15_preview) + ConversationalSentimentTask: "ConversationalSentimentTask", +} + +/** Enumeration of results for supported conversation analysis Results. */ +@added(Versions.v2023_04_01) +union AnalyzeConversationResultsKind { + string, + + /** Conversational Summarization Results */ + @added(Versions.v2023_04_01) + ConversationalSummarizationResults: "ConversationalSummarizationResults", + + /** Conversational PII Results */ + @added(Versions.v2023_11_15_preview) + ConversationalPIIResults: "ConversationalPIIResults", + + /** Custom Conversational Summarization Results */ + @added(Versions.v2023_11_15_preview) + CustomConversationalSummarizationResults: "CustomConversationalSummarizationResults", + + /** Conversational Sentiment Results */ + @added(Versions.v2023_11_15_preview) + ConversationalSentimentResults: "ConversationalSentimentResults", +} + +/** Contains the status of the submitted job for analyzing a conversation, along with related statistics. */ +@added(Versions.v2023_04_01) +@resource("analyze-conversations/jobs") +model AnalyzeConversationJobState { + ...JobState; + ...ConversationTasksState; + ...AnalyzeConversationJobStatistics; +} + +/** Contains the statistics for the submitted job. */ +@added(Versions.v2023_04_01) +model AnalyzeConversationJobStatistics { + /** Contains the statistics for the submitted job. */ + statistics?: ConversationRequestStatistics; +} + +/** Contains the state for the tasks that are being executed as part of the submitted job for analyzing a conversation. */ +@added(Versions.v2023_04_01) +model ConversationTasksState { + /** Contains the state for the tasks that are being executed as part of the submitted job for analyzing a conversation. */ + tasks: Tasks; +} + +/** Contains the state for the tasks that are being executed as part of the submitted job for analyzing a conversation. */ +@added(Versions.v2023_04_01) +model Tasks { + /** Count of tasks that finished successfully. */ + completed: int32; + + /** Count of tasks that failed. */ + failed: int32; + + /** Count of tasks that are currently in progress. */ + inProgress: int32; + + /** Total count of tasks submitted as part of the job. */ + total: int32; + + /** List of results from tasks (if available). */ + items?: Array; +} + +/** Container for results of all tasks in the conversation job. */ +@discriminator("kind") +@added(Versions.v2023_04_01) +model AnalyzeConversationJobResult { + ...TaskState; + ...TaskIdentifier; + + /** discriminator kind */ + kind: AnalyzeConversationResultsKind; +} + +/** Multi Language Conversation Analysis Input */ +@added(Versions.v2023_04_01) +model MultiLanguageConversationAnalysisInput { + /** Array of conversation items */ + conversations: Array; +} + +/** Complete ordered set of utterances (spoken or written) by one or more speakers to be used for analysis. */ +@added(Versions.v2023_04_01) +@discriminator("modality") +model Conversation { + /** Unique identifier for the conversation. */ + id: string; + + /** Language of the conversation item in BCP-47 format. */ + language: string; + + /** modality */ + modality: InputModality; + + /** domain */ + domain?: ConversationDomain; +} + +/** Enumeration of supported conversational domains. */ +@added(Versions.v2023_04_01) +union ConversationDomain { + string, + + /** Enumeration of supported conversational domains. */ + finance: "finance", + + /** Enumeration of supported conversational domains. */ + healthcare: "healthcare", + + /** Enumeration of supported conversational domains. */ + generic: "generic", +} + +/** model for text conversation */ +@added(Versions.v2023_04_01) +model TextConversation extends Conversation { + /** modality discriminator */ + modality: InputModality.text; + + /** Ordered list of text conversation items in the conversation. */ + conversationItems: Array; +} + +/** model for transcript conversation */ +@added(Versions.v2023_04_01) +model TranscriptConversation extends Conversation { + /** modality discriminator */ + modality: InputModality.transcript; + + /** Ordered list of transcript conversation items in the conversation. */ + conversationItems: Array; +} + +/** Additional properties for supporting transcript conversation. */ +#suppress "@azure-tools/typespec-azure-core/bad-record-type" +@added(Versions.v2023_04_01) +model TranscriptConversationItem is ConversationItemBase { + /** Inverse text normalization (ITN) representation of input. The inverse-text-normalized form is the recognized text from Microsoft's speech-to-text API, with phone numbers, numbers, abbreviations, and other transformations applied. */ + itn: string; + + /** Inverse-text-normalized format with profanity masking applied. */ + maskedItn: string; + + /** Display form of the recognized text from the speech-to-text API, with punctuation and capitalization added. */ + text: string; + + /** Lexical form of the recognized text from the speech-to-text API, with the actual words recognized. */ + lexical: string; + + /** List of word-level audio timing information. */ + wordLevelTimings?: Array; + + /** Audio timing at the conversation item level. This still can help with AI quality if word-level audio timings are not available. */ + conversationItemLevelTiming?: ConversationItemLevelTiming; +} + +/** Transcript content response that the service generates, with all necessary personally identifiable information redacted. */ +@added(Versions.v2023_04_01) +model RedactedTranscriptContent { + /** Redacted output for input in inverse-text-normalized format. */ + itn?: string; + + /** Redacted output for input in masked inverse-text-normalized format. */ + maskedItn?: string; + + /** Redacted output for input in text (Microsoft's speech-to-text 'display') format. */ + text?: string; + + /** Redacted output for input in lexical format. */ + lexical?: string; + + /** List of redacted audio segments. */ + audioTimings?: Array; +} + +/** Word-level timing information that the speech-to-text API generates. The words in this object should have 1:1 correspondence with the lexical input to allow for audio redaction. */ +@added(Versions.v2023_04_01) +model WordLevelTiming is AudioTiming { + /** Recognized word. */ + word?: string; +} + +/** Audio timing information. */ +@added(Versions.v2023_04_01) +model AudioTiming { + /** Offset from the start of speech audio, in ticks. 1 tick = 100 nanoseconds. */ + offset?: int64; + + /** Duration of word articulation, in ticks. 1 tick = 100 nanoseconds. */ + duration?: int64; +} + +/** Shared attributes for all conversational task results. */ +@added(Versions.v2023_04_01) +model ConversationResultBase { + /** Unique, non-empty conversation identifier. */ + id: string; + + /** Warnings encountered in processing the document. */ + warnings: Array; + + /** If showStats=true was specified in the request this field will contain information about the conversation payload. */ + statistics?: ConversationStatistics; +} + +/** If showStats=true was specified in the request, this field contains information about the conversation payload. */ +@added(Versions.v2023_04_01) +model ConversationStatistics { + /** Number of text units for the request. */ + transactionsCount: int32; +} + +/** if showStats=true was specified in the request, this field contains information about the request payload. */ +@added(Versions.v2023_04_01) +model ConversationRequestStatistics is RequestStatistics { + /** Number of conversations submitted in the request. */ + conversationsCount: int32; + + /** Number of conversation documents. This excludes documents that are empty, over the size limit, or in unsupported languages. */ + validConversationsCount: int32; + + /** Number of invalid documents. This includes documents that are empty, over the size limit, or in unsupported languages. */ + erroneousConversationsCount: int32; +} + +/** Audio timing at the conversation item level. */ +@added(Versions.v2023_04_01) +model ConversationItemLevelTiming is AudioTiming; + +/** Task definition for conversational sentiment. */ +@added(Versions.v2023_11_15_preview) +model AnalyzeConversationalSentimentTask extends AnalyzeConversationLROTask { + /** discriminator kind */ + kind: AnalyzeConversationLROTaskKind.ConversationalSentimentTask; + + /** Supported parameters for a conversational sentiment task. */ + parameters?: ConversationalSentimentTaskParameters; +} + +/** Supported parameters for a conversational sentiment task. */ +@added(Versions.v2023_11_15_preview) +model ConversationalSentimentTaskParameters is PreBuiltTaskParameters { + /** For transcript conversations, this parameter provides information regarding which content type should be used for sentiment analysis. The details of the sentiment analysis - like the offset, length and the text itself - will correspond to the text type selected here. */ + @added(Versions.v2023_11_15_preview) + predictionSource?: TranscriptContentType; +} + +/** Result from the sentiment analysis operation performed on a list of conversations. */ +@added(Versions.v2023_11_15_preview) +model AnalyzeConversationSentimentResult extends AnalyzeConversationJobResult { + /** discriminator kind */ + kind: AnalyzeConversationResultsKind.ConversationalSentimentResults; + + /** The result from sentiment analysis operation for each conversation. */ + results: ConversationSentimentResults; +} + +/** The result from sentiment analysis operation for each conversation. */ +@added(Versions.v2023_11_15_preview) +model ConversationSentimentResults is PreBuiltResult { + /** Array of ConversationSentimentResults */ + conversations: Array; +} + +/** The result from sentiment analysis operation for each conversation. */ +@added(Versions.v2023_11_15_preview) +model ConversationSentimentResultsConversation { + ...ConversationResultBase; + ...ConversationSentimentResult; +} + +/** The result from sentiment analysis operation for each conversation item. */ +@added(Versions.v2023_11_15_preview) +model ConversationSentimentResult { + /** Enumeration of Sentiment operation results for all the conversation items in a conversation. */ + conversationItems: Array; +} + +/** Sentiment operation results for a conversation items */ +@added(Versions.v2023_11_15_preview) +model ConversationSentimentItemResult { + /** The identifier for the conversation item */ + id: string; + + /** The identifier for the speaker */ + participantId: string; + + /** Predicted sentiment */ + sentiment: TextSentiment; + + /** Represents the confidence scores between 0 and 1 across all sentiment classes: positive, neutral, negative. */ + confidenceScores: SentimentConfidenceScores; +} + +/** Text that has been categorized into pre-defined classes or types such as: person, location, event, product, and organization. */ +@added(Versions.v2023_11_15_preview) +model Entity { + /** Entity text as appears in the request. */ + text: string; + + /** Entity type. */ + category: string; + + /** (Optional) Entity sub type. */ + subcategory?: string; + + /** Start position for the entity text. Use of different 'stringIndexType' values can affect the offset returned. */ + offset: int32; + + /** Length for the entity text. Use of different 'stringIndexType' values can affect the length returned. */ + length: int32; + + /** Confidence score between 0 and 1 of the extracted entity. */ + confidenceScore: float64; +} + +/** Result from the personally identifiable information detection and redaction operation performed on a list of conversations. */ +@added(Versions.v2023_11_15_preview) +model AnalyzeConversationConversationPiiResult + extends AnalyzeConversationJobResult { + /** discriminator kind */ + kind: AnalyzeConversationResultsKind.ConversationalPIIResults; + + /** results */ + results: ConversationPiiResults; +} + +/** The result from PII detection and redaction operation for each conversation. */ +@added(Versions.v2023_11_15_preview) +model ConversationPiiResults is PreBuiltResult { + /** array of conversations */ + conversations: Array; +} + +/** Conversation PII result item */ +@added(Versions.v2023_11_15_preview) +model ConversationalPiiResultWithResultBase { + ...ConversationResultBase; + ...ConversationPiiResult; +} + +/** The result from PII detection and redaction operation for each conversation. */ +@added(Versions.v2023_11_15_preview) +model ConversationPiiResult { + /** List of conversationItems */ + conversationItems: Array; +} + +/** The result from PII detection and redaction operation for each conversation. */ +@added(Versions.v2023_11_15_preview) +model ConversationPiiItemResult { + /** Id of the result */ + id: string; + + /** Transcript content response that the service generates, with all necessary personally identifiable information redacted. */ + redactedContent: RedactedTranscriptContent; + + /** Array of Entities */ + entities: Array; +} + +/** Task definition for a PII redaction in conversations. */ +@added(Versions.v2023_11_15_preview) +model AnalyzeConversationPiiTask extends AnalyzeConversationLROTask { + /** discriminator kind */ + kind: AnalyzeConversationLROTaskKind.ConversationalPIITask; + + /** parameters */ + parameters?: ConversationPiiTaskParameters; +} + +/** Supported parameters for a conversational pii task. */ +@added(Versions.v2023_11_15_preview) +model ConversationPiiTaskParameters is PreBuiltTaskParameters { + /** Array of ConversationPIICategories */ + @added(Versions.v2023_11_15_preview) + piiCategories?: Array; + + /** Flag to indicate if response should include audio stream offset and duration for any detected entities to be redacted. By default, audio timing of redacted entities are not included. */ + redactAudioTiming?: boolean; + + /** For transcript conversations, this parameter provides information regarding which content type (ITN, Text, Lexical, Masked ITN) should be used for entity detection. The details of the entities detected - like the offset, length and the text itself - will correspond to the text type selected here. */ + @added(Versions.v2023_11_15_preview) + redactionSource?: TranscriptContentType; + + /** Optional parameter to use a Custom Character to be used for redaction in PII responses. Default character will be * as before. We allow specific ascii characters for redaction. */ + @added(Versions.v2023_11_15_preview) + redactionCharacter?: redactionCharacter = redactionCharacter.asterisk; + + /** List of categories that need to be excluded instead of included. */ + @added(Versions.v2023_11_15_preview) + excludePiiCategories?: Array; +} + +/** Describes the PII categories to return for detection. If not provided, 'default' categories will be returned which will vary with the language. */ +@added(Versions.v2023_11_15_preview) +union ConversationPiiCategories { + string, + + /** Address category */ + Address: "Address", + + /** Credit card number category */ + CreditCardNumber: "CreditCardNumber", + + /** Email category */ + Email: "Email", + + /** Person category */ + Person: "Person", + + /** Numeric identifier category */ + NumericIdentifier: "NumericIdentifier", + + /** Phone number category */ + PhoneNumber: "PhoneNumber", + + /** US social security number category */ + USSocialSecurityNumber: "USSocialSecurityNumber", + + /** Miscellaneous category */ + Miscellaneous: "Miscellaneous", + + /** All categories */ + All: "All", + + /** Default categories */ + Default: "Default", +} + +/** Describes the PII categories to exclude for detection. If not provided, 'default' categories will be returned which will vary with the language. */ +@added(Versions.v2023_11_15_preview) +union ConversationPiiCategoriesExclude { + string, + + /** Address category */ + Address: "Address", + + /** Credit card number category */ + CreditCardNumber: "CreditCardNumber", + + /** Email category */ + Email: "Email", + + /** Person category */ + Person: "Person", + + /** Numeric identifier category */ + NumericIdentifier: "NumericIdentifier", + + /** Phone number category */ + PhoneNumber: "PhoneNumber", + + /** US social security number category */ + USSocialSecurityNumber: "USSocialSecurityNumber", +} + +/** Enumeration of supported transcript content types. */ +@added(Versions.v2023_11_15_preview) +union TranscriptContentType { + string, + + /** Lexical content type */ + lexical: "lexical", + + /** ITN content type */ + itn: "itn", + + /** Masked ITN content type */ + maskedItn: "maskedItn", + + /** Text content type */ + text: "text", +} + +/** Task definition for custom conversational summarization. */ +@added(Versions.v2023_11_15_preview) +model AnalyzeCustomConversationSummarizationTask + extends AnalyzeConversationLROTask { + /** discriminator kind */ + kind: AnalyzeConversationLROTaskKind.CustomConversationalSummarizationTask; + + /** parameters */ + parameters?: CustomConversationSummarizationTaskParameters; +} + +/** Task definition for conversational summarization. */ +@added(Versions.v2023_04_01) +model AnalyzeConversationSummarizationTask extends AnalyzeConversationLROTask { + /** discriminator kind */ + kind: AnalyzeConversationLROTaskKind.ConversationalSummarizationTask; + + /** parameters */ + parameters?: ConversationSummarizationTaskParameters; +} + +/** Supported parameters for a conversational summarization task. */ +@added(Versions.v2023_04_01) +model ConversationSummarizationTaskParametersBase + is AbstractiveSummarizationTaskParametersBase { + /** Array of Summary Aspects */ + summaryAspects: Array; +} + +/** Supported parameters for pre-build conversational summarization task. */ +@added(Versions.v2023_04_01) +model ConversationSummarizationTaskParameters is PreBuiltTaskParameters { + ...ConversationSummarizationTaskParametersBase; +} + +/** Supported parameters for a custom conversation summarization task. */ +@added(Versions.v2023_11_15_preview) +model CustomConversationSummarizationTaskParameters is CustomTaskParameters { + ...ConversationSummarizationTaskParametersBase; +} + +/** Supported parameters for a conversational summarization task. */ +@added(Versions.v2023_04_01) +union SummaryAspect { + string, + + /** Summary of issues in transcripts of web chats and service calls between customer-service agents and customers. */ + issue: "issue", + + /** Summary of resolutions in transcripts of web chats and service calls between customer-service agents and customers. */ + resolution: "resolution", + + /** Chapter title of any conversation. It's usually one phrase or several phrases naturally combined. Long conversations tend to have more chapters. You can find the chapter boundary from the summary context. */ + chapterTitle: "chapterTitle", + + /** Generic narrative summary of any conversation. It generally converts the conversational language into formal written language, compresses the text length, and keeps the salient information. */ + narrative: "narrative", + + /** A concise one-paragraph summary to provide a quick overview. */ + @added(Versions.v2023_11_15_preview) + recap: "recap", + + /** Action items and tasks that arose during a meeting. */ + @added(Versions.v2023_11_15_preview) + followUpTasks: "follow-up tasks", +} + +/** Result for the summarization task on the conversation. */ +@added(Versions.v2023_04_01) +model AnalyzeConversationSummarizationResult + extends AnalyzeConversationJobResult { + /** discriminator kind */ + kind: AnalyzeConversationResultsKind.ConversationalSummarizationResults; + + /** results */ + results: SummaryResult; +} + +/** Result for the custom summarization task on the conversation. */ +@added(Versions.v2023_11_15_preview) +model AnalyzeCustomConversationSummarizationResult + extends AnalyzeConversationJobResult { + /** discriminator kind */ + kind: AnalyzeConversationResultsKind.CustomConversationalSummarizationResults; + + /** Custom Summary Result */ + results: CustomSummaryResult; +} + +/** Summary Results Base */ +@added(Versions.v2023_04_01) +model SummaryResultBase { + /** array of conversations */ + conversations: Array; +} + +/** Summary Results */ +@added(Versions.v2023_04_01) +model SummaryResult { + ...SummaryResultBase; + ...PreBuiltResult; +} + +/** Custom Summary Results */ +@added(Versions.v2023_11_15_preview) +model CustomSummaryResult { + ...SummaryResultBase; + ...CustomResult; +} + +/** Conversations Summary Result */ +@added(Versions.v2023_04_01) +model ConversationsSummaryResult { + ...ConversationResultBase; + + /** array of summaries */ + summaries: Array; +} + +/** Summary Result Item */ +@added(Versions.v2023_04_01) +model SummaryResultItem { + /** aspect */ + aspect: string; + + /** text */ + text: string; + + /** Context list of the summary. */ + contexts?: Array; +} + +/** Context of the summary with a conversation item ID. */ +@added(Versions.v2023_04_01) +model ItemizedSummaryContext is SummaryContext { + /** Reference to the ID of ConversationItem. */ + conversationItemId: string; +} + +/** Input parameters necessary for a Conversation task. */ +model ConversationTaskParameters { + /** The name of the project to use. */ + projectName: string; + + /** The name of the deployment to use. */ + deploymentName: string; + + /** If true, the service will return more detailed information in the response. */ + verbose?: boolean; + + /** If true, the service will keep the query for further review. */ + isLoggingEnabled?: boolean; + + /** Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see https://aka.ms/text-analytics-offsets. */ + stringIndexType?: StringIndexType = StringIndexType.TextElements_v8; + + /** The name of a target project to forward the request to. */ + directTarget?: string; + + /** A dictionary representing the parameters for each target project. */ + targetProjectParameters?: Record; +} + +/** The results of a Conversation task. */ +model ConversationalTaskResult extends AnalyzeConversationTaskResult { + /** The results of a Conversation task. */ + kind: AnalyzeConversationTaskResultsKind.ConversationResult; + + /** Represents a conversation analysis response. */ + result: AnalyzeConversationResult; +} + +/** Represents a conversation analysis response. */ +model AnalyzeConversationResult { + /** The conversation utterance given by the caller. */ + query: string; + + /** The system detected language for the query in BCP 47 language representation.. */ + detectedLanguage?: string; + + /** The prediction result of a conversation project. */ + prediction: BasePrediction; +} + +/** This is the base class of prediction */ +@discriminator("projectKind") +model BasePrediction { + /** The type of the project. */ + projectKind: projectKind; + + /** The intent with the highest score. */ + topIntent?: string; +} + +/** This represents the prediction result of an Orchestration project. */ +model OrchestrationPrediction extends BasePrediction { + /** This represents the prediction result of an Orchestration project. */ + projectKind: projectKind.Orchestration; + + /** A dictionary that contains all intents. A key is an intent name and a value is its confidence score and target type. The top intent's value also contains the actual response from the target project. */ + intents: Record; +} + +/** The area unit of measurement. */ +union AreaUnit { + string, + + /** Unspecified area unit */ + Unspecified: "Unspecified", + + /** Square kilometer area unit */ + SquareKilometer: "SquareKilometer", + + /** Square hectometer area unit */ + SquareHectometer: "SquareHectometer", + + /** Square decameter area unit */ + SquareDecameter: "SquareDecameter", + + /** Square decimeter area unit */ + SquareDecimeter: "SquareDecimeter", + + /** Square meter area unit */ + SquareMeter: "SquareMeter", + + /** Square centimeter area unit */ + SquareCentimeter: "SquareCentimeter", + + /** Square millimeter area unit */ + SquareMillimeter: "SquareMillimeter", + + /** Square inch area unit */ + SquareInch: "SquareInch", + + /** Square foot area unit */ + SquareFoot: "SquareFoot", + + /** Square mile area unit */ + SquareMile: "SquareMile", + + /** Square yard area unit */ + SquareYard: "SquareYard", + + /** Acre area unit */ + Acre: "Acre", +} + +/** The Datetime SubKind. */ +union DateTimeSubKind { + string, + + /** Time subkind */ + Time: "Time", + + /** Date subkind */ + Date: "Date", + + /** DateTime subkind */ + DateTime: "DateTime", + + /** Duration subkind */ + Duration: "Duration", + + /** Set subkind */ + Set: "Set", +} + +/** The length unit of measurement. */ +union LengthUnit { + string, + + /** Unspecified length unit */ + Unspecified: "Unspecified", + + /** Kilometer length unit */ + Kilometer: "Kilometer", + + /** Hectometer length unit */ + Hectometer: "Hectometer", + + /** Decameter length unit */ + Decameter: "Decameter", + + /** Meter length unit */ + Meter: "Meter", + + /** Decimeter length unit */ + Decimeter: "Decimeter", + + /** Centimeter length unit */ + Centimeter: "Centimeter", + + /** Millimeter length unit */ + Millimeter: "Millimeter", + + /** Micrometer length unit */ + Micrometer: "Micrometer", + + /** Nanometer length unit */ + Nanometer: "Nanometer", + + /** Picometer length unit */ + Picometer: "Picometer", + + /** Mile length unit */ + Mile: "Mile", + + /** Yard length unit */ + Yard: "Yard", + + /** Inch length unit */ + Inch: "Inch", + + /** Foot length unit */ + Foot: "Foot", + + /** Light year length unit */ + LightYear: "LightYear", + + /** Point length unit */ + Pt: "Pt", +} + +/** The information (data) Unit of measurement. */ +union InformationUnit { + string, + + /** Unspecified information unit */ + Unspecified: "Unspecified", + + /** Bit information unit */ + Bit: "Bit", + + /** Kilobit information unit */ + Kilobit: "Kilobit", + + /** Megabit information unit */ + Megabit: "Megabit", + + /** Gigabit information unit */ + Gigabit: "Gigabit", + + /** Terabit information unit */ + Terabit: "Terabit", + + /** Petabit information unit */ + Petabit: "Petabit", + + /** Byte information unit */ + Byte: "Byte", + + /** Kilobyte information unit */ + Kilobyte: "Kilobyte", + + /** Megabyte information unit */ + Megabyte: "Megabyte", + + /** Gigabyte information unit */ + Gigabyte: "Gigabyte", + + /** Terabyte information unit */ + Terabyte: "Terabyte", + + /** Petabyte information unit */ + Petabyte: "Petabyte", +} + +/** Enumeration of supported conversational modalities. */ +union InputModality { + string, + + /** Transcript input modality */ + transcript: "transcript", + + /** Text input modality */ + text: "text", +} + +/** The type of the extracted number entity. */ +union NumberKind { + string, + + /** Integer number */ + Integer: "Integer", + + /** Decimal number */ + Decimal: "Decimal", + + /** Power number */ + Power: "Power", + + /** Fraction number */ + Fraction: "Fraction", + + /** Percent number */ + Percent: "Percent", + + /** Unspecified number kind */ + Unspecified: "Unspecified", +} + +/** The type of the project. */ +union projectKind { + string, + + /** Conversation type */ + Conversation: "Conversation", + + /** Orchestration type */ + Orchestration: "Orchestration", +} + +/** The kind of range that the resolution object represents. */ +union RangeKind { + string, + + /** Number range */ + Number: "Number", + + /** Speed range */ + Speed: "Speed", + + /** Weight range */ + Weight: "Weight", + + /** Length range */ + Length: "Length", + + /** Volume range */ + Volume: "Volume", + + /** Area range */ + Area: "Area", + + /** Age range */ + Age: "Age", + + /** Information range */ + Information: "Information", + + /** Temperature range */ + Temperature: "Temperature", + + /** Currency range */ + Currency: "Currency", +} + +/** The reference point that the ordinal number denotes. */ +union RelativeTo { + string, + + /** Current state */ + Current: "Current", + + /** End state */ + End: "End", + + /** Start state */ + Start: "Start", +} + +/** The entity resolution object kind. */ +union ResolutionKind { + string, + + /** Resolution of a boolean entity */ + BooleanResolution: "BooleanResolution", + + /** Resolution of a date/time entity */ + DateTimeResolution: "DateTimeResolution", + + /** Resolution of a number entity */ + NumberResolution: "NumberResolution", + + /** Resolution of an ordinal entity */ + OrdinalResolution: "OrdinalResolution", + + /** Resolution of a speed entity */ + SpeedResolution: "SpeedResolution", + + /** Resolution of a weight entity */ + WeightResolution: "WeightResolution", + + /** Resolution of a length entity */ + LengthResolution: "LengthResolution", + + /** Resolution of a volume entity */ + VolumeResolution: "VolumeResolution", + + /** Resolution of an area entity */ + AreaResolution: "AreaResolution", + + /** Resolution of an age entity */ + AgeResolution: "AgeResolution", + + /** Resolution of an information entity */ + InformationResolution: "InformationResolution", + + /** Resolution of a temperature entity */ + TemperatureResolution: "TemperatureResolution", + + /** Resolution of a currency entity */ + CurrencyResolution: "CurrencyResolution", + + /** Resolution of a numeric range entity */ + NumericRangeResolution: "NumericRangeResolution", + + /** Resolution of a temporal span entity */ + TemporalSpanResolution: "TemporalSpanResolution", +} + +/** The speed Unit of measurement */ +union SpeedUnit { + string, + + /** Unspecified speed unit */ + Unspecified: "Unspecified", + + /** Meters per second speed unit */ + MetersPerSecond: "MetersPerSecond", + + /** Kilometers per hour speed unit */ + KilometersPerHour: "KilometersPerHour", + + /** Kilometers per minute speed unit */ + KilometersPerMinute: "KilometersPerMinute", + + /** Kilometers per second speed unit */ + KilometersPerSecond: "KilometersPerSecond", + + /** Miles per hour speed unit */ + MilesPerHour: "MilesPerHour", + + /** Knot speed unit */ + Knot: "Knot", + + /** Foot per second speed unit */ + FootPerSecond: "FootPerSecond", + + /** Foot per minute speed unit */ + FootPerMinute: "FootPerMinute", + + /** Yards per minute speed unit */ + YardsPerMinute: "YardsPerMinute", + + /** Yards per second speed unit */ + YardsPerSecond: "YardsPerSecond", + + /** Meters per millisecond speed unit */ + MetersPerMillisecond: "MetersPerMillisecond", + + /** Centimeters per millisecond speed unit */ + CentimetersPerMillisecond: "CentimetersPerMillisecond", + + /** Kilometers per millisecond speed unit */ + KilometersPerMillisecond: "KilometersPerMillisecond", +} + +/** The type of a target service. */ +union targetProjectKind { + string, + + /** Luis target service type */ + Luis: "Luis", + + /** Conversation target service type */ + Conversation: "Conversation", + + /** QuestionAnswering target service type */ + QuestionAnswering: "QuestionAnswering", + + /** NonLinked target service type */ + NonLinked: "NonLinked", +} + +/** The temperature Unit of measurement. */ +union TemperatureUnit { + string, + + /** Unspecified temperature unit */ + Unspecified: "Unspecified", + + /** Fahrenheit temperature unit */ + Fahrenheit: "Fahrenheit", + + /** Kelvin temperature unit */ + Kelvin: "Kelvin", + + /** Rankine temperature unit */ + Rankine: "Rankine", + + /** Celsius temperature unit */ + Celsius: "Celsius", +} + +/** An optional modifier of a date/time instance. */ +union TemporalModifier { + string, + + /** AfterApprox temporal modifier */ + AfterApprox: "AfterApprox", + + /** Before temporal modifier */ + Before: "Before", + + /** BeforeStart temporal modifier */ + BeforeStart: "BeforeStart", + + /** Approx temporal modifier */ + Approx: "Approx", + + /** ReferenceUndefined temporal modifier */ + ReferenceUndefined: "ReferenceUndefined", + + /** SinceEnd temporal modifier */ + SinceEnd: "SinceEnd", + + /** AfterMid temporal modifier */ + AfterMid: "AfterMid", + + /** Start temporal modifier */ + Start: "Start", + + /** After temporal modifier */ + After: "After", + + /** BeforeEnd temporal modifier */ + BeforeEnd: "BeforeEnd", + + /** Until temporal modifier */ + Until: "Until", + + /** End temporal modifier */ + End: "End", + + /** Less temporal modifier */ + Less: "Less", + + /** Since temporal modifier */ + Since: "Since", + + /** AfterStart temporal modifier */ + AfterStart: "AfterStart", + + /** BeforeApprox temporal modifier */ + BeforeApprox: "BeforeApprox", + + /** Mid temporal modifier */ + Mid: "Mid", + + /** More temporal modifier */ + More: "More", +} + +/** The Age Unit of measurement */ +union AgeUnit { + string, + + /** Unspecified age unit */ + Unspecified: "Unspecified", + + /** Year age unit */ + Year: "Year", + + /** Month age unit */ + Month: "Month", + + /** Week age unit */ + Week: "Week", + + /** Day age unit */ + Day: "Day", +} + +/** The Volume Unit of measurement */ +union VolumeUnit { + string, + + /** Unspecified volume unit. */ + Unspecified: "Unspecified", + + /** Volume unit in cubic meters. */ + CubicMeter: "CubicMeter", + + /** Volume unit in cubic centimeters. */ + CubicCentimeter: "CubicCentimeter", + + /** Volume unit in cubic millimeters. */ + CubicMillimeter: "CubicMillimeter", + + /** Volume unit in hectoliters. */ + Hectoliter: "Hectoliter", + + /** Volume unit in decaliters. */ + Decaliter: "Decaliter", + + /** Volume unit in liters. */ + Liter: "Liter", + + /** Volume unit in centiliters. */ + Centiliter: "Centiliter", + + /** Volume unit in milliliters. */ + Milliliter: "Milliliter", + + /** Volume unit in cubic yards. */ + CubicYard: "CubicYard", + + /** Volume unit in cubic inches. */ + CubicInch: "CubicInch", + + /** Volume unit in cubic feet. */ + CubicFoot: "CubicFoot", + + /** Volume unit in cubic miles. */ + CubicMile: "CubicMile", + + /** Volume unit in fluid ounces. */ + FluidOunce: "FluidOunce", + + /** Volume unit in teaspoons. */ + Teaspoon: "Teaspoon", + + /** Volume unit in tablespoons. */ + Tablespoon: "Tablespoon", + + /** Volume unit in pints. */ + Pint: "Pint", + + /** Volume unit in quarts. */ + Quart: "Quart", + + /** Volume unit in cups. */ + Cup: "Cup", + + /** Volume unit in gills. */ + Gill: "Gill", + + /** Volume unit in pinches. */ + Pinch: "Pinch", + + /** Volume unit in fluid drams. */ + FluidDram: "FluidDram", + + /** Volume unit in barrels. */ + Barrel: "Barrel", + + /** Volume unit in minims. */ + Minim: "Minim", + + /** Volume unit in cords. */ + Cord: "Cord", + + /** Volume unit in pecks. */ + Peck: "Peck", + + /** Volume unit in bushels. */ + Bushel: "Bushel", + + /** Volume unit in hogsheads. */ + Hogshead: "Hogshead", +} + +/** The weight Unit of measurement. */ +union WeightUnit { + string, + + /** Unspecified weight unit */ + Unspecified: "Unspecified", + + /** Weight unit in kilograms */ + Kilogram: "Kilogram", + + /** Weight unit in grams */ + Gram: "Gram", + + /** Weight unit in milligrams */ + Milligram: "Milligram", + + /** Volume unit in gallons */ + Gallon: "Gallon", + + /** Weight unit in metric tons */ + MetricTon: "MetricTon", + + /** Weight unit in tons */ + Ton: "Ton", + + /** Weight unit in pounds */ + Pound: "Pound", + + /** Weight unit in ounces */ + Ounce: "Ounce", + + /** Weight unit in grains */ + Grain: "Grain", + + /** Weight unit in pennyweights */ + PennyWeight: "PennyWeight", + + /** Weight unit in long tons (British) */ + LongTonBritish: "LongTonBritish", + + /** Weight unit in short tons (US) */ + ShortTonUS: "ShortTonUS", + + /** Weight unit in short hundredweights (US) */ + ShortHundredWeightUS: "ShortHundredWeightUS", + + /** Weight unit in stones */ + Stone: "Stone", + + /** Weight unit in drams */ + Dram: "Dram", +} + +alias ServiceTraits = NoRepeatableRequests & + NoConditionalRequests & + NoClientRequestId; + +alias languageOperations = ResourceOperations; + +/** Analyzes the input conversation utterance. */ +@post +@route("/:analyze-conversations") +op analyzeConversations is RpcOperation< + AnalyzeConversationTask, + AnalyzeConversationTaskResult, + {}, + ErrorResponse +>; + +/** Get the status of an analysis job. A job can consist of one or more tasks. After all tasks succeed, the job transitions to the succeeded state and results are available for each task. */ +@added(Versions.v2023_04_01) +@summary("Get analysis status and results") +op analyzeConversationsJobStatus is languageOperations.ResourceRead< + AnalyzeConversationJobState, + ShowStatsQueryParameter +>; + +/** Analyzes the input conversation utterance. */ +#suppress "@azure-tools/typespec-azure-core/use-standard-operations" +@added(Versions.v2023_04_01) +@route("/analyze-conversations/jobs") +@pollingOperation(analyzeConversationsJobStatus) +op analyzeConversationsSubmitJob is Foundations.LongRunningOperation< + AnalyzeConversationJobsInput, + AcceptedResponse, + {}, + ErrorResponse +>; + +/** Cancel a long-running job for text analysis of conversations. */ +#suppress "@azure-tools/typespec-azure-core/use-standard-operations" +@added(Versions.v2023_04_01) +@summary("Cancel a long-running Text Analysis conversations job.") +@pollingOperation(analyzeConversationsJobStatus) +@route("/analyze-conversations/jobs/{jobId}:cancel") +@post +op analyzeConversationsCancelJob is Foundations.LongRunningOperation< + { + /** The job ID to cancel. */ + @path + jobId: uuid; + }, + AcceptedResponse, + {}, + ErrorResponse +>; diff --git a/specification/cognitiveservices/Language.Conversations/tspconfig.yaml b/specification/cognitiveservices/Language.Conversations/tspconfig.yaml new file mode 100644 index 000000000000..e60cd01d98e1 --- /dev/null +++ b/specification/cognitiveservices/Language.Conversations/tspconfig.yaml @@ -0,0 +1,21 @@ +parameters: + "service-dir": + default: "sdk/cognitivelanguage" +emit: + - "@azure-tools/typespec-autorest" +linter: + extends: + - "@azure-tools/typespec-azure-core/all" +options: + "@azure-tools/typespec-autorest": + omit-unreachable-types: true + azure-resource-provider-folder: "data-plane" + emitter-output-dir: "{project-root}/.." + examples-directory: "{project-root}/examples" + output-file: "{azure-resource-provider-folder}/Language/{version-status}/{version}/analyzeconversations.json" + "@azure-tools/typespec-csharp": + package-dir: "Azure.AI.Language.Conversations" + clear-output-folder: true + model-namespace: false + namespace: "Azure.AI.Language.Conversations" + flavor: azure diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/analyzeconversations.json b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/analyzeconversations.json index daf3e928d305..8597a294e708 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/analyzeconversations.json +++ b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/analyzeconversations.json @@ -2,165 +2,162 @@ "swagger": "2.0", "info": { "title": "Microsoft Cognitive Language Service - Analyze Conversations", - "description": "The language service conversations API is a suite of natural language processing (NLP) skills that can be used to analyze structured conversations (textual or spoken). The synchronous API in this suite accepts a request and mediates among multiple language projects, such as LUIS Generally Available, Question Answering, Conversational Language Understanding, and then calls the best candidate service to handle the request. At last, it returns a response with the candidate service's response as a payload.\n\n In some cases, this API needs to forward requests and responses between the caller and an upstream service. The asynchronous APIs in this suite enable tasks like Conversation Summarization and Conversational PII detection.", - "version": "2023-11-15-preview" - }, - "securityDefinitions": { - "AADToken": { - "type": "oauth2", - "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", - "flow": "implicit", - "description": "These are the [Azure Active Directory OAuth2](https://docs.microsoft.com/azure/active-directory/develop/v1-overview) Flows. When paired with [Azure role-based access](https://docs.microsoft.com/azure/role-based-access-control/overview) control it can be used to control access to Azure Maps REST APIs. Azure role-based access controls are used to designate access to one or more Azure Maps resource account or sub-resources. Any user, group, or service principal can be granted access via a built-in role or a custom role composed of one or more permissions to Azure Maps REST APIs.\n\nTo implement scenarios, we recommend viewing [authentication concepts](https://aka.ms/amauth). In summary, this security definition provides a solution for modeling application(s) via objects capable of access control on specific APIs and scopes.\n\n#### Notes\n* This security definition **requires** the use of the `x-ms-client-id` header to indicate which Azure Maps resource the application is requesting access to. This can be acquired from the [Maps management API](https://aka.ms/amauthdetails).\n* \nThe `Authorization URL` is specific to the Azure public cloud instance. Sovereign clouds have unique Authorization URLs and Azure Active directory configurations. \n* \nThe Azure role-based access control is configured from the [Azure management plane](https://aka.ms/amrbac) via Azure portal, PowerShell, CLI, Azure SDKs, or REST APIs.\n* \nUsage of the [Azure Maps Web SDK](https://aka.ms/amaadmc) allows for configuration based setup of an application for multiple use cases.\n* Currently, Azure Active Directory [v1.0 or v2.0](https://docs.microsoft.com/azure/active-directory/develop/azure-ad-endpoint-comparison) supports Work, School, and Guests but does not support Personal accounts.", - "scopes": { - "https://cognitiveservices.azure.com/.default": "https://cognitiveservices.azure.com/.default" + "version": "2023-11-15-preview", + "description": "The language service conversations API is a suite of natural language processing (NLP) skills that can be used to analyze structured conversations (textual or spoken). The synchronous API in this suite accepts a request and mediates among multiple language projects, such as LUIS Generally Available, Question Answering, Conversational Language Understanding, and then calls the best candidate service to handle the request. At last, it returns a response with the candidate service's response as a payload.\\n\\n In some cases, this API needs to forward requests and responses between the caller and an upstream service. The asynchronous APIs in this suite enable tasks like Conversation Summarization and Conversational PII detection.", + "x-typespec-generated": [ + { + "emitter": "@azure-tools/typespec-autorest" } - }, - "apim_key": { - "type": "apiKey", - "description": "A subscription key for a Language service resource.", - "name": "Ocp-Apim-Subscription-Key", - "in": "header" - } + ] }, - "security": [ - { - "AADToken": [ - "https://cognitiveservices.azure.com/.default" - ] - }, - { - "apim_key": [] - } + "schemes": [ + "https" ], "x-ms-parameterized-host": { "hostTemplate": "{Endpoint}/language", "useSchemePrefix": false, "parameters": [ { - "$ref": "common.json#/parameters/Endpoint" + "name": "Endpoint", + "in": "path", + "description": "Supported Cognitive Services endpoint (e.g., https://.api.cognitiveservices.azure.com).", + "required": true, + "type": "string" } ] }, + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ], + "security": [ + { + "ApiKeyAuth": [] + } + ], + "securityDefinitions": { + "ApiKeyAuth": { + "type": "apiKey", + "name": "Ocp-Apim-Subscription-Key", + "in": "header" + } + }, + "tags": [], "paths": { "/:analyze-conversations": { "post": { - "operationId": "ConversationAnalysis_AnalyzeConversation", + "operationId": "AnalyzeConversations", "description": "Analyzes the input conversation utterance.", "parameters": [ { - "$ref": "common.json#/parameters/ApiVersionParameter" + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { - "description": "A single conversational task to execute.", - "in": "body", "name": "body", + "in": "body", + "required": true, "schema": { "$ref": "#/definitions/AnalyzeConversationTask" - }, - "required": true + } } ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], "responses": { "200": { - "description": "The conversation analysis response.", + "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/AnalyzeConversationTaskResult" } }, "default": { - "description": "Error response.", + "description": "An unexpected error response.", "schema": { - "$ref": "common.json#/definitions/ErrorResponse" + "$ref": "#/definitions/ErrorResponse" }, "headers": { "x-ms-error-code": { - "description": "The error code for specific error that occurred.", - "type": "string" + "type": "string", + "description": "String error code indicating what went wrong." } } } }, "x-ms-examples": { - "Conversation project result": { - "$ref": "./examples/conversations/SuccessfulAnalyzeConversations.json" + "SuccessfulAnalyzeConversations": { + "$ref": "./examples/SuccessfulAnalyzeConversations.json" }, - "Arbitration result": { - "$ref": "./examples/conversations/SuccessfulAnalyzeConversationsArbitration.json" + "SuccessfulAnalyzeConversationsArbitration": { + "$ref": "./examples/SuccessfulAnalyzeConversationsArbitration.json" }, - "Orchestrator direct target result": { - "$ref": "./examples/conversations/SuccessfulAnalyzeConversationsArbitrationDirectTarget.json" + "SuccessfulAnalyzeConversationsArbitrationDirectTarget": { + "$ref": "./examples/SuccessfulAnalyzeConversationsArbitrationDirectTarget.json" } } } }, "/analyze-conversations/jobs": { "post": { - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "description": "Submit a collection of conversations for analysis. Specify one or more unique tasks to be executed.", - "operationId": "AnalyzeConversation_SubmitJob", - "summary": "Submit analysis job for conversations", + "operationId": "AnalyzeConversationsSubmitJob", + "description": "Analyzes the input conversation utterance.", "parameters": [ { - "$ref": "common.json#/parameters/ApiVersionParameter" + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { - "description": "The collection of conversations to analyze and one or more tasks to execute.", - "in": "body", "name": "body", + "in": "body", + "required": true, "schema": { "$ref": "#/definitions/AnalyzeConversationJobsInput" - }, - "required": true + } } ], "responses": { "202": { - "description": "A successful call results with an Operation-Location header used to check the status of the analysis job.", + "description": "The request has been accepted for processing, but processing has not yet completed.", "headers": { "Operation-Location": { - "type": "string" + "type": "string", + "format": "uri", + "description": "The location for monitoring the operation state." } } }, "default": { - "description": "Error response.", + "description": "An unexpected error response.", "schema": { - "$ref": "common.json#/definitions/ErrorResponse" + "$ref": "#/definitions/ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } } } }, "x-ms-examples": { - "Successful Conversational PII Analysis Job Request": { - "$ref": "./examples/conversations/SuccessfulConversationPIISubmit.json" + "SuccessfulConversationPIIExclusionSubmit": { + "$ref": "./examples/SuccessfulConversationPIIExclusionSubmit.json" }, - "Successful Conversational PII Analysis Exclusion Job Request": { - "$ref": "./examples/conversations/SuccessfulConversationPIIExclusionSubmit.json" + "SuccessfulConversationPIIRedactionCharSubmit": { + "$ref": "./examples/SuccessfulConversationPIIRedactionCharSubmit.json" }, - "Successful Conversational PII Analysis Redaction Job Request": { - "$ref": "./examples/conversations/SuccessfulConversationPIIRedactionCharSubmit.json" + "SuccessfulConversationPIISubmit": { + "$ref": "./examples/SuccessfulConversationPIISubmit.json" }, - "Successful Conversation Summarization Analysis Job Request": { - "$ref": "./examples/conversations/SuccessfulConversationSummarySubmit.json" + "SuccessfulConversationSentimentSubmit": { + "$ref": "./examples/SuccessfulConversationSentimentSubmit.json" }, - "Successful Conversation Summarization Task Submit": { - "$ref": "./examples/conversations/SuccessfulConversationSummarizationTaskSubmit.json" + "SuccessfulConversationSummarizationTaskSubmit": { + "$ref": "./examples/SuccessfulConversationSummarizationTaskSubmit.json" }, - "Successful Custom Conversation Summarization Task Submit": { - "$ref": "./examples/conversations/SuccessfulCustomConversationSummarizationTaskSubmit.json" + "SuccessfulConversationSummarySubmit": { + "$ref": "./examples/SuccessfulConversationSummarySubmit.json" }, - "Successful Conversation Sentiment Analysis Job Request": { - "$ref": "./examples/conversations/SuccessfulConversationSentimentSubmit.json" + "SuccessfulCustomConversationSummarizationTaskSubmit": { + "$ref": "./examples/SuccessfulCustomConversationSummarizationTaskSubmit.json" } }, "x-ms-long-running-operation": true @@ -168,97 +165,119 @@ }, "/analyze-conversations/jobs/{jobId}": { "get": { - "produces": [ - "application/json" - ], - "description": "Get the status of an analysis job. A job may consist of one or more tasks. Once all tasks are succeeded, the job will transition to the succeeded state and results will be available for each task.", - "operationId": "AnalyzeConversation_JobStatus", + "operationId": "AnalyzeConversationsJobStatus", "summary": "Get analysis status and results", + "description": "Get the status of an analysis job. A job can consist of one or more tasks. After all tasks succeed, the job transitions to the succeeded state and results are available for each task.", "parameters": [ { - "$ref": "common.json#/parameters/ApiVersionParameter" + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { - "$ref": "common.json#/parameters/JobId" + "name": "jobId", + "in": "path", + "description": "job ID", + "required": true, + "type": "string", + "format": "uuid" }, { - "$ref": "common.json#/parameters/ShowStats" + "name": "showStats", + "in": "query", + "description": "(Optional) if set to true, response will contain request and document level statistics.", + "required": false, + "type": "boolean" } ], "responses": { "200": { - "description": "Analysis job status and metadata.", + "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/AnalyzeConversationJobState" } }, "default": { - "description": "Error encountered.", + "description": "An unexpected error response.", "schema": { - "$ref": "common.json#/definitions/ErrorResponse" + "$ref": "#/definitions/ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } } } }, "x-ms-examples": { - "Successful Get Conversation PII Analysis Job Status Request": { - "$ref": "./examples/conversations/SuccessfulConversationPIITaskStatusRequest.json" + "SuccessfulConversationPIIExclusionTaskStatusRequest": { + "$ref": "./examples/SuccessfulConversationPIIExclusionTaskStatusRequest.json" }, - "Successful Get Text Conversation Analysis Exclusion Job Status Request": { - "$ref": "./examples/conversations/SuccessfulConversationPIIExclusionTaskStatusRequest.json" + "SuccessfulConversationPIIRedactionCharTaskStatusRequest": { + "$ref": "./examples/SuccessfulConversationPIIRedactionCharTaskStatusRequest.json" }, - "Successful Get Text Conversation Analysis Redaction Job Status Request": { - "$ref": "./examples/conversations/SuccessfulConversationPIIRedactionCharTaskStatusRequest.json" + "SuccessfulConversationPIITaskStatusRequest": { + "$ref": "./examples/SuccessfulConversationPIITaskStatusRequest.json" }, - "Successful Get Text Conversation Analysis Job Status Request": { - "$ref": "./examples/conversations/SuccessfulConversationSummarizationTaskStatusRequest.json" + "SuccessfulConversationSentimentTaskStatusRequest": { + "$ref": "./examples/SuccessfulConversationSentimentTaskStatusRequest.json" }, - "Successful Get Conversation Sentiment Analysis Job Status Request": { - "$ref": "./examples/conversations/SuccessfulConversationSentimentTaskStatusRequest.json" + "SuccessfulConversationSummarizationTaskResult": { + "$ref": "./examples/SuccessfulConversationSummarizationTaskResult.json" }, - "Successful Get Conversation Summarization Result": { - "$ref": "./examples/conversations/SuccessfulConversationSummarizationTaskResult.json" + "SuccessfulConversationSummarizationTaskStatusRequest": { + "$ref": "./examples/SuccessfulConversationSummarizationTaskStatusRequest.json" }, - "Successful Get Custom Conversation Summarization Result": { - "$ref": "./examples/conversations/SuccessfulCustomConversationSummarizationTaskResult.json" + "SuccessfulCustomConversationSummarizationTaskResult": { + "$ref": "./examples/SuccessfulCustomConversationSummarizationTaskResult.json" } } } }, "/analyze-conversations/jobs/{jobId}:cancel": { "post": { - "produces": [ - "application/json" - ], - "description": "Cancel a long-running Text Analysis conversations job.", - "operationId": "AnalyzeConversation_CancelJob", - "summary": "Cancel a long-running Text Analysis conversations job", + "operationId": "AnalyzeConversationsCancelJob", + "summary": "Cancel a long-running Text Analysis conversations job.", + "description": "Cancel a long-running job for text analysis of conversations.", "parameters": [ { - "$ref": "common.json#/parameters/ApiVersionParameter" + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { - "$ref": "common.json#/parameters/JobId" + "name": "jobId", + "in": "path", + "description": "The job ID to cancel.", + "required": true, + "type": "string", + "format": "uuid" } ], "responses": { "202": { - "description": "Cancel Job request has been received.", + "description": "The request has been accepted for processing, but processing has not yet completed.", "headers": { "Operation-Location": { - "type": "string" + "type": "string", + "format": "uri", + "description": "The location for monitoring the operation state." } } }, "default": { - "description": "Unexpected error", + "description": "An unexpected error response.", "schema": { - "$ref": "common.json#/definitions/ErrorResponse" + "$ref": "#/definitions/ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } } } }, "x-ms-examples": { - "Successful Job Delete Request": { - "$ref": "./examples/conversations/SuccessfulAnalyzeConversationsJobsCancelRequest.json" + "SuccessfulAnalyzeConversationsJobsCancelRequest": { + "$ref": "./examples/SuccessfulAnalyzeConversationsJobsCancelRequest.json" } }, "x-ms-long-running-operation": true @@ -266,2417 +285,4914 @@ } }, "definitions": { - "AnalyzeConversationTaskKind": { - "type": "string", - "description": "Enumeration of supported Conversation tasks.", - "enum": [ - "Conversation" + "AgeResolution": { + "type": "object", + "description": "Represents the Age entity resolution model.", + "properties": { + "value": { + "type": "number", + "format": "double", + "description": "The numeric value that the extracted text denotes." + }, + "unit": { + "$ref": "#/definitions/AgeUnit", + "description": "The Age Unit of measurement" + } + }, + "required": [ + "value", + "unit" ], - "x-ms-enum": { - "name": "AnalyzeConversationTaskKind", - "modelAsString": true - } + "allOf": [ + { + "$ref": "#/definitions/BaseResolution" + } + ], + "x-ms-discriminator-value": "AgeResolution" }, - "AnalyzeConversationTaskResultsKind": { + "AgeUnit": { "type": "string", - "description": "Enumeration of supported conversational task results", + "description": "The Age Unit of measurement", "enum": [ - "ConversationResult" + "Unspecified", + "Year", + "Month", + "Week", + "Day" ], "x-ms-enum": { - "name": "AnalyzeConversationTaskResultsKind", - "modelAsString": true + "name": "AgeUnit", + "modelAsString": true, + "values": [ + { + "name": "Unspecified", + "value": "Unspecified", + "description": "Unspecified age unit" + }, + { + "name": "Year", + "value": "Year", + "description": "Year age unit" + }, + { + "name": "Month", + "value": "Month", + "description": "Month age unit" + }, + { + "name": "Week", + "value": "Week", + "description": "Week age unit" + }, + { + "name": "Day", + "value": "Day", + "description": "Day age unit" + } + ] } }, - "AnalyzeConversationTask": { + "AnalysisParameters": { "type": "object", - "description": "The base class of a conversation input task.", - "discriminator": "kind", - "required": [ - "kind" - ], + "description": "This is the parameter set of either the Orchestration project itself or one of the target services.", "properties": { - "kind": { - "$ref": "#/definitions/AnalyzeConversationTaskKind" + "targetProjectKind": { + "$ref": "#/definitions/targetProjectKind", + "description": "The type of a target service" + }, + "apiVersion": { + "type": "string", + "description": "The API version to use when call a specific target service." } - } + }, + "discriminator": "targetProjectKind", + "required": [ + "targetProjectKind" + ] }, - "AnalyzeConversationTaskResult": { + "AnalyzeConversationConversationPiiResult": { "type": "object", - "description": "The base class of a conversation task result.", - "discriminator": "kind", - "required": [ - "kind" - ], + "description": "Result from the personally identifiable information detection and redaction operation performed on a list of conversations.", "properties": { - "kind": { - "$ref": "#/definitions/AnalyzeConversationTaskResultsKind" + "results": { + "$ref": "#/definitions/ConversationPiiResults", + "description": "results" } - } - }, - "ConversationalTask": { - "type": "object", - "description": "The input for a custom conversation task.", + }, + "required": [ + "results" + ], "allOf": [ { - "$ref": "#/definitions/AnalyzeConversationTask" + "$ref": "#/definitions/AnalyzeConversationJobResult" } ], + "x-ms-discriminator-value": "ConversationalPIIResults" + }, + "AnalyzeConversationJobResult": { + "type": "object", + "description": "Container for results of all tasks in the conversation job.", "properties": { - "analysisInput": { - "$ref": "#/definitions/ConversationAnalysisOptions" + "lastUpdateDateTime": { + "type": "string", + "format": "date-time", + "description": "The last updated time in UTC for the task." }, - "parameters": { - "$ref": "#/definitions/ConversationTaskParameters" + "status": { + "$ref": "#/definitions/State", + "description": "The status of the task at the mentioned last update time." + }, + "taskName": { + "type": "string", + "description": "task name" + }, + "kind": { + "$ref": "#/definitions/AnalyzeConversationResultsKind", + "description": "discriminator kind" } }, - "x-ms-discriminator-value": "Conversation", + "discriminator": "kind", "required": [ - "analysisInput", - "parameters" + "lastUpdateDateTime", + "status", + "kind" ] }, - "ConversationTaskParameters": { + "AnalyzeConversationJobState": { "type": "object", - "description": "Input parameters necessary for a Conversation task.", + "description": "Contains the status of the submitted job for analyzing a conversation, along with related statistics.", "properties": { - "projectName": { + "displayName": { "type": "string", - "description": "The name of the project to use." + "description": "display name" }, - "deploymentName": { + "createdDateTime": { "type": "string", - "description": "The name of the deployment to use." + "format": "date-time", + "description": "Date and time job created" }, - "verbose": { - "type": "boolean", - "description": "If true, the service will return more detailed information in the response." + "expirationDateTime": { + "type": "string", + "format": "date-time", + "description": "Date and time job expires" }, - "isLoggingEnabled": { - "type": "boolean", - "description": "If true, the service will keep the query for further review." + "jobId": { + "$ref": "#/definitions/Azure.Core.uuid", + "description": "job ID", + "readOnly": true }, - "stringIndexType": { - "$ref": "common.json#/definitions/StringIndexType" + "lastUpdatedDateTime": { + "type": "string", + "format": "date-time", + "description": "last updated date and time" }, - "directTarget": { + "status": { + "$ref": "#/definitions/State", + "description": "status" + }, + "errors": { + "type": "array", + "description": "errors", + "items": { + "$ref": "#/definitions/Error" + }, + "x-ms-identifiers": [] + }, + "nextLink": { "type": "string", - "description": "The name of a target project to forward the request to." + "description": "next link" }, - "targetProjectParameters": { - "type": "object", - "description": "A dictionary representing the parameters for each target project.", - "additionalProperties": { - "$ref": "#/definitions/AnalysisParameters" - } + "tasks": { + "$ref": "#/definitions/Tasks", + "description": "Contains the state for the tasks that are being executed as part of the submitted job for analyzing a conversation." + }, + "statistics": { + "$ref": "#/definitions/ConversationRequestStatistics", + "description": "Contains the statistics for the submitted job." } }, "required": [ - "projectName", - "deploymentName" + "createdDateTime", + "jobId", + "lastUpdatedDateTime", + "status", + "tasks" ] }, - "ConversationalTaskResult": { - "description": "The results of a Conversation task.", - "allOf": [ - { - "$ref": "#/definitions/AnalyzeConversationTaskResult" - } - ], - "type": "object", - "properties": { - "result": { - "$ref": "#/definitions/AnalyzeConversationResult" - } - }, - "required": [ - "result" - ], - "x-ms-discriminator-value": "ConversationResult" - }, - "ConversationItemBase": { + "AnalyzeConversationJobsInput": { "type": "object", - "description": "The abstract base for a user input formatted conversation (e.g., Text, Transcript).", + "description": "It is a wrap up a Question Answering KB response.", "properties": { - "id": { - "description": "The ID of a conversation item.", - "type": "string" - }, - "participantId": { - "description": "The participant ID of a conversation item.", - "type": "string" - }, - "language": { - "description": "The override language of a conversation item in BCP 47 language representation.", - "type": "string" + "displayName": { + "type": "string", + "description": "Display name for the analysis job." }, - "modality": { - "$ref": "#/definitions/Modality" + "analysisInput": { + "$ref": "#/definitions/MultiLanguageConversationAnalysisInput", + "description": "Analysis Input", + "x-ms-mutability": [ + "read", + "create" + ] }, - "role": { - "type": "string", - "description": "The role of the participant.", - "enum": [ - "agent", - "customer", - "generic" - ], - "x-ms-enum": { - "name": "role", - "modelAsString": true - } + "tasks": { + "type": "array", + "description": "Set of tasks to execute on the input conversation.", + "items": { + "$ref": "#/definitions/AnalyzeConversationLROTask" + }, + "x-ms-identifiers": [] } }, "required": [ - "participantId", - "id" - ], - "additionalProperties": true + "analysisInput", + "tasks" + ] }, - "TextConversationItem": { + "AnalyzeConversationLROTask": { "type": "object", - "description": "The text modality of an input conversation.", - "allOf": [ - { - "$ref": "#/definitions/ConversationItemBase" - } - ], + "description": "Base class for a long-running conversation input task.", "properties": { - "text": { - "description": "The text input", - "type": "string" + "taskName": { + "type": "string", + "description": "task name" + }, + "kind": { + "$ref": "#/definitions/AnalyzeConversationLROTaskKind", + "description": "Enumeration of supported analysis tasks on a collection of conversations." } }, + "discriminator": "kind", "required": [ - "text" + "kind" ] }, - "ConversationAnalysisOptions": { - "type": "object", - "description": "The input ConversationItem and its optional parameters", - "required": [ - "conversationItem" - ], - "properties": { - "conversationItem": { - "$ref": "#/definitions/ConversationItemBase" - } + "AnalyzeConversationLROTaskKind": { + "type": "string", + "description": "Enumeration of supported analysis tasks on a collection of conversations.", + "enum": [ + "ConversationalSummarizationTask", + "ConversationalPIITask", + "CustomConversationalSummarizationTask", + "ConversationalSentimentTask" + ], + "x-ms-enum": { + "name": "AnalyzeConversationLROTaskKind", + "modelAsString": true, + "values": [ + { + "name": "ConversationalSummarizationTask", + "value": "ConversationalSummarizationTask", + "description": "Conversational Summarization Task" + }, + { + "name": "ConversationalPIITask", + "value": "ConversationalPIITask", + "description": "Conversational PII Task" + }, + { + "name": "CustomConversationalSummarizationTask", + "value": "CustomConversationalSummarizationTask", + "description": "Custom Conversational Summarization Task" + }, + { + "name": "ConversationalSentimentTask", + "value": "ConversationalSentimentTask", + "description": "Conversational Sentiment Task" + } + ] } }, - "AnalysisParameters": { + "AnalyzeConversationPiiTask": { "type": "object", - "description": "This is the parameter set of either the Orchestration project itself or one of the target services.", - "required": [ - "targetProjectKind" + "description": "Task definition for a PII redaction in conversations.", + "properties": { + "parameters": { + "$ref": "#/definitions/ConversationPiiTaskParameters", + "description": "parameters" + } + }, + "allOf": [ + { + "$ref": "#/definitions/AnalyzeConversationLROTask" + } ], - "discriminator": "targetProjectKind", + "x-ms-discriminator-value": "ConversationalPIITask" + }, + "AnalyzeConversationResult": { + "type": "object", + "description": "Represents a conversation analysis response.", "properties": { - "targetProjectKind": { + "query": { "type": "string", - "description": "The type of a target service.", - "enum": [ - "Luis", - "Conversation", - "QuestionAnswering", - "NonLinked" - ], - "x-ms-enum": { - "name": "targetProjectKind", - "modelAsString": true - } + "description": "The conversation utterance given by the caller." }, - "apiVersion": { + "detectedLanguage": { "type": "string", - "description": "The API version to use when call a specific target service." + "description": "The system detected language for the query in BCP 47 language representation.." + }, + "prediction": { + "$ref": "#/definitions/BasePrediction", + "description": "The prediction result of a conversation project." } + }, + "required": [ + "query", + "prediction" + ] + }, + "AnalyzeConversationResultsKind": { + "type": "string", + "description": "Enumeration of results for supported conversation analysis Results.", + "enum": [ + "ConversationalSummarizationResults", + "ConversationalPIIResults", + "CustomConversationalSummarizationResults", + "ConversationalSentimentResults" + ], + "x-ms-enum": { + "name": "AnalyzeConversationResultsKind", + "modelAsString": true, + "values": [ + { + "name": "ConversationalSummarizationResults", + "value": "ConversationalSummarizationResults", + "description": "Conversational Summarization Results" + }, + { + "name": "ConversationalPIIResults", + "value": "ConversationalPIIResults", + "description": "Conversational PII Results" + }, + { + "name": "CustomConversationalSummarizationResults", + "value": "CustomConversationalSummarizationResults", + "description": "Custom Conversational Summarization Results" + }, + { + "name": "ConversationalSentimentResults", + "value": "ConversationalSentimentResults", + "description": "Conversational Sentiment Results" + } + ] } }, - "NoneLinkedTargetIntentResult": { + "AnalyzeConversationSentimentResult": { "type": "object", - "description": "A wrap up of non-linked intent response.", - "x-ms-discriminator-value": "NonLinked", + "description": "Result from the sentiment analysis operation performed on a list of conversations.", + "properties": { + "results": { + "$ref": "#/definitions/ConversationSentimentResults", + "description": "The result from sentiment analysis operation for each conversation." + } + }, + "required": [ + "results" + ], "allOf": [ { - "$ref": "#/definitions/TargetIntentResult" + "$ref": "#/definitions/AnalyzeConversationJobResult" } ], + "x-ms-discriminator-value": "ConversationalSentimentResults" + }, + "AnalyzeConversationSummarizationResult": { + "type": "object", + "description": "Result for the summarization task on the conversation.", "properties": { - "result": { - "$ref": "#/definitions/ConversationResult", - "description": "The actual response from a Conversation project." + "results": { + "$ref": "#/definitions/SummaryResult", + "description": "results" } - } + }, + "required": [ + "results" + ], + "allOf": [ + { + "$ref": "#/definitions/AnalyzeConversationJobResult" + } + ], + "x-ms-discriminator-value": "ConversationalSummarizationResults" }, - "LuisParameters": { - "description": "This is a set of request parameters for LUIS Generally Available projects.", - "x-ms-discriminator-value": "Luis", + "AnalyzeConversationSummarizationTask": { "type": "object", + "description": "Task definition for conversational summarization.", + "properties": { + "parameters": { + "$ref": "#/definitions/ConversationSummarizationTaskParameters", + "description": "parameters" + } + }, "allOf": [ { - "$ref": "#/definitions/AnalysisParameters" + "$ref": "#/definitions/AnalyzeConversationLROTask" } ], + "x-ms-discriminator-value": "ConversationalSummarizationTask" + }, + "AnalyzeConversationTask": { + "type": "object", + "description": "The base class of a conversation input task.", "properties": { - "query": { - "type": "string", - "maxLength": 500, - "description": "The utterance to predict." - }, - "callingOptions": { - "type": "object", - "description": "This customizes how the service calls LUIS Generally Available projects.", - "$ref": "#/definitions/LuisCallingOptions" + "kind": { + "$ref": "#/definitions/AnalyzeConversationTaskKind", + "description": "The base class of a conversation input task.", + "x-ms-mutability": [ + "read", + "create" + ] } }, - "additionalProperties": true + "discriminator": "kind", + "required": [ + "kind" + ] }, - "LuisCallingOptions": { - "description": "This customizes how the service calls LUIS Generally Available projects.", + "AnalyzeConversationTaskKind": { + "type": "string", + "description": "Enumeration of supported Conversation tasks.", + "enum": [ + "Conversation" + ], + "x-ms-enum": { + "name": "AnalyzeConversationTaskKind", + "modelAsString": true, + "values": [ + { + "name": "Conversation", + "value": "Conversation", + "description": "Conversation task kind" + } + ] + } + }, + "AnalyzeConversationTaskResult": { "type": "object", + "description": "The base class of a conversation input task result.", "properties": { - "verbose": { - "description": "Enable verbose response.", - "type": "boolean" - }, - "log": { - "description": "Save log to add in training utterances later.", - "type": "boolean" - }, - "show-all-intents": { - "description": "Set true to show all intents.", - "type": "boolean" - }, - "timezoneOffset": { - "type": "number", - "description": "The timezone offset for the location of the request." - }, - "spellCheck": { - "type": "boolean", - "description": "Enable spell checking." - }, - "bing-spell-check-subscription-key": { - "description": "The subscription key to use when enabling Bing spell check", - "type": "string" + "kind": { + "$ref": "#/definitions/AnalyzeConversationTaskResultsKind", + "description": "The base class of a conversation input task result." } + }, + "discriminator": "kind", + "required": [ + "kind" + ] + }, + "AnalyzeConversationTaskResultsKind": { + "type": "string", + "description": "Enumeration of supported conversational task results.", + "enum": [ + "ConversationResult" + ], + "x-ms-enum": { + "name": "AnalyzeConversationTaskResultsKind", + "modelAsString": true, + "values": [ + { + "name": "ConversationResult", + "value": "ConversationResult", + "description": "Conversation result task kind" + } + ] } }, - "ConversationParameters": { + "AnalyzeConversationalSentimentTask": { "type": "object", - "description": "This is a set of request parameters for Customized Conversation projects.", - "x-ms-discriminator-value": "Conversation", + "description": "Task definition for conversational sentiment.", + "properties": { + "parameters": { + "$ref": "#/definitions/ConversationalSentimentTaskParameters", + "description": "Supported parameters for a conversational sentiment task." + } + }, "allOf": [ { - "$ref": "#/definitions/AnalysisParameters" + "$ref": "#/definitions/AnalyzeConversationLROTask" } ], - "properties": { - "callingOptions": { - "type": "object", - "$ref": "#/definitions/ConversationCallingOptions" - } - } + "x-ms-discriminator-value": "ConversationalSentimentTask" }, - "ConversationCallingOptions": { + "AnalyzeCustomConversationSummarizationResult": { "type": "object", - "description": "The option to set to call a Conversation project.", + "description": "Result for the custom summarization task on the conversation.", "properties": { - "language": { - "description": "The language of the query in BCP 47 language representation..", - "type": "string" - }, - "verbose": { - "description": "If true, the service will return more detailed information.", - "type": "boolean" - }, - "isLoggingEnabled": { - "description": "If true, the query will be saved for customers to further review in authoring, to improve the model quality.", - "type": "boolean" + "results": { + "$ref": "#/definitions/CustomSummaryResult", + "description": "Custom Summary Result" } - } - }, - "QuestionAnsweringParameters": { - "type": "object", - "description": "This is a set of request parameters for Question Answering knowledge bases.", - "x-ms-discriminator-value": "QuestionAnswering", + }, + "required": [ + "results" + ], "allOf": [ { - "$ref": "#/definitions/AnalysisParameters" + "$ref": "#/definitions/AnalyzeConversationJobResult" } ], + "x-ms-discriminator-value": "CustomConversationalSummarizationResults" + }, + "AnalyzeCustomConversationSummarizationTask": { + "type": "object", + "description": "Task definition for custom conversational summarization.", "properties": { - "callingOptions": { - "description": "The options sent to a Question Answering KB.", - "$ref": "common.json#/definitions/AnswersOptions" + "parameters": { + "$ref": "#/definitions/CustomConversationSummarizationTaskParameters", + "description": "parameters" } - } + }, + "allOf": [ + { + "$ref": "#/definitions/AnalyzeConversationLROTask" + } + ], + "x-ms-discriminator-value": "CustomConversationalSummarizationTask" }, - "AnalyzeConversationResult": { + "AnswerSpan": { "type": "object", - "description": "Represents a conversation analysis response.", - "required": [ - "query", - "prediction" - ], + "description": "Answer span object of QnA.", "properties": { - "query": { + "text": { "type": "string", - "description": "The conversation utterance given by the caller." + "description": "Predicted text of answer span." }, - "detectedLanguage": { - "type": "string", - "description": "The system detected language for the query in BCP 47 language representation.." + "confidenceScore": { + "type": "number", + "format": "double", + "description": "Predicted score of answer span, value ranges from 0 to 1.", + "minimum": 0, + "maximum": 1 }, - "prediction": { - "description": "The prediction result of a conversation project.", - "$ref": "#/definitions/BasePrediction" - } - } - }, - "BasePrediction": { - "type": "object", - "description": "This is the base class of prediction", - "required": [ - "projectKind" - ], - "discriminator": "projectKind", - "properties": { - "projectKind": { - "type": "string", - "description": "The type of the project.", - "enum": [ - "Conversation", - "Orchestration" - ], - "x-ms-enum": { - "name": "projectKind", - "modelAsString": true - } + "offset": { + "type": "integer", + "format": "int32", + "description": "The answer span offset from the start of answer." }, - "topIntent": { - "type": "string", - "description": "The intent with the highest score." - } - } - }, - "OrchestrationPrediction": { - "type": "object", - "description": "This represents the prediction result of an Orchestration project.", - "x-ms-discriminator-value": "Orchestration", - "required": [ - "intents" - ], - "allOf": [ - { - "$ref": "#/definitions/BasePrediction" - } - ], - "properties": { - "intents": { - "description": "A dictionary that contains all intents. A key is an intent name and a value is its confidence score and target type. The top intent's value also contains the actual response from the target project.", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/TargetIntentResult" - } + "length": { + "type": "integer", + "format": "int32", + "description": "The length of the answer span." } } }, - "TargetIntentResult": { + "AnswersOptions": { "type": "object", - "description": "This is the base class of an intent prediction", - "discriminator": "targetProjectKind", - "required": [ - "confidenceScore", - "targetProjectKind" - ], + "description": "Parameters to query a knowledge base.", "properties": { - "targetProjectKind": { + "qnaId": { + "type": "integer", + "format": "int32", + "description": "Exact QnA ID to fetch from the knowledge base, this field takes priority over question." + }, + "question": { "type": "string", - "description": "This discriminator property specifies the type of the target project that returns the response.", - "enum": [ - "Luis", - "Conversation", - "QuestionAnswering", - "NonLinked" - ], - "x-ms-enum": { - "name": "targetProjectKind", - "modelAsString": true - } + "description": "User question to query against the knowledge base." }, - "apiVersion": { + "top": { + "type": "integer", + "format": "int32", + "description": "Max number of answers to be returned for the question." + }, + "userId": { "type": "string", - "description": "The API version used to call a target service." + "description": "Unique identifier for the user." }, - "confidenceScore": { + "confidenceScoreThreshold": { "type": "number", "format": "double", - "x-ms-client-name": "confidence", - "description": "The prediction score and it ranges from 0.0 to 1.0.", + "description": "Minimum threshold score for answers, value ranges from 0 to 1.", "minimum": 0, "maximum": 1 + }, + "context": { + "$ref": "#/definitions/KnowledgeBaseAnswerContext", + "description": "Context object with previous QnA's information." + }, + "rankerType": { + "$ref": "#/definitions/RankerKind", + "description": "Type of ranker to be used." + }, + "filters": { + "$ref": "#/definitions/QueryFilters", + "description": "Filter QnAs based on given metadata list and knowledge base sources." + }, + "answerSpanRequest": { + "$ref": "#/definitions/ShortAnswerOptions", + "description": "To configure Answer span prediction feature." + }, + "includeUnstructuredSources": { + "type": "boolean", + "description": "(Optional) Flag to enable Query over Unstructured Sources." } } }, - "ConversationTargetIntentResult": { + "AnswersResult": { "type": "object", - "description": "A wrap up of Conversation project response.", - "x-ms-discriminator-value": "Conversation", - "allOf": [ - { - "$ref": "#/definitions/TargetIntentResult" - } - ], + "description": "Represents List of Question Answers.", "properties": { - "result": { - "type": "object", - "$ref": "#/definitions/ConversationResult", - "description": "The actual response from a Conversation project." + "answers": { + "type": "array", + "description": "Represents Answer Result list.", + "items": { + "$ref": "#/definitions/KnowledgeBaseAnswer" + } } } }, - "ConversationResult": { + "AreaResolution": { "type": "object", - "description": "The response returned by a Conversation project.", - "required": [ - "query" - ], + "description": "Represents the area entity resolution model.", "properties": { - "query": { - "description": "The same query given in request.", - "type": "string" - }, - "detectedLanguage": { - "description": "The detected language from the query in BCP 47 language representation..", - "type": "string" + "value": { + "type": "number", + "format": "double", + "description": "The numeric value that the extracted text denotes." }, - "prediction": { - "description": "The predicted result for the query.", - "$ref": "#/definitions/ConversationPrediction" + "unit": { + "$ref": "#/definitions/AreaUnit", + "description": "The area Unit of measurement" } - } - }, - "ConversationPrediction": { - "type": "object", - "description": "Represents the prediction section of a Conversation project.", - "x-ms-discriminator-value": "Conversation", + }, "required": [ - "intents", - "entities" + "value", + "unit" ], "allOf": [ { - "$ref": "#/definitions/BasePrediction" + "$ref": "#/definitions/BaseResolution" } ], - "properties": { - "intents": { - "description": "The intent classification results.", - "type": "array", - "items": { - "$ref": "#/definitions/ConversationIntent" - } - }, - "entities": { - "description": "The entity extraction results.", - "type": "array", - "items": { - "$ref": "#/definitions/ConversationEntity" + "x-ms-discriminator-value": "AreaResolution" + }, + "AreaUnit": { + "type": "string", + "description": "The area unit of measurement.", + "enum": [ + "Unspecified", + "SquareKilometer", + "SquareHectometer", + "SquareDecameter", + "SquareDecimeter", + "SquareMeter", + "SquareCentimeter", + "SquareMillimeter", + "SquareInch", + "SquareFoot", + "SquareMile", + "SquareYard", + "Acre" + ], + "x-ms-enum": { + "name": "AreaUnit", + "modelAsString": true, + "values": [ + { + "name": "Unspecified", + "value": "Unspecified", + "description": "Unspecified area unit" + }, + { + "name": "SquareKilometer", + "value": "SquareKilometer", + "description": "Square kilometer area unit" + }, + { + "name": "SquareHectometer", + "value": "SquareHectometer", + "description": "Square hectometer area unit" + }, + { + "name": "SquareDecameter", + "value": "SquareDecameter", + "description": "Square decameter area unit" + }, + { + "name": "SquareDecimeter", + "value": "SquareDecimeter", + "description": "Square decimeter area unit" + }, + { + "name": "SquareMeter", + "value": "SquareMeter", + "description": "Square meter area unit" + }, + { + "name": "SquareCentimeter", + "value": "SquareCentimeter", + "description": "Square centimeter area unit" + }, + { + "name": "SquareMillimeter", + "value": "SquareMillimeter", + "description": "Square millimeter area unit" + }, + { + "name": "SquareInch", + "value": "SquareInch", + "description": "Square inch area unit" + }, + { + "name": "SquareFoot", + "value": "SquareFoot", + "description": "Square foot area unit" + }, + { + "name": "SquareMile", + "value": "SquareMile", + "description": "Square mile area unit" + }, + { + "name": "SquareYard", + "value": "SquareYard", + "description": "Square yard area unit" + }, + { + "name": "Acre", + "value": "Acre", + "description": "Acre area unit" } - } + ] } }, - "ConversationIntent": { + "AudioTiming": { "type": "object", - "description": "The intent classification result of a Conversation project.", - "required": [ - "category", - "confidenceScore" - ], + "description": "Audio timing information.", "properties": { - "category": { - "description": "A predicted class.", - "type": "string" + "offset": { + "type": "integer", + "format": "int64", + "description": "Offset from the start of speech audio, in ticks. 1 tick = 100 nanoseconds." }, - "confidenceScore": { - "format": "float", - "x-ms-client-name": "confidence", - "description": "The confidence score of the class from 0.0 to 1.0.", - "type": "number", - "minimum": 0, - "maximum": 1 + "duration": { + "type": "integer", + "format": "int64", + "description": "Duration of word articulation, in ticks. 1 tick = 100 nanoseconds." } } }, - "ConversationEntity": { + "Azure.Core.uuid": { + "type": "string", + "format": "uuid", + "description": "Universally Unique Identifier" + }, + "BaseExtraInformation": { "type": "object", - "description": "The entity extraction result of a Conversation project.", + "description": "The abstract base object for entity extra information.", + "properties": { + "extraInformationKind": { + "$ref": "#/definitions/ExtraInformationKind", + "description": "The extra information object kind." + } + }, + "discriminator": "extraInformationKind", "required": [ - "category", - "text", - "offset", - "length", - "confidenceScore" - ], + "extraInformationKind" + ] + }, + "BasePrediction": { + "type": "object", + "description": "This is the base class of prediction", "properties": { - "category": { - "description": "The entity category.", - "type": "string" - }, - "text": { - "description": "The predicted entity text.", - "type": "string" - }, - "offset": { - "format": "int32", - "description": "The starting index of this entity in the query.", - "type": "integer" - }, - "length": { - "format": "int32", - "description": "The length of the text.", - "type": "integer" - }, - "confidenceScore": { - "format": "float", - "x-ms-client-name": "confidence", - "description": "The entity confidence score.", - "type": "number" - }, - "resolutions": { - "description": "The collection of entity resolution objects.", - "type": "array", - "items": { - "$ref": "#/definitions/BaseResolution" - } + "projectKind": { + "$ref": "#/definitions/projectKind", + "description": "The type of the project." }, - "extraInformation": { - "description": "The collection of entity extra information objects.", - "type": "array", - "items": { - "$ref": "#/definitions/BaseExtraInformation" - } + "topIntent": { + "type": "string", + "description": "The intent with the highest score." } - } + }, + "discriminator": "projectKind", + "required": [ + "projectKind" + ] }, "BaseResolution": { - "description": "The abstract base class for entity resolutions.", "type": "object", - "discriminator": "resolutionKind", + "description": "The abstract base class for entity resolutions.", "properties": { "resolutionKind": { - "description": "The entity resolution object kind.", - "type": "string", - "enum": [ - "BooleanResolution", - "DateTimeResolution", - "NumberResolution", - "OrdinalResolution", - "SpeedResolution", - "WeightResolution", - "LengthResolution", - "VolumeResolution", - "AreaResolution", - "AgeResolution", - "InformationResolution", - "TemperatureResolution", - "CurrencyResolution", - "NumericRangeResolution", - "TemporalSpanResolution" - ], - "x-ms-enum": { - "name": "ResolutionKind", - "modelAsString": true - } + "$ref": "#/definitions/ResolutionKind", + "description": "The entity resolution object kind." } }, + "discriminator": "resolutionKind", "required": [ "resolutionKind" ] }, - "QuantityResolution": { - "description": "Represents resolutions for quantities.", + "BooleanResolution": { "type": "object", + "description": "A resolution for boolean expressions", "properties": { "value": { - "type": "number", - "format": "double", - "description": "The numeric value that the extracted text denotes." + "type": "boolean", + "description": "A resolution for boolean expressions" } }, "required": [ "value" - ] - }, - "AgeResolution": { - "description": "Represents the Age entity resolution model.", + ], "allOf": [ { "$ref": "#/definitions/BaseResolution" - }, - { - "$ref": "#/definitions/QuantityResolution" } ], + "x-ms-discriminator-value": "BooleanResolution" + }, + "Conversation": { "type": "object", - "x-ms-discriminator-value": "AgeResolution", + "description": "Complete ordered set of utterances (spoken or written) by one or more speakers to be used for analysis.", "properties": { - "unit": { + "id": { "type": "string", - "enum": [ - "Unspecified", - "Year", - "Month", - "Week", - "Day" - ], - "x-ms-enum": { - "name": "AgeUnit", - "modelAsString": true - }, - "description": "The Age Unit of measurement" + "description": "Unique identifier for the conversation." + }, + "language": { + "type": "string", + "description": "Language of the conversation item in BCP-47 format." + }, + "modality": { + "$ref": "#/definitions/InputModality", + "description": "modality" + }, + "domain": { + "$ref": "#/definitions/ConversationDomain", + "description": "domain" } }, + "discriminator": "modality", "required": [ - "unit" + "id", + "language", + "modality" ] }, - "VolumeResolution": { - "description": "Represents the volume entity resolution model.", - "allOf": [ - { - "$ref": "#/definitions/BaseResolution" - }, - { - "$ref": "#/definitions/QuantityResolution" - } - ], + "ConversationAnalysisOptions": { "type": "object", - "x-ms-discriminator-value": "VolumeResolution", + "description": "The input ConversationItem and its optional parameters", "properties": { - "unit": { - "type": "string", - "enum": [ - "Unspecified", - "CubicMeter", - "CubicCentimeter", - "CubicMillimeter", - "Hectoliter", - "Decaliter", - "Liter", - "Centiliter", - "Milliliter", - "CubicYard", - "CubicInch", - "CubicFoot", - "CubicMile", - "FluidOunce", - "Teaspoon", - "Tablespoon", - "Pint", - "Quart", - "Cup", - "Gill", - "Pinch", - "FluidDram", - "Barrel", - "Minim", - "Cord", - "Peck", - "Bushel", - "Hogshead" - ], - "x-ms-enum": { - "name": "VolumeUnit", - "modelAsString": true - }, - "description": "The Volume Unit of measurement" + "conversationItem": { + "$ref": "#/definitions/TextConversationItem", + "description": "The abstract base for a user input formatted conversation (e.g., Text, Transcript)." } }, "required": [ - "unit" + "conversationItem" ] }, - "SpeedResolution": { - "description": "Represents the speed entity resolution model.", - "allOf": [ - { - "$ref": "#/definitions/BaseResolution" + "ConversationCallingOptions": { + "type": "object", + "description": "The option to set to call a Conversation project.", + "properties": { + "language": { + "type": "string", + "description": "The language of the query in BCP 47 language representation." }, - { - "$ref": "#/definitions/QuantityResolution" + "verbose": { + "type": "boolean", + "description": "If true, the service will return more detailed information." + }, + "isLoggingEnabled": { + "type": "boolean", + "description": "If true, the query will be saved for customers to further review in authoring, to improve the model quality." } + } + }, + "ConversationDomain": { + "type": "string", + "description": "Enumeration of supported conversational domains.", + "enum": [ + "finance", + "healthcare", + "generic" ], + "x-ms-enum": { + "name": "ConversationDomain", + "modelAsString": true, + "values": [ + { + "name": "finance", + "value": "finance", + "description": "Enumeration of supported conversational domains." + }, + { + "name": "healthcare", + "value": "healthcare", + "description": "Enumeration of supported conversational domains." + }, + { + "name": "generic", + "value": "generic", + "description": "Enumeration of supported conversational domains." + } + ] + } + }, + "ConversationEntity": { "type": "object", - "x-ms-discriminator-value": "SpeedResolution", + "description": "The entity extraction result of a Conversation project.", "properties": { - "unit": { + "category": { "type": "string", - "enum": [ - "Unspecified", - "MetersPerSecond", - "KilometersPerHour", - "KilometersPerMinute", - "KilometersPerSecond", - "MilesPerHour", - "Knot", - "FootPerSecond", - "FootPerMinute", - "YardsPerMinute", - "YardsPerSecond", - "MetersPerMillisecond", - "CentimetersPerMillisecond", - "KilometersPerMillisecond" - ], - "x-ms-enum": { - "name": "SpeedUnit", - "modelAsString": true + "description": "The entity category." + }, + "text": { + "type": "string", + "description": "The predicted entity text." + }, + "offset": { + "type": "integer", + "format": "int32", + "description": "The starting index of this entity in the query." + }, + "length": { + "type": "integer", + "format": "int32", + "description": "The length of the text." + }, + "confidenceScore": { + "type": "number", + "format": "float", + "description": "The entity confidence score." + }, + "resolutions": { + "type": "array", + "description": "The collection of entity resolution objects.", + "items": { + "$ref": "#/definitions/BaseResolution" }, - "description": "The speed Unit of measurement" + "x-ms-identifiers": [] + }, + "extraInformation": { + "type": "array", + "description": "The collection of entity extra information objects.", + "items": { + "$ref": "#/definitions/BaseExtraInformation" + }, + "x-ms-identifiers": [] } }, "required": [ - "unit" + "category", + "text", + "offset", + "length", + "confidenceScore" ] }, - "AreaResolution": { - "description": "Represents the area entity resolution model.", - "allOf": [ - { - "$ref": "#/definitions/BaseResolution" - }, - { - "$ref": "#/definitions/QuantityResolution" - } - ], + "ConversationIntent": { "type": "object", - "x-ms-discriminator-value": "AreaResolution", + "description": "The intent classification result of a Conversation project.", "properties": { - "unit": { + "category": { "type": "string", - "enum": [ - "Unspecified", - "SquareKilometer", - "SquareHectometer", - "SquareDecameter", - "SquareDecimeter", - "SquareMeter", - "SquareCentimeter", - "SquareMillimeter", - "SquareInch", - "SquareFoot", - "SquareMile", - "SquareYard", - "Acre" - ], - "x-ms-enum": { - "name": "AreaUnit", - "modelAsString": true - }, - "description": "The area Unit of measurement" + "description": "A predicted class." + }, + "confidenceScore": { + "type": "number", + "format": "float", + "description": "The confidence score of the class from 0.0 to 1.0.", + "minimum": 0, + "maximum": 1 } }, "required": [ - "unit" + "category", + "confidenceScore" ] }, - "LengthResolution": { - "description": "Represents the length entity resolution model.", - "allOf": [ - { - "$ref": "#/definitions/BaseResolution" + "ConversationItemLevelTiming": { + "type": "object", + "description": "Audio timing at the conversation item level.", + "properties": { + "offset": { + "type": "integer", + "format": "int64", + "description": "Offset from the start of speech audio, in ticks. 1 tick = 100 nanoseconds." }, - { - "$ref": "#/definitions/QuantityResolution" + "duration": { + "type": "integer", + "format": "int64", + "description": "Duration of word articulation, in ticks. 1 tick = 100 nanoseconds." } - ], + } + }, + "ConversationParameters": { "type": "object", - "x-ms-discriminator-value": "LengthResolution", + "description": "This is a set of request parameters for Customized Conversation projects.", "properties": { - "unit": { - "type": "string", - "enum": [ - "Unspecified", - "Kilometer", - "Hectometer", - "Decameter", - "Meter", - "Decimeter", - "Centimeter", - "Millimeter", - "Micrometer", - "Nanometer", - "Picometer", - "Mile", - "Yard", - "Inch", - "Foot", - "LightYear", - "Pt" - ], - "x-ms-enum": { - "name": "LengthUnit", - "modelAsString": true - }, - "description": "The length Unit of measurement" + "callingOptions": { + "$ref": "#/definitions/ConversationCallingOptions", + "description": "The option to set to call a Conversation project." } }, - "required": [ - "unit" - ] - }, - "InformationResolution": { - "description": "Represents the information (data) entity resolution model.", "allOf": [ { - "$ref": "#/definitions/BaseResolution" - }, - { - "$ref": "#/definitions/QuantityResolution" + "$ref": "#/definitions/AnalysisParameters" } ], + "x-ms-discriminator-value": "Conversation" + }, + "ConversationPiiCategories": { + "type": "string", + "description": "Describes the PII categories to return for detection. If not provided, 'default' categories will be returned which will vary with the language.", + "enum": [ + "Address", + "CreditCardNumber", + "Email", + "Person", + "NumericIdentifier", + "PhoneNumber", + "USSocialSecurityNumber", + "Miscellaneous", + "All", + "Default" + ], + "x-ms-enum": { + "name": "ConversationPiiCategories", + "modelAsString": true, + "values": [ + { + "name": "Address", + "value": "Address", + "description": "Address category" + }, + { + "name": "CreditCardNumber", + "value": "CreditCardNumber", + "description": "Credit card number category" + }, + { + "name": "Email", + "value": "Email", + "description": "Email category" + }, + { + "name": "Person", + "value": "Person", + "description": "Person category" + }, + { + "name": "NumericIdentifier", + "value": "NumericIdentifier", + "description": "Numeric identifier category" + }, + { + "name": "PhoneNumber", + "value": "PhoneNumber", + "description": "Phone number category" + }, + { + "name": "USSocialSecurityNumber", + "value": "USSocialSecurityNumber", + "description": "US social security number category" + }, + { + "name": "Miscellaneous", + "value": "Miscellaneous", + "description": "Miscellaneous category" + }, + { + "name": "All", + "value": "All", + "description": "All categories" + }, + { + "name": "Default", + "value": "Default", + "description": "Default categories" + } + ] + } + }, + "ConversationPiiCategoriesExclude": { + "type": "string", + "description": "Describes the PII categories to exclude for detection. If not provided, 'default' categories will be returned which will vary with the language.", + "enum": [ + "Address", + "CreditCardNumber", + "Email", + "Person", + "NumericIdentifier", + "PhoneNumber", + "USSocialSecurityNumber" + ], + "x-ms-enum": { + "name": "ConversationPiiCategoriesExclude", + "modelAsString": true, + "values": [ + { + "name": "Address", + "value": "Address", + "description": "Address category" + }, + { + "name": "CreditCardNumber", + "value": "CreditCardNumber", + "description": "Credit card number category" + }, + { + "name": "Email", + "value": "Email", + "description": "Email category" + }, + { + "name": "Person", + "value": "Person", + "description": "Person category" + }, + { + "name": "NumericIdentifier", + "value": "NumericIdentifier", + "description": "Numeric identifier category" + }, + { + "name": "PhoneNumber", + "value": "PhoneNumber", + "description": "Phone number category" + }, + { + "name": "USSocialSecurityNumber", + "value": "USSocialSecurityNumber", + "description": "US social security number category" + } + ] + } + }, + "ConversationPiiItemResult": { "type": "object", - "x-ms-discriminator-value": "InformationResolution", + "description": "The result from PII detection and redaction operation for each conversation.", "properties": { - "unit": { + "id": { "type": "string", - "enum": [ - "Unspecified", - "Bit", - "Kilobit", - "Megabit", - "Gigabit", - "Terabit", - "Petabit", - "Byte", - "Kilobyte", - "Megabyte", - "Gigabyte", - "Terabyte", - "Petabyte" - ], - "x-ms-enum": { - "name": "InformationUnit", - "modelAsString": true + "description": "Id of the result" + }, + "redactedContent": { + "$ref": "#/definitions/RedactedTranscriptContent", + "description": "Transcript content response that the service generates, with all necessary personally identifiable information redacted." + }, + "entities": { + "type": "array", + "description": "Array of Entities", + "items": { + "$ref": "#/definitions/Entity" }, - "description": "The information (data) Unit of measurement." + "x-ms-identifiers": [] } }, "required": [ - "unit" + "id", + "redactedContent", + "entities" ] }, - "TemperatureResolution": { - "description": "Represents the temperature entity resolution model.", - "allOf": [ - { - "$ref": "#/definitions/BaseResolution" - }, - { - "$ref": "#/definitions/QuantityResolution" - } - ], + "ConversationPiiResults": { "type": "object", - "x-ms-discriminator-value": "TemperatureResolution", + "description": "The result from PII detection and redaction operation for each conversation.", "properties": { - "unit": { + "errors": { + "type": "array", + "description": "Errors by document id.", + "items": { + "$ref": "#/definitions/DocumentError" + } + }, + "statistics": { + "$ref": "#/definitions/RequestStatistics", + "description": "statistics" + }, + "modelVersion": { "type": "string", - "enum": [ - "Unspecified", - "Fahrenheit", - "Kelvin", - "Rankine", - "Celsius" - ], - "x-ms-enum": { - "name": "TemperatureUnit", - "modelAsString": true - }, - "description": "The temperature Unit of measurement." + "description": "This field indicates which model is used for scoring." + }, + "conversations": { + "type": "array", + "description": "array of conversations", + "items": { + "$ref": "#/definitions/ConversationalPiiResultWithResultBase" + } } }, "required": [ - "unit" + "errors", + "modelVersion", + "conversations" ] }, - "WeightResolution": { - "description": "Represents the weight entity resolution model.", - "allOf": [ - { - "$ref": "#/definitions/BaseResolution" - }, - { - "$ref": "#/definitions/QuantityResolution" - } - ], + "ConversationPiiTaskParameters": { "type": "object", - "x-ms-discriminator-value": "WeightResolution", + "description": "Supported parameters for a conversational pii task.", "properties": { - "unit": { + "loggingOptOut": { + "type": "boolean", + "description": "logging opt out", + "default": false + }, + "modelVersion": { + "type": "string", + "description": "model version", + "default": "latest" + }, + "piiCategories": { + "type": "array", + "description": "Array of ConversationPIICategories", + "items": { + "$ref": "#/definitions/ConversationPiiCategories" + } + }, + "redactAudioTiming": { + "type": "boolean", + "description": "Flag to indicate if response should include audio stream offset and duration for any detected entities to be redacted. By default, audio timing of redacted entities are not included." + }, + "redactionSource": { + "$ref": "#/definitions/TranscriptContentType", + "description": "For transcript conversations, this parameter provides information regarding which content type (ITN, Text, Lexical, Masked ITN) should be used for entity detection. The details of the entities detected - like the offset, length and the text itself - will correspond to the text type selected here." + }, + "redactionCharacter": { "type": "string", + "description": "Optional parameter to use a Custom Character to be used for redaction in PII responses. Default character will be * as before. We allow specific ascii characters for redaction.", + "default": "*", "enum": [ - "Unspecified", - "Kilogram", - "Gram", - "Milligram", - "Gallon", - "MetricTon", - "Ton", - "Pound", - "Ounce", - "Grain", - "PennyWeight", - "LongTonBritish", - "ShortTonUS", - "ShortHundredWeightUS", - "Stone", - "Dram" + "!", + "#", + "$", + "%", + "&", + "*", + "+", + "-", + "=", + "?", + "@", + "^", + "_", + "~" ], "x-ms-enum": { - "name": "WeightUnit", - "modelAsString": true + "name": "redactionCharacter", + "modelAsString": true, + "values": [ + { + "name": "exclamationPoint", + "value": "!", + "description": "Exclamation point character" + }, + { + "name": "numberSign", + "value": "#", + "description": "Number sign character" + }, + { + "name": "dollar", + "value": "$", + "description": "Dollar sign character" + }, + { + "name": "perCent", + "value": "%", + "description": "Percent sign character" + }, + { + "name": "ampersand", + "value": "&", + "description": "Ampersand character" + }, + { + "name": "asterisk", + "value": "*", + "description": "Asterisk character" + }, + { + "name": "plus", + "value": "+", + "description": "Plus sign character" + }, + { + "name": "minus", + "value": "-", + "description": "Minus sign character" + }, + { + "name": "equals", + "value": "=", + "description": "Equals sign character" + }, + { + "name": "questionMark", + "value": "?", + "description": "Question mark character" + }, + { + "name": "atSign", + "value": "@", + "description": "At sign character" + }, + { + "name": "caret", + "value": "^", + "description": "Caret character" + }, + { + "name": "underscore", + "value": "_", + "description": "Underscore character" + }, + { + "name": "tilde", + "value": "~", + "description": "Tilde character" + } + ] + } + }, + "excludePiiCategories": { + "type": "array", + "description": "List of categories that need to be excluded instead of included.", + "items": { + "$ref": "#/definitions/ConversationPiiCategoriesExclude" + } + } + } + }, + "ConversationPrediction": { + "type": "object", + "description": "Represents the prediction section of a Conversation project.", + "properties": { + "intents": { + "type": "array", + "description": "The intent classification results.", + "items": { + "$ref": "#/definitions/ConversationIntent" }, - "description": "The weight Unit of measurement." + "x-ms-identifiers": [] + }, + "entities": { + "type": "array", + "description": "The entity extraction results.", + "items": { + "$ref": "#/definitions/ConversationEntity" + }, + "x-ms-identifiers": [] } }, "required": [ - "unit" - ] - }, - "CurrencyResolution": { - "description": "Represents the currency entity resolution model.", + "intents", + "entities" + ], "allOf": [ { - "$ref": "#/definitions/BaseResolution" - }, - { - "$ref": "#/definitions/QuantityResolution" + "$ref": "#/definitions/BasePrediction" } ], + "x-ms-discriminator-value": "Conversation" + }, + "ConversationRequestStatistics": { "type": "object", - "x-ms-discriminator-value": "CurrencyResolution", + "description": "if showStats=true was specified in the request, this field contains information about the request payload.", "properties": { - "ISO4217": { - "type": "string", - "description": "The alphabetic code based on another ISO standard, ISO 3166, which lists the codes for country names. The first two letters of the ISO 4217 three-letter code are the same as the code for the country name, and, where possible, the third letter corresponds to the first letter of the currency name." + "documentsCount": { + "type": "integer", + "format": "int32", + "description": "Number of documents submitted in the request." }, - "value": { - "type": "number", - "format": "double", - "description": "The money amount captured in the extracted entity" + "validDocumentsCount": { + "type": "integer", + "format": "int32", + "description": "Number of valid documents. This excludes empty, over-size limit or non-supported languages documents." }, - "unit": { - "type": "string", - "description": "The unit of the amount captured in the extracted entity" + "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." + }, + "conversationsCount": { + "type": "integer", + "format": "int32", + "description": "Number of conversations submitted in the request." + }, + "validConversationsCount": { + "type": "integer", + "format": "int32", + "description": "Number of conversation documents. This excludes documents that are empty, over the size limit, or in unsupported languages." + }, + "erroneousConversationsCount": { + "type": "integer", + "format": "int32", + "description": "Number of invalid documents. This includes documents that are empty, over the size limit, or in unsupported languages." } }, "required": [ - "value", - "unit" + "documentsCount", + "validDocumentsCount", + "erroneousDocumentsCount", + "transactionsCount", + "conversationsCount", + "validConversationsCount", + "erroneousConversationsCount" ] }, - "BooleanResolution": { - "description": "A resolution for boolean expressions", - "allOf": [ - { - "$ref": "#/definitions/BaseResolution" - } - ], + "ConversationResult": { "type": "object", - "x-ms-discriminator-value": "BooleanResolution", + "description": "The response returned by a Conversation project.", "properties": { - "value": { - "type": "boolean" + "query": { + "type": "string", + "description": "The same query given in request." + }, + "detectedLanguage": { + "type": "string", + "description": "The detected language from the query in BCP 47 language representation." + }, + "prediction": { + "$ref": "#/definitions/ConversationPrediction", + "description": "The predicted result for the query." } }, "required": [ - "value" + "query" ] }, - "DateTimeResolution": { - "description": "A resolution for datetime entity instances.", - "allOf": [ - { - "$ref": "#/definitions/BaseResolution" - } - ], + "ConversationSentimentItemResult": { "type": "object", - "x-ms-discriminator-value": "DateTimeResolution", + "description": "Sentiment operation results for a conversation items", "properties": { - "timex": { - "$ref": "#/definitions/TimeExpression" - }, - "dateTimeSubKind": { + "id": { "type": "string", - "enum": [ - "Time", - "Date", - "DateTime", - "Duration", - "Set" - ], - "x-ms-enum": { - "name": "DateTimeSubKind", - "modelAsString": true - }, - "description": "The DateTime SubKind" + "description": "The identifier for the conversation item" }, - "value": { + "participantId": { "type": "string", - "description": "The actual time that the extracted text denote." + "description": "The identifier for the speaker" }, - "modifier": { - "$ref": "#/definitions/TemporalModifier" + "sentiment": { + "$ref": "#/definitions/TextSentiment", + "description": "Predicted sentiment" + }, + "confidenceScores": { + "$ref": "#/definitions/SentimentConfidenceScores", + "description": "Represents the confidence scores between 0 and 1 across all sentiment classes: positive, neutral, negative." } }, "required": [ - "timex", - "dateTimeSubKind", - "value" + "id", + "participantId", + "sentiment", + "confidenceScores" ] }, - "NumberResolution": { - "description": "A resolution for numeric entity instances.", - "allOf": [ - { - "$ref": "#/definitions/BaseResolution" - } - ], + "ConversationSentimentResults": { "type": "object", - "x-ms-discriminator-value": "NumberResolution", + "description": "The result from sentiment analysis operation for each conversation.", "properties": { - "numberKind": { + "errors": { + "type": "array", + "description": "Errors by document id.", + "items": { + "$ref": "#/definitions/DocumentError" + } + }, + "statistics": { + "$ref": "#/definitions/RequestStatistics", + "description": "statistics" + }, + "modelVersion": { "type": "string", - "enum": [ - "Integer", - "Decimal", - "Power", - "Fraction", - "Percent", - "Unspecified" - ], - "x-ms-enum": { - "name": "NumberKind", - "modelAsString": true - }, - "description": "The type of the extracted number entity." + "description": "This field indicates which model is used for scoring." }, - "value": { - "type": "number", - "format": "double", - "description": "A numeric representation of what the extracted text denotes." + "conversations": { + "type": "array", + "description": "Array of ConversationSentimentResults", + "items": { + "$ref": "#/definitions/ConversationSentimentResultsConversation" + } } }, "required": [ - "numberKind", - "value" + "errors", + "modelVersion", + "conversations" ] }, - "OrdinalResolution": { - "description": "A resolution for ordinal numbers entity instances.", - "allOf": [ - { - "$ref": "#/definitions/BaseResolution" - } - ], + "ConversationSentimentResultsConversation": { "type": "object", - "x-ms-discriminator-value": "OrdinalResolution", + "description": "The result from sentiment analysis operation for each conversation.", "properties": { - "offset": { + "id": { "type": "string", - "description": "The offset With respect to the reference (e.g., offset = -1 in \"show me the second to last\"" + "description": "Unique, non-empty conversation identifier." }, - "relativeTo": { - "type": "string", - "enum": [ - "Current", - "End", - "Start" - ], - "x-ms-enum": { - "name": "RelativeTo", - "modelAsString": true + "warnings": { + "type": "array", + "description": "Warnings encountered in processing the document.", + "items": { + "$ref": "#/definitions/InputWarning" }, - "description": "The reference point that the ordinal number denotes." + "x-ms-identifiers": [] }, - "value": { - "type": "string", - "description": "A simple arithmetic expression that the ordinal denotes." + "statistics": { + "$ref": "#/definitions/ConversationStatistics", + "description": "If showStats=true was specified in the request this field will contain information about the conversation payload." + }, + "conversationItems": { + "type": "array", + "description": "Enumeration of Sentiment operation results for all the conversation items in a conversation.", + "items": { + "$ref": "#/definitions/ConversationSentimentItemResult" + } } }, "required": [ - "offset", - "relativeTo", - "value" + "id", + "warnings", + "conversationItems" ] }, - "TemporalSpanResolution": { - "description": "represents the resolution of a date and/or time span.", - "allOf": [ - { - "$ref": "#/definitions/BaseResolution" + "ConversationStatistics": { + "type": "object", + "description": "If showStats=true was specified in the request, this field contains information about the conversation payload.", + "properties": { + "transactionsCount": { + "type": "integer", + "format": "int32", + "description": "Number of text units for the request." } - ], + }, + "required": [ + "transactionsCount" + ] + }, + "ConversationSummarizationTaskParameters": { "type": "object", - "x-ms-discriminator-value": "TemporalSpanResolution", + "description": "Supported parameters for pre-build conversational summarization task.", "properties": { - "begin": { - "$ref": "#/definitions/TimeExpression" - }, - "end": { - "$ref": "#/definitions/TimeExpression" + "loggingOptOut": { + "type": "boolean", + "description": "logging opt out", + "default": false }, - "duration": { + "modelVersion": { "type": "string", - "description": "An optional duration value formatted based on the ISO 8601 (https://en.wikipedia.org/wiki/ISO_8601#Durations)" + "description": "model version", + "default": "latest" }, - "modifier": { - "$ref": "#/definitions/TemporalModifier" + "sentenceCount": { + "type": "integer", + "format": "int32", + "description": "It controls the approximate number of sentences in the output summaries." }, - "timex": { + "stringIndexType": { "type": "string", - "description": "An optional triplet containing the beginning, the end, and the duration all stated as ISO 8601 formatted strings." + "description": "String index type", + "default": "TextElements_v8", + "enum": [ + "TextElements_v8", + "UnicodeCodePoint", + "Utf16CodeUnit" + ], + "x-ms-enum": { + "name": "StringIndexType", + "modelAsString": true, + "values": [ + { + "name": "TextElements_v8", + "value": "TextElements_v8", + "description": "Returned offset and length values will correspond to TextElements (Graphemes and Grapheme clusters) confirming to the Unicode 8.0.0 standard. Use this option if your application is written in .Net Framework or .Net Core and you will be using StringInfo." + }, + { + "name": "UnicodeCodePoint", + "value": "UnicodeCodePoint", + "description": "Returned offset and length values will correspond to Unicode code points. Use this option if your application is written in a language that support Unicode, for example Python." + }, + { + "name": "Utf16CodeUnit", + "value": "Utf16CodeUnit", + "description": "Returned offset and length values will correspond to UTF-16 code units. Use this option if your application is written in a language that support Unicode, for example Java, JavaScript." + } + ] + } + }, + "summaryLength": { + "$ref": "#/definitions/SummaryLengthBucket", + "description": "(NOTE: Recommended to use summaryLength over sentenceCount) Controls the approximate length of the output summaries." + }, + "summaryAspects": { + "type": "array", + "description": "Array of Summary Aspects", + "items": { + "$ref": "#/definitions/SummaryAspect" + } } - } + }, + "required": [ + "summaryAspects" + ] }, - "NumericRangeResolution": { - "description": "represents the resolution of numeric intervals.", + "ConversationTargetIntentResult": { + "type": "object", + "description": "A wrap up of Conversation project response.", + "properties": { + "result": { + "$ref": "#/definitions/ConversationResult", + "description": "The actual response from a Conversation project." + } + }, "allOf": [ { - "$ref": "#/definitions/BaseResolution" + "$ref": "#/definitions/TargetIntentResult" } ], + "x-ms-discriminator-value": "Conversation" + }, + "ConversationTaskParameters": { "type": "object", - "x-ms-discriminator-value": "NumericRangeResolution", + "description": "Input parameters necessary for a Conversation task.", "properties": { - "rangeKind": { + "projectName": { + "type": "string", + "description": "The name of the project to use." + }, + "deploymentName": { + "type": "string", + "description": "The name of the deployment to use." + }, + "verbose": { + "type": "boolean", + "description": "If true, the service will return more detailed information in the response." + }, + "isLoggingEnabled": { + "type": "boolean", + "description": "If true, the service will keep the query for further review." + }, + "stringIndexType": { "type": "string", + "description": "Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see https://aka.ms/text-analytics-offsets.", + "default": "TextElements_v8", "enum": [ - "Number", - "Speed", - "Weight", - "Length", - "Volume", - "Area", - "Age", - "Information", - "Temperature", - "Currency" + "TextElements_v8", + "UnicodeCodePoint", + "Utf16CodeUnit" ], "x-ms-enum": { - "name": "RangeKind", - "modelAsString": true - }, - "description": "The kind of range that the resolution object represents." + "name": "StringIndexType", + "modelAsString": true, + "values": [ + { + "name": "TextElements_v8", + "value": "TextElements_v8", + "description": "Returned offset and length values will correspond to TextElements (Graphemes and Grapheme clusters) confirming to the Unicode 8.0.0 standard. Use this option if your application is written in .Net Framework or .Net Core and you will be using StringInfo." + }, + { + "name": "UnicodeCodePoint", + "value": "UnicodeCodePoint", + "description": "Returned offset and length values will correspond to Unicode code points. Use this option if your application is written in a language that support Unicode, for example Python." + }, + { + "name": "Utf16CodeUnit", + "value": "Utf16CodeUnit", + "description": "Returned offset and length values will correspond to UTF-16 code units. Use this option if your application is written in a language that support Unicode, for example Java, JavaScript." + } + ] + } }, - "minimum": { - "type": "number", - "format": "double", - "description": "The beginning value of the interval." + "directTarget": { + "type": "string", + "description": "The name of a target project to forward the request to." }, - "maximum": { - "type": "number", - "format": "double", - "description": "The ending value of the interval." + "targetProjectParameters": { + "type": "object", + "description": "A dictionary representing the parameters for each target project.", + "additionalProperties": { + "$ref": "#/definitions/AnalysisParameters" + } } }, "required": [ - "rangeKind", - "minimum", - "maximum" + "projectName", + "deploymentName" ] }, - "TemporalModifier": { - "type": "string", - "description": "An optional modifier of a date/time instance.", - "enum": [ - "AfterApprox", - "Before", - "BeforeStart", - "Approx", - "ReferenceUndefined", - "SinceEnd", - "AfterMid", - "Start", - "After", - "BeforeEnd", - "Until", - "End", - "Less", - "Since", - "AfterStart", - "BeforeApprox", - "Mid", - "More" - ], - "x-ms-enum": { - "name": "TemporalModifier", - "modelAsString": true - } - }, - "TimeExpression": { - "type": "string", - "description": "An extended ISO 8601 date/time representation as described in (https://github.com/Microsoft/Recognizers-Text/blob/master/Patterns/English/English-DateTime.yaml)" - }, - "BaseExtraInformation": { - "description": "The abstract base object for entity extra information.", + "ConversationalPiiResultWithResultBase": { "type": "object", - "discriminator": "extraInformationKind", + "description": "Conversation PII result item", "properties": { - "extraInformationKind": { - "description": "The extra information object kind.", + "id": { "type": "string", - "enum": [ - "EntitySubtype", - "ListKey", - "RegexKey" - ], - "x-ms-enum": { - "name": "ExtraInformationKind", - "modelAsString": true + "description": "Unique, non-empty conversation identifier." + }, + "warnings": { + "type": "array", + "description": "Warnings encountered in processing the document.", + "items": { + "$ref": "#/definitions/InputWarning" + }, + "x-ms-identifiers": [] + }, + "statistics": { + "$ref": "#/definitions/ConversationStatistics", + "description": "If showStats=true was specified in the request this field will contain information about the conversation payload." + }, + "conversationItems": { + "type": "array", + "description": "List of conversationItems", + "items": { + "$ref": "#/definitions/ConversationPiiItemResult" } } }, "required": [ - "extraInformationKind" + "id", + "warnings", + "conversationItems" ] }, - "EntitySubtype": { - "description": "The concrete entity Subtype model of extra information.", - "allOf": [ - { - "$ref": "#/definitions/BaseExtraInformation" - } - ], + "ConversationalSentimentTaskParameters": { "type": "object", - "x-ms-discriminator-value": "EntitySubtype", + "description": "Supported parameters for a conversational sentiment task.", "properties": { - "value": { + "loggingOptOut": { + "type": "boolean", + "description": "logging opt out", + "default": false + }, + "modelVersion": { "type": "string", - "description": "The Subtype of an extracted entity type." + "description": "model version", + "default": "latest" + }, + "predictionSource": { + "$ref": "#/definitions/TranscriptContentType", + "description": "For transcript conversations, this parameter provides information regarding which content type should be used for sentiment analysis. The details of the sentiment analysis - like the offset, length and the text itself - will correspond to the text type selected here." } } }, - "ListKey": { - "description": "The list key extra data kind.", + "ConversationalTask": { + "type": "object", + "description": "The input for a custom conversation task.", + "properties": { + "analysisInput": { + "$ref": "#/definitions/ConversationAnalysisOptions", + "description": "The input ConversationItem and its optional parameters" + }, + "parameters": { + "$ref": "#/definitions/ConversationTaskParameters", + "description": "Input parameters necessary for a Conversation task." + } + }, + "required": [ + "analysisInput", + "parameters" + ], "allOf": [ { - "$ref": "#/definitions/BaseExtraInformation" + "$ref": "#/definitions/AnalyzeConversationTask" } ], + "x-ms-discriminator-value": "Conversation" + }, + "ConversationalTaskResult": { "type": "object", - "x-ms-discriminator-value": "ListKey", + "description": "The results of a Conversation task.", "properties": { - "key": { - "type": "string", - "description": "The canonical form of the extracted entity." + "result": { + "$ref": "#/definitions/AnalyzeConversationResult", + "description": "Represents a conversation analysis response." } - } - }, - "RegexKey": { - "description": "The regex key extra data kind.", + }, + "required": [ + "result" + ], "allOf": [ { - "$ref": "#/definitions/BaseExtraInformation" + "$ref": "#/definitions/AnalyzeConversationTaskResult" } ], + "x-ms-discriminator-value": "ConversationResult" + }, + "ConversationsSummaryResult": { "type": "object", - "x-ms-discriminator-value": "RegexKey", + "description": "Conversations Summary Result", "properties": { - "key": { + "id": { "type": "string", - "description": "The key of the regex pattern used in extracting the entity." + "description": "Unique, non-empty conversation identifier." }, - "regexPattern": { - "type": "string", - "description": "The .NET regex pattern used in extracting the entity. Please visit https://docs.microsoft.com/dotnet/standard/base-types/regular-expressions for more information about .NET regular expressions." - } - } + "warnings": { + "type": "array", + "description": "Warnings encountered in processing the document.", + "items": { + "$ref": "#/definitions/InputWarning" + }, + "x-ms-identifiers": [] + }, + "statistics": { + "$ref": "#/definitions/ConversationStatistics", + "description": "If showStats=true was specified in the request this field will contain information about the conversation payload." + }, + "summaries": { + "type": "array", + "description": "array of summaries", + "items": { + "$ref": "#/definitions/SummaryResultItem" + }, + "x-ms-identifiers": [] + } + }, + "required": [ + "id", + "warnings", + "summaries" + ] }, - "LuisTargetIntentResult": { + "CurrencyResolution": { "type": "object", - "description": "It is a wrap up of LUIS Generally Available response.", - "x-ms-discriminator-value": "Luis", - "allOf": [ - { - "$ref": "#/definitions/TargetIntentResult" - } - ], + "description": "Represents the currency entity resolution model.", "properties": { - "result": { - "type": "object", - "description": "The actual response from a LUIS Generally Available application." + "ISO4217": { + "type": "string", + "description": "The alphabetic code based on another ISO standard, ISO 3166, which lists the codes for country names. The first two letters of the ISO 4217 three-letter code are the same as the code for the country name, and, where possible, the third letter corresponds to the first letter of the currency name.", + "x-ms-client-name": "iso4217" + }, + "value": { + "type": "number", + "format": "double", + "description": "The money amount captured in the extracted entity" + }, + "unit": { + "type": "string", + "description": "The unit of the amount captured in the extracted entity" } - } - }, - "QuestionAnsweringTargetIntentResult": { - "type": "object", - "description": "It is a wrap up a Question Answering KB response.", - "x-ms-discriminator-value": "QuestionAnswering", + }, + "required": [ + "value", + "unit" + ], "allOf": [ { - "$ref": "#/definitions/TargetIntentResult" + "$ref": "#/definitions/BaseResolution" } ], - "properties": { - "result": { - "description": "The generated answer by a Question Answering KB.", - "$ref": "common.json#/definitions/AnswersResult" - } - } + "x-ms-discriminator-value": "CurrencyResolution" }, - "AnalyzeConversationJobsInput": { + "CustomConversationSummarizationTaskParameters": { "type": "object", + "description": "Supported parameters for a custom conversation summarization task.", "properties": { - "displayName": { - "description": "Optional display name for the analysis job.", - "type": "string" + "loggingOptOut": { + "type": "boolean", + "description": "logging opt out", + "default": false }, - "analysisInput": { - "$ref": "#/definitions/MultiLanguageConversationAnalysisInput" + "projectName": { + "type": "string", + "description": "This field indicates the project name for the model." }, - "tasks": { - "description": "The set of tasks to execute on the input conversation.", + "deploymentName": { + "type": "string", + "description": "This field indicates the deployment name for the model." + }, + "sentenceCount": { + "type": "integer", + "format": "int32", + "description": "It controls the approximate number of sentences in the output summaries." + }, + "stringIndexType": { + "type": "string", + "description": "String index type", + "default": "TextElements_v8", + "enum": [ + "TextElements_v8", + "UnicodeCodePoint", + "Utf16CodeUnit" + ], + "x-ms-enum": { + "name": "StringIndexType", + "modelAsString": true, + "values": [ + { + "name": "TextElements_v8", + "value": "TextElements_v8", + "description": "Returned offset and length values will correspond to TextElements (Graphemes and Grapheme clusters) confirming to the Unicode 8.0.0 standard. Use this option if your application is written in .Net Framework or .Net Core and you will be using StringInfo." + }, + { + "name": "UnicodeCodePoint", + "value": "UnicodeCodePoint", + "description": "Returned offset and length values will correspond to Unicode code points. Use this option if your application is written in a language that support Unicode, for example Python." + }, + { + "name": "Utf16CodeUnit", + "value": "Utf16CodeUnit", + "description": "Returned offset and length values will correspond to UTF-16 code units. Use this option if your application is written in a language that support Unicode, for example Java, JavaScript." + } + ] + } + }, + "summaryLength": { + "$ref": "#/definitions/SummaryLengthBucket", + "description": "(NOTE: Recommended to use summaryLength over sentenceCount) Controls the approximate length of the output summaries." + }, + "summaryAspects": { "type": "array", + "description": "Array of Summary Aspects", "items": { - "$ref": "#/definitions/AnalyzeConversationLROTask" + "$ref": "#/definitions/SummaryAspect" } } }, "required": [ - "analysisInput", - "tasks" + "projectName", + "deploymentName", + "summaryAspects" ] }, - "AnalyzeConversationLROTask": { + "CustomSummaryResult": { "type": "object", - "description": "The base class for an long running conversation input task.", - "discriminator": "kind", + "description": "Custom Summary Results", + "properties": { + "conversations": { + "type": "array", + "description": "array of conversations", + "items": { + "$ref": "#/definitions/ConversationsSummaryResult" + } + }, + "errors": { + "type": "array", + "description": "Errors by document id.", + "items": { + "$ref": "#/definitions/DocumentError" + } + }, + "statistics": { + "$ref": "#/definitions/RequestStatistics", + "description": "if showStats=true was specified in the request this field will contain information about the request payload." + }, + "projectName": { + "type": "string", + "description": "This field indicates the project name for the model." + }, + "deploymentName": { + "type": "string", + "description": "This field indicates the deployment name for the model." + } + }, "required": [ - "kind" - ], + "conversations", + "errors", + "projectName", + "deploymentName" + ] + }, + "DateTimeResolution": { + "type": "object", + "description": "A resolution for datetime entity instances.", "properties": { - "kind": { - "$ref": "#/definitions/AnalyzeConversationLROTaskKind" + "timex": { + "type": "string", + "description": "An extended ISO 8601 date/time representation as described in (https://github.com/Microsoft/Recognizers-Text/blob/master/Patterns/English/English-DateTime.yaml)" + }, + "dateTimeSubKind": { + "$ref": "#/definitions/DateTimeSubKind", + "description": "The DateTime SubKind" + }, + "value": { + "type": "string", + "description": "The actual time that the extracted text denote." + }, + "modifier": { + "$ref": "#/definitions/TemporalModifier", + "description": "An optional modifier of a date/time instance." } }, + "required": [ + "timex", + "dateTimeSubKind", + "value" + ], "allOf": [ { - "$ref": "common.json#/definitions/TaskIdentifier" + "$ref": "#/definitions/BaseResolution" } - ] - }, - "AnalyzeConversationLROTaskKind": { - "type": "string", - "description": "Enumeration of supported analysis tasks on a collection of conversation.", - "enum": [ - "ConversationalPIITask", - "ConversationalSummarizationTask", - "CustomConversationalSummarizationTask", - "ConversationalSentimentTask" ], - "x-ms-enum": { - "name": "AnalyzeConversationLROTaskKind", - "modelAsString": true - } + "x-ms-discriminator-value": "DateTimeResolution" }, - "AnalyzeConversationResultsKind": { + "DateTimeSubKind": { "type": "string", - "description": "Enumeration of supported Conversation Analysis task results.", + "description": "The Datetime SubKind.", "enum": [ - "ConversationalPIIResults", - "ConversationalSummarizationResults", - "CustomConversationalSummarizationResults", - "ConversationalSentimentResults" + "Time", + "Date", + "DateTime", + "Duration", + "Set" ], "x-ms-enum": { - "name": "AnalyzeConversationResultsKind", - "modelAsString": true + "name": "DateTimeSubKind", + "modelAsString": true, + "values": [ + { + "name": "Time", + "value": "Time", + "description": "Time subkind" + }, + { + "name": "Date", + "value": "Date", + "description": "Date subkind" + }, + { + "name": "DateTime", + "value": "DateTime", + "description": "DateTime subkind" + }, + { + "name": "Duration", + "value": "Duration", + "description": "Duration subkind" + }, + { + "name": "Set", + "value": "Set", + "description": "Set subkind" + } + ] } }, - "AnalyzeConversationPIITask": { + "DocumentError": { "type": "object", - "description": "Task definition for a PII redaction in conversations.", + "description": "Contains details of errors encountered during a job execution.", "properties": { - "parameters": { - "$ref": "#/definitions/ConversationPIITaskParameters" + "id": { + "type": "string", + "description": "The ID of the input document." + }, + "error": { + "$ref": "#/definitions/Error", + "description": "Error encountered." + } + }, + "required": [ + "id", + "error" + ] + }, + "Entity": { + "type": "object", + "description": "Text that has been categorized into pre-defined classes or types such as: person, location, event, product, and organization.", + "properties": { + "text": { + "type": "string", + "description": "Entity text as appears in the request." + }, + "category": { + "type": "string", + "description": "Entity type." + }, + "subcategory": { + "type": "string", + "description": "(Optional) Entity sub type." + }, + "offset": { + "type": "integer", + "format": "int32", + "description": "Start position for the entity text. Use of different 'stringIndexType' values can affect the offset returned." + }, + "length": { + "type": "integer", + "format": "int32", + "description": "Length for the entity text. Use of different 'stringIndexType' values can affect the length returned." + }, + "confidenceScore": { + "type": "number", + "format": "double", + "description": "Confidence score between 0 and 1 of the extracted entity." + } + }, + "required": [ + "text", + "category", + "offset", + "length", + "confidenceScore" + ] + }, + "EntitySubtype": { + "type": "object", + "description": "The concrete entity Subtype model of extra information.", + "properties": { + "value": { + "type": "string", + "description": "The Subtype of an extracted entity type." } }, "allOf": [ { - "$ref": "#/definitions/AnalyzeConversationLROTask" + "$ref": "#/definitions/BaseExtraInformation" } ], - "x-ms-discriminator-value": "ConversationalPIITask" + "x-ms-discriminator-value": "EntitySubtype" }, - "ConversationPIIItemResult": { + "Error": { "type": "object", - "required": [ - "id", - "redactedContent", - "entities" - ], + "description": "The error object.", "properties": { - "id": { - "type": "string" + "code": { + "$ref": "#/definitions/ErrorCode", + "description": "One of a server-defined set of error codes." }, - "redactedContent": { - "type": "object", - "$ref": "#/definitions/RedactedTranscriptContent" + "message": { + "type": "string", + "description": "A human-readable representation of the error." }, - "entities": { + "target": { + "type": "string", + "description": "The target of the error." + }, + "details": { "type": "array", + "description": "An array of details about specific errors that led to this reported error.", "items": { - "$ref": "#/definitions/Entity" - } + "$ref": "#/definitions/Error" + }, + "x-ms-identifiers": [] + }, + "innererror": { + "$ref": "#/definitions/InnerErrorModel", + "description": "An object containing more specific information than the current object about the error." } - } - }, - "MultiLanguageConversationAnalysisInput": { - "type": "object", + }, "required": [ - "conversations" - ], - "properties": { - "conversations": { - "type": "array", - "items": { - "$ref": "#/definitions/Conversation" - } - } - } - }, - "Conversation": { - "type": "object", - "description": "A complete ordered set of utterances (spoken or written), by one or more speakers to be used for analysis.", - "discriminator": "modality", - "required": [ - "id", - "language", - "modality" - ], - "properties": { - "id": { - "description": "Unique identifier for the conversation.", - "type": "string" - }, - "language": { - "description": "The language of the conversation item in BCP-47 format.", - "type": "string" - }, - "modality": { - "$ref": "#/definitions/Modality" - }, - "domain": { - "$ref": "#/definitions/ConversationDomain" - } - } + "code", + "message" + ] }, - "Modality": { + "ErrorCode": { "type": "string", - "description": "Enumeration of supported conversational modalities.", + "description": "Human-readable error code.", "enum": [ - "transcript", - "text" + "InvalidRequest", + "InvalidArgument", + "Unauthorized", + "Forbidden", + "NotFound", + "ProjectNotFound", + "OperationNotFound", + "AzureCognitiveSearchNotFound", + "AzureCognitiveSearchIndexNotFound", + "TooManyRequests", + "AzureCognitiveSearchThrottling", + "AzureCognitiveSearchIndexLimitReached", + "InternalServerError", + "ServiceUnavailable", + "Timeout", + "QuotaExceeded", + "Conflict", + "Warning" ], "x-ms-enum": { - "name": "InputModality", - "modelAsString": true + "name": "ErrorCode", + "modelAsString": true, + "values": [ + { + "name": "InvalidRequest", + "value": "InvalidRequest", + "description": "Invalid request error" + }, + { + "name": "InvalidArgument", + "value": "InvalidArgument", + "description": "Invalid argument error" + }, + { + "name": "Unauthorized", + "value": "Unauthorized", + "description": "Unauthorized access error" + }, + { + "name": "Forbidden", + "value": "Forbidden", + "description": "Forbidden access error" + }, + { + "name": "NotFound", + "value": "NotFound", + "description": "Not found error" + }, + { + "name": "ProjectNotFound", + "value": "ProjectNotFound", + "description": "Project not found error" + }, + { + "name": "OperationNotFound", + "value": "OperationNotFound", + "description": "Operation not found error" + }, + { + "name": "AzureCognitiveSearchNotFound", + "value": "AzureCognitiveSearchNotFound", + "description": "Azure Cognitive Search not found error" + }, + { + "name": "AzureCognitiveSearchIndexNotFound", + "value": "AzureCognitiveSearchIndexNotFound", + "description": "Azure Cognitive Search index not found error" + }, + { + "name": "TooManyRequests", + "value": "TooManyRequests", + "description": "Too many requests error" + }, + { + "name": "AzureCognitiveSearchThrottling", + "value": "AzureCognitiveSearchThrottling", + "description": "Azure Cognitive Search throttling error" + }, + { + "name": "AzureCognitiveSearchIndexLimitReached", + "value": "AzureCognitiveSearchIndexLimitReached", + "description": "Azure Cognitive Search index limit reached error" + }, + { + "name": "InternalServerError", + "value": "InternalServerError", + "description": "Internal server error" + }, + { + "name": "ServiceUnavailable", + "value": "ServiceUnavailable", + "description": "Service unavailable error" + }, + { + "name": "Timeout", + "value": "Timeout", + "description": "Timeout error" + }, + { + "name": "QuotaExceeded", + "value": "QuotaExceeded", + "description": "Quota exceeded error" + }, + { + "name": "Conflict", + "value": "Conflict", + "description": "Conflict error" + }, + { + "name": "Warning", + "value": "Warning", + "description": "Warning error" + } + ] } }, - "ConversationDomain": { + "ErrorResponse": { + "type": "object", + "description": "Error response.", + "properties": { + "error": { + "$ref": "#/definitions/Error", + "description": "The error object." + } + }, + "required": [ + "error" + ] + }, + "ExtraInformationKind": { "type": "string", - "description": "Enumeration of supported conversational domains.", + "description": "The extra information object kind.", "enum": [ - "finance", - "healthcare", - "generic" + "EntitySubtype", + "ListKey", + "RegexKey" ], "x-ms-enum": { - "name": "ConversationDomain", - "modelAsString": true + "name": "ExtraInformationKind", + "modelAsString": true, + "values": [ + { + "name": "EntitySubtype", + "value": "EntitySubtype", + "description": "Entity subtype extra information kind" + }, + { + "name": "ListKey", + "value": "ListKey", + "description": "List key extra information kind" + }, + { + "name": "RegexKey", + "value": "RegexKey", + "description": "Regex key extra information kind" + } + ] } }, - "TextConversation": { + "InformationResolution": { "type": "object", - "x-ms-discriminator-value": "text", + "description": "Represents the information (data) entity resolution model.", + "properties": { + "value": { + "type": "number", + "format": "double", + "description": "The numeric value that the extracted text denotes." + }, + "unit": { + "$ref": "#/definitions/InformationUnit", + "description": "The information (data) Unit of measurement." + } + }, "required": [ - "conversationItems" + "value", + "unit" ], "allOf": [ { - "$ref": "#/definitions/Conversation" + "$ref": "#/definitions/BaseResolution" } ], - "properties": { - "conversationItems": { - "description": "Ordered list of text conversation items in the conversation.", - "type": "array", - "items": { - "$ref": "#/definitions/TextConversationItem" + "x-ms-discriminator-value": "InformationResolution" + }, + "InformationUnit": { + "type": "string", + "description": "The information (data) Unit of measurement.", + "enum": [ + "Unspecified", + "Bit", + "Kilobit", + "Megabit", + "Gigabit", + "Terabit", + "Petabit", + "Byte", + "Kilobyte", + "Megabyte", + "Gigabyte", + "Terabyte", + "Petabyte" + ], + "x-ms-enum": { + "name": "InformationUnit", + "modelAsString": true, + "values": [ + { + "name": "Unspecified", + "value": "Unspecified", + "description": "Unspecified information unit" + }, + { + "name": "Bit", + "value": "Bit", + "description": "Bit information unit" + }, + { + "name": "Kilobit", + "value": "Kilobit", + "description": "Kilobit information unit" + }, + { + "name": "Megabit", + "value": "Megabit", + "description": "Megabit information unit" + }, + { + "name": "Gigabit", + "value": "Gigabit", + "description": "Gigabit information unit" + }, + { + "name": "Terabit", + "value": "Terabit", + "description": "Terabit information unit" + }, + { + "name": "Petabit", + "value": "Petabit", + "description": "Petabit information unit" + }, + { + "name": "Byte", + "value": "Byte", + "description": "Byte information unit" + }, + { + "name": "Kilobyte", + "value": "Kilobyte", + "description": "Kilobyte information unit" + }, + { + "name": "Megabyte", + "value": "Megabyte", + "description": "Megabyte information unit" + }, + { + "name": "Gigabyte", + "value": "Gigabyte", + "description": "Gigabyte information unit" + }, + { + "name": "Terabyte", + "value": "Terabyte", + "description": "Terabyte information unit" + }, + { + "name": "Petabyte", + "value": "Petabyte", + "description": "Petabyte information unit" } - } + ] } }, - "TranscriptConversation": { - "type": "object", - "x-ms-discriminator-value": "transcript", - "required": [ - "conversationItems" - ], - "allOf": [ - { - "$ref": "#/definitions/Conversation" - } + "InnerErrorCode": { + "type": "string", + "description": "Human-readable error code.", + "enum": [ + "InvalidRequest", + "InvalidParameterValue", + "KnowledgeBaseNotFound", + "AzureCognitiveSearchNotFound", + "AzureCognitiveSearchThrottling", + "ExtractionFailure", + "InvalidRequestBodyFormat", + "EmptyRequest", + "MissingInputDocuments", + "InvalidDocument", + "ModelVersionIncorrect", + "InvalidDocumentBatch", + "UnsupportedLanguageCode", + "InvalidCountryHint" ], - "properties": { - "conversationItems": { - "description": "Ordered list of transcript conversation items in the conversation.", - "type": "array", - "items": { - "$ref": "#/definitions/TranscriptConversationItem" + "x-ms-enum": { + "name": "InnerErrorCode", + "modelAsString": true, + "values": [ + { + "name": "InvalidRequest", + "value": "InvalidRequest", + "description": "Invalid request error" + }, + { + "name": "InvalidParameterValue", + "value": "InvalidParameterValue", + "description": "Invalid parameter value error" + }, + { + "name": "KnowledgeBaseNotFound", + "value": "KnowledgeBaseNotFound", + "description": "Knowledge base not found error" + }, + { + "name": "AzureCognitiveSearchNotFound", + "value": "AzureCognitiveSearchNotFound", + "description": "Azure Cognitive Search not found error" + }, + { + "name": "AzureCognitiveSearchThrottling", + "value": "AzureCognitiveSearchThrottling", + "description": "Azure Cognitive Search throttling error" + }, + { + "name": "ExtractionFailure", + "value": "ExtractionFailure", + "description": "Extraction failure error" + }, + { + "name": "InvalidRequestBodyFormat", + "value": "InvalidRequestBodyFormat", + "description": "Invalid request body format error" + }, + { + "name": "EmptyRequest", + "value": "EmptyRequest", + "description": "Empty request error" + }, + { + "name": "MissingInputDocuments", + "value": "MissingInputDocuments", + "description": "Missing input documents error" + }, + { + "name": "InvalidDocument", + "value": "InvalidDocument", + "description": "Invalid document error" + }, + { + "name": "ModelVersionIncorrect", + "value": "ModelVersionIncorrect", + "description": "Model version incorrect error" + }, + { + "name": "InvalidDocumentBatch", + "value": "InvalidDocumentBatch", + "description": "Invalid document batch error" + }, + { + "name": "UnsupportedLanguageCode", + "value": "UnsupportedLanguageCode", + "description": "Unsupported language code error" + }, + { + "name": "InvalidCountryHint", + "value": "InvalidCountryHint", + "description": "Invalid country hint error" } - } + ] } }, - "TranscriptConversationItem": { + "InnerErrorModel": { "type": "object", - "description": "Additional properties for supporting transcript conversation.", - "required": [ - "text", - "lexical", - "itn", - "maskedItn" - ], - "allOf": [ - { - "$ref": "#/definitions/ConversationItemBase" - } - ], + "description": "An object containing more specific information about the error. As per Microsoft One API guidelines - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses.", "properties": { - "itn": { - "type": "string", - "description": "Inverse Text Normalization representation of input. The inverse-text-normalized form is the recognized text from Microsoft's Speech to Text API, with phone numbers, numbers, abbreviations, and other transformations applied." + "code": { + "$ref": "#/definitions/InnerErrorCode", + "description": "One of a server-defined set of error codes." }, - "maskedItn": { + "message": { "type": "string", - "description": "The Inverse Text Normalized format with profanity masking applied." + "description": "Error message." }, - "text": { - "type": "string", - "description": "The display form of the recognized text from speech to text API, with punctuation and capitalization added." + "details": { + "type": "object", + "description": "Error details.", + "additionalProperties": { + "type": "string" + } }, - "lexical": { + "target": { "type": "string", - "description": "The lexical form of the recognized text from speech to text API with the actual words recognized." - }, - "wordLevelTimings": { - "type": "array", - "description": "The list of word level audio timing information", - "items": { - "$ref": "#/definitions/WordLevelTiming" - } + "description": "Error target." }, - "conversationItemLevelTiming": { - "description": "Conversation item level audio timing. This still can help on AI quality if word level audio timings are not available.", - "$ref": "#/definitions/ConversationItemLevelTiming" + "innererror": { + "$ref": "#/definitions/InnerErrorModel", + "description": "An object containing more specific information than the current object about the error." } + }, + "required": [ + "code", + "message" + ] + }, + "InputModality": { + "type": "string", + "description": "Enumeration of supported conversational modalities.", + "enum": [ + "transcript", + "text" + ], + "x-ms-enum": { + "name": "InputModality", + "modelAsString": true, + "values": [ + { + "name": "transcript", + "value": "transcript", + "description": "Transcript input modality" + }, + { + "name": "text", + "value": "text", + "description": "Text input modality" + } + ] } }, - "RedactedTranscriptContent": { + "InputWarning": { "type": "object", - "description": "The transcript content response generated by the service with all necessary personally identifiable information redacted.", + "description": "Contains details of warnings encountered during a job execution.", "properties": { - "itn": { - "type": "string", - "description": "The redacted output for inverse text normalized format input." - }, - "maskedItn": { + "code": { "type": "string", - "description": "The redacted output for masked inverse text normalized format input." + "description": "Warning code." }, - "text": { + "message": { "type": "string", - "description": "The redacted output for text (Microsoft's Speech to Text 'display') format input." + "description": "Warning message." }, - "lexical": { + "targetRef": { "type": "string", - "description": "The redacted output for lexical format input." - }, - "audioTimings": { - "type": "array", - "description": "The list of redacted audio segments.", - "items": { - "$ref": "#/definitions/AudioTiming" - } + "description": "A JSON pointer reference indicating the target object." } - } + }, + "required": [ + "code", + "message" + ] }, - "WordLevelTiming": { + "ItemizedSummaryContext": { "type": "object", - "description": "Word level timing information generated by the speech to text API. The words in this object should have 1:1 correspondence with the 'lexical' input to allow for audio redaction.", - "properties": { - "word": { - "type": "string", - "description": "The word recognized." - } - }, - "allOf": [ - { - "$ref": "#/definitions/AudioTiming" - } - ] - }, - "AudioTiming": { - "type": "object", - "description": "The audio timing information.", + "description": "Context of the summary with a conversation item ID.", "properties": { "offset": { - "description": "Offset from start of speech audio, in ticks. 1 tick = 100 ns.", "type": "integer", - "format": "int64" + "format": "int32", + "description": "Start position for the context. Use of different 'stringIndexType' values can affect the offset returned." }, - "duration": { - "description": "Duration of word articulation, in ticks. 1 tick = 100 ns.", + "length": { "type": "integer", - "format": "int64" + "format": "int32", + "description": "The length of the context. Use of different 'stringIndexType' values can affect the length returned." + }, + "conversationItemId": { + "type": "string", + "description": "Reference to the ID of ConversationItem." } - } - }, - "Entity": { - "type": "object", + }, "required": [ - "text", - "category", "offset", "length", - "confidenceScore" - ], + "conversationItemId" + ] + }, + "KnowledgeBaseAnswer": { + "type": "object", + "description": "Represents knowledge base answer.", "properties": { - "text": { - "type": "string", - "description": "Entity text as appears in the request." + "questions": { + "type": "array", + "description": "List of questions associated with the answer.", + "items": { + "type": "string" + } }, - "category": { + "answer": { "type": "string", - "description": "Entity type." + "description": "Answer text." }, - "subcategory": { - "type": "string", - "description": "(Optional) Entity sub type." + "confidenceScore": { + "type": "number", + "format": "double", + "description": "Answer confidence score, value ranges from 0 to 1.", + "minimum": 0, + "maximum": 1 }, - "offset": { + "id": { "type": "integer", "format": "int32", - "description": "Start position for the entity text. Use of different 'stringIndexType' values can affect the offset returned." + "description": "ID of the QnA result." }, - "length": { - "type": "integer", - "format": "int32", - "description": "Length for the entity text. Use of different 'stringIndexType' values can affect the length returned." + "source": { + "type": "string", + "description": "Source of QnA result." }, - "confidenceScore": { - "type": "number", - "format": "double", - "description": "Confidence score between 0 and 1 of the extracted entity." + "metadata": { + "type": "object", + "description": "Metadata associated with the answer, useful to categorize or filter question answers.", + "additionalProperties": { + "type": "string" + } + }, + "dialog": { + "$ref": "#/definitions/KnowledgeBaseAnswerDialog", + "description": "Dialog associated with Answer." + }, + "answerSpan": { + "$ref": "#/definitions/AnswerSpan", + "description": "Answer span object of QnA with respect to user's question." } } }, - "AnalyzeConversationConversationPIIResult": { + "KnowledgeBaseAnswerContext": { "type": "object", - "description": "Result from the personally identifiable information detection and redaction operation performed on a list of conversations.", - "allOf": [ - { - "$ref": "#/definitions/AnalyzeConversationJobResult" - } - ], + "description": "Context object with previous QnA's information.", "properties": { - "results": { - "$ref": "#/definitions/ConversationPIIResults" + "previousQnaId": { + "type": "integer", + "format": "int32", + "description": "Previous turn top answer result QnA ID." + }, + "previousUserQuery": { + "type": "string", + "description": "Previous user query." } }, "required": [ - "results" - ], - "x-ms-discriminator-value": "ConversationalPIIResults" - }, - "ConversationPIIResults": { - "type": "object", - "description": "The result from PII detection and redaction operation for each conversation.", - "required": [ - "conversations" - ], - "properties": { - "conversations": { - "type": "array", - "items": { - "$ref": "#/definitions/ConversationalPIIResultWithResultBase" - } - } - }, - "allOf": [ - { - "$ref": "common.json#/definitions/PreBuiltResult" - } - ] - }, - "ConversationalPIIResultWithResultBase": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/ConversationPIIResult" - }, - { - "$ref": "#/definitions/ConversationResultBase" - } + "previousQnaId" ] }, - "ConversationPIIResult": { + "KnowledgeBaseAnswerDialog": { "type": "object", - "description": "The result from PII detection and redaction operation for each conversation.", - "required": [ - "conversationItems" - ], + "description": "Dialog associated with Answer.", "properties": { - "conversationItems": { - "description": "Enumeration of PII detection and redaction operation results for all the conversation items in a conversation.", + "isContextOnly": { + "type": "boolean", + "description": "To mark if a prompt is relevant only with a previous question or not. If true, do not include this QnA as search result for queries without context; otherwise, if false, ignores context and includes this QnA in search result." + }, + "prompts": { "type": "array", + "description": "List of prompts associated with the answer.", + "maxItems": 20, "items": { - "$ref": "#/definitions/ConversationPIIItemResult" - } + "$ref": "#/definitions/KnowledgeBaseAnswerPrompt" + }, + "x-ms-identifiers": [] } } }, - "ConversationPIITaskParameters": { + "KnowledgeBaseAnswerPrompt": { "type": "object", - "description": "Supported parameters for a Conversational PII detection and redaction task.", + "description": "Prompt for an answer.", "properties": { - "piiCategories": { - "$ref": "#/definitions/ConversationPIICategories" + "displayOrder": { + "type": "integer", + "format": "int32", + "description": "Index of the prompt - used in ordering of the prompts." }, - "redactAudioTiming": { - "type": "boolean", - "description": "Flag to indicate if response should include audio stream offset and duration for any detected entities to be redacted. By default, audio timing of redacted entities are not included.", - "default": false + "qnaId": { + "type": "integer", + "format": "int32", + "description": "QnA ID corresponding to the prompt." }, - "redactionSource": { + "displayText": { "type": "string", - "description": "For transcript conversations, this parameter provides information regarding which content type (ITN, Text, Lexical, Masked ITN) should be used for entity detection. The details of the entities detected - like the offset, length and the text itself - will correspond to the text type selected here.", - "$ref": "#/definitions/TranscriptContentType" - }, - "redactionCharacter": { - "$ref": "common.json#/definitions/RedactionCharacter" + "description": "Text displayed to represent a follow up question prompt.", + "maxLength": 200 + } + } + }, + "LengthResolution": { + "type": "object", + "description": "Represents the length entity resolution model.", + "properties": { + "value": { + "type": "number", + "format": "double", + "description": "The numeric value that the extracted text denotes." }, - "excludePiiCategories": { - "description": "List of categories that need to be excluded instead of included.", - "$ref": "#/definitions/ConversationPIICategoriesExclude" + "unit": { + "$ref": "#/definitions/LengthUnit", + "description": "The length Unit of measurement" } }, + "required": [ + "value", + "unit" + ], "allOf": [ { - "$ref": "common.json#/definitions/PreBuiltTaskParameters" + "$ref": "#/definitions/BaseResolution" } - ] - }, - "ConversationPIICategories": { - "description": "Describes the PII categories to return for detection. If not provided, 'default' categories will be returned which will vary with the language.", - "items": { - "type": "string", - "x-ms-enum": { - "name": "ConversationPIICategory", - "modelAsString": true - }, - "enum": [ - "Address", - "CreditCardNumber", - "Email", - "Person", - "NumericIdentifier", - "PhoneNumber", - "USSocialSecurityNumber", - "Miscellaneous", - "All", - "Default" - ] - }, - "type": "array", - "uniqueItems": true - }, - "ConversationPIICategoriesExclude": { - "description": "Describes the PII categories to exclude for detection. If not provided, 'default' categories will be returned which will vary with the language.", - "items": { - "type": "string", - "x-ms-enum": { - "name": "ConversationPIICategoriesExclude", - "modelAsString": true - }, - "enum": [ - "Address", - "CreditCardNumber", - "Email", - "Person", - "NumericIdentifier", - "PhoneNumber", - "USSocialSecurityNumber" - ] - }, - "type": "array", - "uniqueItems": true + ], + "x-ms-discriminator-value": "LengthResolution" }, - "TranscriptContentType": { + "LengthUnit": { "type": "string", - "description": "Enumeration of supported transcript content types.", + "description": "The length unit of measurement.", "enum": [ - "lexical", - "itn", - "maskedItn", - "text" + "Unspecified", + "Kilometer", + "Hectometer", + "Decameter", + "Meter", + "Decimeter", + "Centimeter", + "Millimeter", + "Micrometer", + "Nanometer", + "Picometer", + "Mile", + "Yard", + "Inch", + "Foot", + "LightYear", + "Pt" ], "x-ms-enum": { - "name": "TranscriptContentType", - "modelAsString": true + "name": "LengthUnit", + "modelAsString": true, + "values": [ + { + "name": "Unspecified", + "value": "Unspecified", + "description": "Unspecified length unit" + }, + { + "name": "Kilometer", + "value": "Kilometer", + "description": "Kilometer length unit" + }, + { + "name": "Hectometer", + "value": "Hectometer", + "description": "Hectometer length unit" + }, + { + "name": "Decameter", + "value": "Decameter", + "description": "Decameter length unit" + }, + { + "name": "Meter", + "value": "Meter", + "description": "Meter length unit" + }, + { + "name": "Decimeter", + "value": "Decimeter", + "description": "Decimeter length unit" + }, + { + "name": "Centimeter", + "value": "Centimeter", + "description": "Centimeter length unit" + }, + { + "name": "Millimeter", + "value": "Millimeter", + "description": "Millimeter length unit" + }, + { + "name": "Micrometer", + "value": "Micrometer", + "description": "Micrometer length unit" + }, + { + "name": "Nanometer", + "value": "Nanometer", + "description": "Nanometer length unit" + }, + { + "name": "Picometer", + "value": "Picometer", + "description": "Picometer length unit" + }, + { + "name": "Mile", + "value": "Mile", + "description": "Mile length unit" + }, + { + "name": "Yard", + "value": "Yard", + "description": "Yard length unit" + }, + { + "name": "Inch", + "value": "Inch", + "description": "Inch length unit" + }, + { + "name": "Foot", + "value": "Foot", + "description": "Foot length unit" + }, + { + "name": "LightYear", + "value": "LightYear", + "description": "Light year length unit" + }, + { + "name": "Pt", + "value": "Pt", + "description": "Point length unit" + } + ] } }, - "AnalyzeConversationSummarizationTask": { + "ListKey": { "type": "object", - "description": "Task definition for conversational summarization.", + "description": "The list key extra data kind.", "properties": { - "parameters": { - "$ref": "#/definitions/ConversationSummarizationTaskParameters" + "key": { + "type": "string", + "description": "The canonical form of the extracted entity." } }, "allOf": [ { - "$ref": "#/definitions/AnalyzeConversationLROTask" + "$ref": "#/definitions/BaseExtraInformation" } ], - "x-ms-discriminator-value": "ConversationalSummarizationTask" + "x-ms-discriminator-value": "ListKey" }, - "AnalyzeCustomConversationSummarizationTask": { + "LuisCallingOptions": { "type": "object", - "description": "Task definition for custom conversational summarization.", + "description": "This customizes how the service calls LUIS Generally Available projects.", "properties": { - "parameters": { - "$ref": "#/definitions/CustomConversationSummarizationTaskParameters" + "verbose": { + "type": "boolean", + "description": "Enable verbose response." + }, + "log": { + "type": "boolean", + "description": "Save log to add in training utterances later." + }, + "show-all-intents": { + "type": "boolean", + "description": "Set true to show all intents." + }, + "timezoneOffset": { + "type": "integer", + "format": "int32", + "description": "The timezone offset for the location of the request." + }, + "spellCheck": { + "type": "boolean", + "description": "Enable spell checking." + }, + "bing-spell-check-subscription-key": { + "type": "string", + "description": "The subscription key to use when enabling Bing spell check" + } + } + }, + "LuisParameters": { + "type": "object", + "description": "This is a set of request parameters for LUIS Generally Available projects.", + "properties": { + "query": { + "type": "string", + "description": "The utterance to predict.", + "maxLength": 500 + }, + "callingOptions": { + "$ref": "#/definitions/LuisCallingOptions", + "description": "This customizes how the service calls LUIS Generally Available projects." } }, "allOf": [ { - "$ref": "#/definitions/AnalyzeConversationLROTask" + "$ref": "#/definitions/AnalysisParameters" } ], - "x-ms-discriminator-value": "CustomConversationalSummarizationTask" + "x-ms-discriminator-value": "Luis" }, - "ConversationSummarizationTaskParametersBase": { + "LuisResult": { "type": "object", - "description": "Supported parameters for any conversational summarization task.", - "required": [ - "summaryAspects" - ], + "description": "It is the response from a LUIS Generally Available application.", + "additionalProperties": {} + }, + "LuisTargetIntentResult": { + "type": "object", + "description": "It is a wrap up of LUIS Generally Available response.", "properties": { - "summaryAspects": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "issue", - "resolution", - "chapterTitle", - "narrative", - "recap", - "follow-up tasks" - ], - "x-ms-enum": { - "name": "SummaryAspect", - "modelAsString": true, - "values": [ - { - "value": "issue", - "description": "A summary of issues in transcripts of web chats and service call transcripts between customer-service agents, and your customers." - }, - { - "value": "resolution", - "description": "A summary of resolutions in transcripts of web chats and service call transcripts between customer-service agents, and your customers." - }, - { - "value": "chapterTitle", - "description": "A chapter title of any conversation. It is usually one phrase or several phrases naturally combined together. Long conversation tends to have more chapters. The chapter boundary can be found from the summary context." - }, - { - "value": "narrative", - "description": "A generic narrative summary of any conversation. It generally converts the conversational language into formal written language, compresses the text length and keeps the salient information." - }, - { - "value": "recap", - "description": "A concise one-paragraph summary to provide a quick overview." - }, - { - "value": "follow-up tasks", - "description": "Action items and tasks that arose during a meeting. " - } - ] - } - } + "result": { + "$ref": "#/definitions/LuisResult", + "description": "The actual response from a LUIS Generally Available application." } }, "allOf": [ { - "$ref": "common.json#/definitions/AbstractiveSummarizationTaskParametersBase" + "$ref": "#/definitions/TargetIntentResult" } - ] + ], + "x-ms-discriminator-value": "Luis" }, - "ConversationSummarizationTaskParameters": { + "MetadataFilter": { "type": "object", - "description": "Supported parameters for pre-build conversational summarization task.", - "allOf": [ - { - "$ref": "common.json#/definitions/PreBuiltTaskParameters" + "description": "Find QnAs that are associated with the given list of metadata.", + "properties": { + "metadata": { + "type": "array", + "description": "List of metadata.", + "items": { + "$ref": "#/definitions/MetadataRecord" + }, + "x-ms-identifiers": [] }, - { - "$ref": "#/definitions/ConversationSummarizationTaskParametersBase" + "logicalOperation": { + "type": "string", + "description": "Operation used to join metadata filters.", + "default": "AND", + "enum": [ + "AND", + "OR" + ], + "x-ms-enum": { + "name": "LogicalOperationKind", + "modelAsString": true, + "values": [ + { + "name": "AND", + "value": "AND" + }, + { + "name": "OR", + "value": "OR" + } + ] + } } - ] + } }, - "CustomConversationSummarizationTaskParameters": { + "MetadataRecord": { "type": "object", - "description": "Supported parameters for a custom conversation summarization task.", - "allOf": [ - { - "$ref": "common.json#/definitions/CustomTaskParameters" + "description": "Object to provide the key value pair for each metadata.", + "properties": { + "key": { + "type": "string", + "description": "Metadata Key from Metadata dictionary used in the QnA." }, - { - "$ref": "#/definitions/ConversationSummarizationTaskParametersBase" + "value": { + "type": "string", + "description": "Metadata Value from Metadata dictionary used in the QnA." } + }, + "required": [ + "key", + "value" ] }, - "AnalyzeConversationSummarizationResult": { + "MultiLanguageConversationAnalysisInput": { "type": "object", - "description": "Result for the summarization task on the conversation.", + "description": "Multi Language Conversation Analysis Input", "properties": { - "results": { - "$ref": "#/definitions/SummaryResult" + "conversations": { + "type": "array", + "description": "Array of conversation items", + "items": { + "$ref": "#/definitions/Conversation" + } } }, - "allOf": [ - { - "$ref": "#/definitions/AnalyzeConversationJobResult" - } - ], "required": [ - "results" - ], - "x-ms-discriminator-value": "ConversationalSummarizationResults" + "conversations" + ] }, - "AnalyzeCustomConversationSummarizationResult": { + "NoneLinkedTargetIntentResult": { "type": "object", - "description": "Result for the custom summarization task on the conversation.", + "description": "A wrap up of non-linked intent response.", "properties": { - "results": { - "$ref": "#/definitions/CustomSummaryResult" + "result": { + "$ref": "#/definitions/ConversationResult", + "description": "The actual response from a Conversation project." } }, "allOf": [ { - "$ref": "#/definitions/AnalyzeConversationJobResult" + "$ref": "#/definitions/TargetIntentResult" } ], - "required": [ - "results" - ], - "x-ms-discriminator-value": "CustomConversationalSummarizationResults" + "x-ms-discriminator-value": "NonLinked" }, - "SummaryResultBase": { - "type": "object", - "required": [ - "conversations" + "NumberKind": { + "type": "string", + "description": "The type of the extracted number entity.", + "enum": [ + "Integer", + "Decimal", + "Power", + "Fraction", + "Percent", + "Unspecified" ], - "properties": { - "conversations": { - "type": "array", - "items": { - "$ref": "#/definitions/ConversationsSummaryResult" + "x-ms-enum": { + "name": "NumberKind", + "modelAsString": true, + "values": [ + { + "name": "Integer", + "value": "Integer", + "description": "Integer number" + }, + { + "name": "Decimal", + "value": "Decimal", + "description": "Decimal number" + }, + { + "name": "Power", + "value": "Power", + "description": "Power number" + }, + { + "name": "Fraction", + "value": "Fraction", + "description": "Fraction number" + }, + { + "name": "Percent", + "value": "Percent", + "description": "Percent number" + }, + { + "name": "Unspecified", + "value": "Unspecified", + "description": "Unspecified number kind" } - } + ] } }, - "SummaryResult": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/SummaryResultBase" - }, - { - "$ref": "common.json#/definitions/PreBuiltResult" - } - ] - }, - "CustomSummaryResult": { + "NumberResolution": { "type": "object", - "allOf": [ - { - "$ref": "#/definitions/SummaryResultBase" + "description": "A resolution for numeric entity instances.", + "properties": { + "numberKind": { + "$ref": "#/definitions/NumberKind", + "description": "The type of the extracted number entity." }, - { - "$ref": "common.json#/definitions/CustomResult" + "value": { + "type": "number", + "format": "double", + "description": "A numeric representation of what the extracted text denotes." } - ] - }, - "ConversationsSummaryResult": { - "type": "object", + }, "required": [ - "summaries" + "numberKind", + "value" ], - "properties": { - "summaries": { - "type": "array", - "items": { - "$ref": "#/definitions/SummaryResultItem" - } - } - }, "allOf": [ { - "$ref": "#/definitions/ConversationResultBase" + "$ref": "#/definitions/BaseResolution" } - ] + ], + "x-ms-discriminator-value": "NumberResolution" }, - "SummaryResultItem": { + "NumericRangeResolution": { "type": "object", + "description": "represents the resolution of numeric intervals.", "properties": { - "aspect": { - "type": "string" + "rangeKind": { + "$ref": "#/definitions/RangeKind", + "description": "The kind of range that the resolution object represents." }, - "text": { - "type": "string" + "minimum": { + "type": "number", + "format": "double", + "description": "The beginning value of the interval." }, - "contexts": { - "type": "array", - "description": "The context list of the summary.", - "items": { - "$ref": "#/definitions/ItemizedSummaryContext" - } + "maximum": { + "type": "number", + "format": "double", + "description": "The ending value of the interval." } }, "required": [ - "aspect", - "text" - ] - }, - "AnalyzeConversationalSentimentTask": { - "type": "object", - "description": "Task definition for a sentiment analysis in conversations.", - "properties": { - "parameters": { - "$ref": "#/definitions/ConversationalSentimentTaskParameters" - } - }, + "rangeKind", + "minimum", + "maximum" + ], "allOf": [ { - "$ref": "#/definitions/AnalyzeConversationLROTask" + "$ref": "#/definitions/BaseResolution" } ], - "x-ms-discriminator-value": "ConversationalSentimentTask" + "x-ms-discriminator-value": "NumericRangeResolution" }, - "ConversationalSentimentTaskParameters": { + "OrchestrationPrediction": { "type": "object", - "description": "Supported parameters for a Conversational sentiment analysis task.", + "description": "This represents the prediction result of an Orchestration project.", "properties": { - "predictionSource": { - "type": "string", - "description": "For transcript conversations, this parameter provides information regarding which content type should be used for sentiment analysis. The details of the sentiment analysis - like the offset, length and the text itself - will correspond to the text type selected here.", - "$ref": "#/definitions/TranscriptContentType" + "intents": { + "type": "object", + "description": "A dictionary that contains all intents. A key is an intent name and a value is its confidence score and target type. The top intent's value also contains the actual response from the target project.", + "additionalProperties": { + "$ref": "#/definitions/TargetIntentResult" + } } }, + "required": [ + "intents" + ], "allOf": [ { - "$ref": "common.json#/definitions/PreBuiltTaskParameters" + "$ref": "#/definitions/BasePrediction" } - ] + ], + "x-ms-discriminator-value": "Orchestration" }, - "AnalyzeConversationSentimentResult": { + "OrdinalResolution": { "type": "object", - "description": "Result from the sentiment analysis operation performed on a list of conversations.", - "allOf": [ - { - "$ref": "#/definitions/AnalyzeConversationJobResult" - } - ], + "description": "A resolution for ordinal numbers entity instances.", "properties": { - "results": { - "$ref": "#/definitions/ConversationSentimentResults" + "offset": { + "type": "string", + "description": "The offset with respect to the reference (e.g., offset = -1 indicates the second to last)" + }, + "relativeTo": { + "$ref": "#/definitions/RelativeTo", + "description": "The reference point that the ordinal number denotes." + }, + "value": { + "type": "string", + "description": "A simple arithmetic expression that the ordinal denotes." } }, "required": [ - "results" + "offset", + "relativeTo", + "value" ], - "x-ms-discriminator-value": "ConversationalSentimentResults" + "allOf": [ + { + "$ref": "#/definitions/BaseResolution" + } + ], + "x-ms-discriminator-value": "OrdinalResolution" }, - "ConversationSentimentResults": { + "QueryFilters": { "type": "object", - "description": "The result from sentiment analysis operation for each conversation.", - "required": [ - "conversations" - ], + "description": "filters over knowledge base.", "properties": { - "conversations": { - "type": "array", - "items": { - "allOf": [ + "metadataFilter": { + "$ref": "#/definitions/MetadataFilter", + "description": "filters over knowledge base." + }, + "sourceFilter": { + "$ref": "#/definitions/SourceFilter", + "description": "filters over knowledge base." + }, + "logicalOperation": { + "type": "string", + "description": "Logical operation used to join metadata filter with source filter.", + "default": "AND", + "enum": [ + "AND", + "OR" + ], + "x-ms-enum": { + "name": "LogicalOperationKind", + "modelAsString": true, + "values": [ { - "$ref": "#/definitions/ConversationSentimentResult" + "name": "AND", + "value": "AND" }, { - "$ref": "#/definitions/ConversationResultBase" + "name": "OR", + "value": "OR" } ] } } + } + }, + "QuestionAnsweringParameters": { + "type": "object", + "description": "This is a set of request parameters for Question Answering knowledge bases.", + "properties": { + "callingOptions": { + "$ref": "#/definitions/AnswersOptions", + "description": "The options sent to a Question Answering KB." + } }, "allOf": [ { - "$ref": "common.json#/definitions/PreBuiltResult" + "$ref": "#/definitions/AnalysisParameters" } - ] + ], + "x-ms-discriminator-value": "QuestionAnswering" }, - "ConversationSentimentResult": { + "QuestionAnsweringTargetIntentResult": { "type": "object", - "description": "The result from sentiment analysis operation for each conversation item.", - "required": [ - "conversationItems" - ], + "description": "It is a wrap up a Question Answering KB response.", "properties": { - "conversationItems": { - "description": "Enumeration of Sentiment operation results for all the conversation items in a conversation.", - "type": "array", - "items": { - "$ref": "#/definitions/ConversationSentimentItemResult" - } + "result": { + "$ref": "#/definitions/AnswersResult", + "description": "The generated answer by a Question Answering KB." + } + }, + "allOf": [ + { + "$ref": "#/definitions/TargetIntentResult" } + ], + "x-ms-discriminator-value": "QuestionAnswering" + }, + "RangeKind": { + "type": "string", + "description": "The kind of range that the resolution object represents.", + "enum": [ + "Number", + "Speed", + "Weight", + "Length", + "Volume", + "Area", + "Age", + "Information", + "Temperature", + "Currency" + ], + "x-ms-enum": { + "name": "RangeKind", + "modelAsString": true, + "values": [ + { + "name": "Number", + "value": "Number", + "description": "Number range" + }, + { + "name": "Speed", + "value": "Speed", + "description": "Speed range" + }, + { + "name": "Weight", + "value": "Weight", + "description": "Weight range" + }, + { + "name": "Length", + "value": "Length", + "description": "Length range" + }, + { + "name": "Volume", + "value": "Volume", + "description": "Volume range" + }, + { + "name": "Area", + "value": "Area", + "description": "Area range" + }, + { + "name": "Age", + "value": "Age", + "description": "Age range" + }, + { + "name": "Information", + "value": "Information", + "description": "Information range" + }, + { + "name": "Temperature", + "value": "Temperature", + "description": "Temperature range" + }, + { + "name": "Currency", + "value": "Currency", + "description": "Currency range" + } + ] } }, - "ConversationSentimentItemResult": { - "type": "object", - "required": [ - "id", - "participantId", - "sentiment", - "confidenceScores" + "RankerKind": { + "type": "string", + "description": "Type of ranker to be used", + "enum": [ + "Default", + "QuestionOnly" ], + "x-ms-enum": { + "name": "RankerKind", + "modelAsString": true, + "values": [ + { + "name": "Default", + "value": "Default", + "description": "Default ranker." + }, + { + "name": "QuestionOnly", + "value": "QuestionOnly", + "description": "Question only ranker." + } + ] + } + }, + "RedactedTranscriptContent": { + "type": "object", + "description": "Transcript content response that the service generates, with all necessary personally identifiable information redacted.", "properties": { - "id": { - "description": "The identifier for the conversation item", - "type": "string" - }, - "participantId": { - "description": "The identifier for the speaker", - "type": "string" + "itn": { + "type": "string", + "description": "Redacted output for input in inverse-text-normalized format." }, - "sentiment": { - "$ref": "common.json#/definitions/Sentiment" + "maskedItn": { + "type": "string", + "description": "Redacted output for input in masked inverse-text-normalized format." }, - "confidenceScores": { - "type": "object", - "$ref": "common.json#/definitions/SentimentConfidenceScores" - } - } - }, - "AnalyzeConversationJobState": { - "description": "Contains the status of the analyze conversations job submitted along with related statistics.", - "allOf": [ - { - "$ref": "common.json#/definitions/JobState" + "text": { + "type": "string", + "description": "Redacted output for input in text (Microsoft's speech-to-text 'display') format." }, - { - "$ref": "#/definitions/ConversationTasksState" + "lexical": { + "type": "string", + "description": "Redacted output for input in lexical format." }, - { - "$ref": "#/definitions/AnalyzeConversationJobStatistics" - } - ] - }, - "AnalyzeConversationJobStatistics": { - "description": "Contains the statistics for the job submitted.", - "properties": { - "statistics": { - "$ref": "#/definitions/ConversationRequestStatistics" - } - }, - "type": "object" - }, - "ConversationTasksState": { - "description": "Contains the state for the tasks being executed as part of the analyze conversation job submitted.", - "properties": { - "tasks": { - "properties": { - "completed": { - "description": "Count of tasks completed successfully.", - "type": "integer", - "format": "int32" - }, - "failed": { - "description": "Count of tasks that failed.", - "type": "integer", - "format": "int32" - }, - "inProgress": { - "description": "Count of tasks in progress currently.", - "type": "integer", - "format": "int32" - }, - "total": { - "description": "Total count of tasks submitted as part of the job.", - "type": "integer", - "format": "int32" - }, - "items": { - "description": "List of results from tasks (if available).", - "type": "array", - "items": { - "$ref": "#/definitions/AnalyzeConversationJobResult" - } - } + "audioTimings": { + "type": "array", + "description": "List of redacted audio segments.", + "items": { + "$ref": "#/definitions/AudioTiming" }, - "required": [ - "total", - "completed", - "failed", - "inProgress" - ], - "type": "object" + "x-ms-identifiers": [] } - }, - "required": [ - "tasks" - ], - "type": "object" + } }, - "AnalyzeConversationJobResult": { + "RegexKey": { "type": "object", - "description": "Container for results for all tasks in the conversation job.", - "discriminator": "kind", + "description": "The regex key extra data kind.", "properties": { - "kind": { - "$ref": "#/definitions/AnalyzeConversationResultsKind" + "key": { + "type": "string", + "description": "The key of the regex pattern used in extracting the entity." + }, + "regexPattern": { + "type": "string", + "description": "The .NET regex pattern used in extracting the entity. Please visit https://docs.microsoft.com/dotnet/standard/base-types/regular-expressions for more information about .NET regular expressions." } }, "allOf": [ { - "$ref": "common.json#/definitions/TaskState" - }, - { - "$ref": "common.json#/definitions/TaskIdentifier" + "$ref": "#/definitions/BaseExtraInformation" } ], - "required": [ - "kind" - ] + "x-ms-discriminator-value": "RegexKey" }, - "ConversationResultBase": { - "type": "object", - "description": "Shared attributes for all conversational task results.", - "required": [ - "id", - "warnings" + "RelativeTo": { + "type": "string", + "description": "The reference point that the ordinal number denotes.", + "enum": [ + "Current", + "End", + "Start" ], - "properties": { - "id": { - "type": "string", - "description": "Unique, non-empty conversation identifier." - }, - "warnings": { - "type": "array", - "description": "Warnings encountered while processing document.", - "items": { - "$ref": "common.json#/definitions/InputWarning" + "x-ms-enum": { + "name": "RelativeTo", + "modelAsString": true, + "values": [ + { + "name": "Current", + "value": "Current", + "description": "Current state" + }, + { + "name": "End", + "value": "End", + "description": "End state" + }, + { + "name": "Start", + "value": "Start", + "description": "Start state" } - }, - "statistics": { - "$ref": "#/definitions/ConversationStatistics" - } - } - }, - "ConversationStatistics": { - "type": "object", - "description": "If showStats=true was specified in the request this field will contain information about the conversation payload.", - "required": [ - "transactionsCount" - ], - "properties": { - "transactionsCount": { - "type": "integer", - "format": "int32", - "description": "Number of text units for the request." - } + ] } }, - "ConversationRequestStatistics": { + "RequestStatistics": { "type": "object", "description": "if showStats=true was specified in the request this field will contain information about the request payload.", - "required": [ - "conversationsCount", - "validConversationsCount", - "erroneousConversationsCount" - ], "properties": { - "conversationsCount": { + "documentsCount": { "type": "integer", "format": "int32", - "description": "Number of conversations submitted in the request." + "description": "Number of documents submitted in the request." }, - "validConversationsCount": { + "validDocumentsCount": { "type": "integer", "format": "int32", - "description": "Number of conversations documents. This excludes empty, over-size limit or non-supported languages documents." + "description": "Number of valid documents. This excludes empty, over-size limit or non-supported languages documents." }, - "erroneousConversationsCount": { + "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." } }, - "allOf": [ - { - "$ref": "common.json#/definitions/RequestStatistics" - } + "required": [ + "documentsCount", + "validDocumentsCount", + "erroneousDocumentsCount", + "transactionsCount" ] }, - "ConversationItemLevelTiming": { + "ResolutionKind": { + "type": "string", + "description": "The entity resolution object kind.", + "enum": [ + "BooleanResolution", + "DateTimeResolution", + "NumberResolution", + "OrdinalResolution", + "SpeedResolution", + "WeightResolution", + "LengthResolution", + "VolumeResolution", + "AreaResolution", + "AgeResolution", + "InformationResolution", + "TemperatureResolution", + "CurrencyResolution", + "NumericRangeResolution", + "TemporalSpanResolution" + ], + "x-ms-enum": { + "name": "ResolutionKind", + "modelAsString": true, + "values": [ + { + "name": "BooleanResolution", + "value": "BooleanResolution", + "description": "Resolution of a boolean entity" + }, + { + "name": "DateTimeResolution", + "value": "DateTimeResolution", + "description": "Resolution of a date/time entity" + }, + { + "name": "NumberResolution", + "value": "NumberResolution", + "description": "Resolution of a number entity" + }, + { + "name": "OrdinalResolution", + "value": "OrdinalResolution", + "description": "Resolution of an ordinal entity" + }, + { + "name": "SpeedResolution", + "value": "SpeedResolution", + "description": "Resolution of a speed entity" + }, + { + "name": "WeightResolution", + "value": "WeightResolution", + "description": "Resolution of a weight entity" + }, + { + "name": "LengthResolution", + "value": "LengthResolution", + "description": "Resolution of a length entity" + }, + { + "name": "VolumeResolution", + "value": "VolumeResolution", + "description": "Resolution of a volume entity" + }, + { + "name": "AreaResolution", + "value": "AreaResolution", + "description": "Resolution of an area entity" + }, + { + "name": "AgeResolution", + "value": "AgeResolution", + "description": "Resolution of an age entity" + }, + { + "name": "InformationResolution", + "value": "InformationResolution", + "description": "Resolution of an information entity" + }, + { + "name": "TemperatureResolution", + "value": "TemperatureResolution", + "description": "Resolution of a temperature entity" + }, + { + "name": "CurrencyResolution", + "value": "CurrencyResolution", + "description": "Resolution of a currency entity" + }, + { + "name": "NumericRangeResolution", + "value": "NumericRangeResolution", + "description": "Resolution of a numeric range entity" + }, + { + "name": "TemporalSpanResolution", + "value": "TemporalSpanResolution", + "description": "Resolution of a temporal span entity" + } + ] + } + }, + "SentimentConfidenceScores": { "type": "object", - "description": "The conversation item level audio timing.", - "allOf": [ - { - "$ref": "#/definitions/AudioTiming" + "description": "Represents the confidence scores between 0 and 1 across all sentiment classes: positive, neutral, negative.", + "properties": { + "positive": { + "type": "number", + "format": "double", + "description": "Confidence score for positive sentiment" + }, + "neutral": { + "type": "number", + "format": "double", + "description": "Confidence score for neutral sentiment" + }, + "negative": { + "type": "number", + "format": "double", + "description": "Confidence score for negative sentiment" } + }, + "required": [ + "positive", + "neutral", + "negative" ] }, - "ItemizedSummaryContext": { + "ShortAnswerOptions": { "type": "object", - "description": "The context of the summary with conversation item id.", - "required": [ - "conversationItemId" - ], + "description": "To configure Answer span prediction feature.", "properties": { - "conversationItemId": { - "type": "string", - "description": "Reference to the id of ConversationItem." - } - }, - "allOf": [ - { - "$ref": "common.json#/definitions/SummaryContext" + "enable": { + "type": "boolean", + "description": "Enable or disable Answer Span prediction.", + "default": true + }, + "confidenceScoreThreshold": { + "type": "number", + "format": "double", + "description": "Minimum threshold score required to include an answer span, value ranges from 0 to 1.", + "minimum": 0, + "maximum": 1 + }, + "topAnswersWithSpan": { + "type": "integer", + "format": "int32", + "description": "Number of Top answers to be considered for span prediction from 1 to 10.", + "minimum": 1, + "maximum": 10 } - ] - } - }, - "parameters": { - "ConversationAnalysisOptions": { - "name": "ConversationAnalysisOptions", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/ConversationAnalysisOptions" - }, - "description": "Post body of the request.", - "x-ms-parameter-location": "method" + } + }, + "SourceFilter": { + "type": "array", + "description": "Find QnAs that are associated with any of the given list of sources in knowledge base.", + "items": { + "type": "string" + } + }, + "SpeedResolution": { + "type": "object", + "description": "Represents the speed entity resolution model.", + "properties": { + "value": { + "type": "number", + "format": "double", + "description": "The numeric value that the extracted text denotes." + }, + "unit": { + "$ref": "#/definitions/SpeedUnit", + "description": "The speed Unit of measurement" + } + }, + "required": [ + "value", + "unit" + ], + "allOf": [ + { + "$ref": "#/definitions/BaseResolution" + } + ], + "x-ms-discriminator-value": "SpeedResolution" + }, + "SpeedUnit": { + "type": "string", + "description": "The speed Unit of measurement", + "enum": [ + "Unspecified", + "MetersPerSecond", + "KilometersPerHour", + "KilometersPerMinute", + "KilometersPerSecond", + "MilesPerHour", + "Knot", + "FootPerSecond", + "FootPerMinute", + "YardsPerMinute", + "YardsPerSecond", + "MetersPerMillisecond", + "CentimetersPerMillisecond", + "KilometersPerMillisecond" + ], + "x-ms-enum": { + "name": "SpeedUnit", + "modelAsString": true, + "values": [ + { + "name": "Unspecified", + "value": "Unspecified", + "description": "Unspecified speed unit" + }, + { + "name": "MetersPerSecond", + "value": "MetersPerSecond", + "description": "Meters per second speed unit" + }, + { + "name": "KilometersPerHour", + "value": "KilometersPerHour", + "description": "Kilometers per hour speed unit" + }, + { + "name": "KilometersPerMinute", + "value": "KilometersPerMinute", + "description": "Kilometers per minute speed unit" + }, + { + "name": "KilometersPerSecond", + "value": "KilometersPerSecond", + "description": "Kilometers per second speed unit" + }, + { + "name": "MilesPerHour", + "value": "MilesPerHour", + "description": "Miles per hour speed unit" + }, + { + "name": "Knot", + "value": "Knot", + "description": "Knot speed unit" + }, + { + "name": "FootPerSecond", + "value": "FootPerSecond", + "description": "Foot per second speed unit" + }, + { + "name": "FootPerMinute", + "value": "FootPerMinute", + "description": "Foot per minute speed unit" + }, + { + "name": "YardsPerMinute", + "value": "YardsPerMinute", + "description": "Yards per minute speed unit" + }, + { + "name": "YardsPerSecond", + "value": "YardsPerSecond", + "description": "Yards per second speed unit" + }, + { + "name": "MetersPerMillisecond", + "value": "MetersPerMillisecond", + "description": "Meters per millisecond speed unit" + }, + { + "name": "CentimetersPerMillisecond", + "value": "CentimetersPerMillisecond", + "description": "Centimeters per millisecond speed unit" + }, + { + "name": "KilometersPerMillisecond", + "value": "KilometersPerMillisecond", + "description": "Kilometers per millisecond speed unit" + } + ] + } + }, + "State": { + "type": "string", + "description": "The status of the task at the mentioned last update time.", + "enum": [ + "notStarted", + "running", + "succeeded", + "partiallyCompleted", + "failed", + "cancelled", + "cancelling" + ], + "x-ms-enum": { + "name": "State", + "modelAsString": true, + "values": [ + { + "name": "notStarted", + "value": "notStarted", + "description": "Not started state" + }, + { + "name": "running", + "value": "running", + "description": "Running state" + }, + { + "name": "succeeded", + "value": "succeeded", + "description": "Succeeded state" + }, + { + "name": "partiallyCompleted", + "value": "partiallyCompleted", + "description": "Partially completed state" + }, + { + "name": "failed", + "value": "failed", + "description": "Failed state" + }, + { + "name": "cancelled", + "value": "cancelled", + "description": "Cancelled state" + }, + { + "name": "cancelling", + "value": "cancelling", + "description": "Cancelling state" + } + ] + } + }, + "SummaryAspect": { + "type": "string", + "description": "Supported parameters for a conversational summarization task.", + "enum": [ + "issue", + "resolution", + "chapterTitle", + "narrative", + "recap", + "follow-up tasks" + ], + "x-ms-enum": { + "name": "SummaryAspect", + "modelAsString": true, + "values": [ + { + "name": "issue", + "value": "issue", + "description": "Summary of issues in transcripts of web chats and service calls between customer-service agents and customers." + }, + { + "name": "resolution", + "value": "resolution", + "description": "Summary of resolutions in transcripts of web chats and service calls between customer-service agents and customers." + }, + { + "name": "chapterTitle", + "value": "chapterTitle", + "description": "Chapter title of any conversation. It's usually one phrase or several phrases naturally combined. Long conversations tend to have more chapters. You can find the chapter boundary from the summary context." + }, + { + "name": "narrative", + "value": "narrative", + "description": "Generic narrative summary of any conversation. It generally converts the conversational language into formal written language, compresses the text length, and keeps the salient information." + }, + { + "name": "recap", + "value": "recap", + "description": "A concise one-paragraph summary to provide a quick overview." + }, + { + "name": "followUpTasks", + "value": "follow-up tasks", + "description": "Action items and tasks that arose during a meeting." + } + ] + } + }, + "SummaryLengthBucket": { + "type": "string", + "description": "Enum that defines the length of the output summaries.", + "enum": [ + "short", + "medium", + "long" + ], + "x-ms-enum": { + "name": "SummaryLengthBucket", + "modelAsString": true, + "values": [ + { + "name": "short", + "value": "short", + "description": "Instructs model to generate shorter length summaries." + }, + { + "name": "medium", + "value": "medium", + "description": "Instructs model to generate medium length summaries." + }, + { + "name": "long", + "value": "long", + "description": "Instructs model to generate longer length summaries." + } + ] + } + }, + "SummaryResult": { + "type": "object", + "description": "Summary Results", + "properties": { + "conversations": { + "type": "array", + "description": "array of conversations", + "items": { + "$ref": "#/definitions/ConversationsSummaryResult" + } + }, + "errors": { + "type": "array", + "description": "Errors by document id.", + "items": { + "$ref": "#/definitions/DocumentError" + } + }, + "statistics": { + "$ref": "#/definitions/RequestStatistics", + "description": "statistics" + }, + "modelVersion": { + "type": "string", + "description": "This field indicates which model is used for scoring." + } + }, + "required": [ + "conversations", + "errors", + "modelVersion" + ] + }, + "SummaryResultItem": { + "type": "object", + "description": "Summary Result Item", + "properties": { + "aspect": { + "type": "string", + "description": "aspect" + }, + "text": { + "type": "string", + "description": "text" + }, + "contexts": { + "type": "array", + "description": "Context list of the summary.", + "items": { + "$ref": "#/definitions/ItemizedSummaryContext" + }, + "x-ms-identifiers": [] + } + }, + "required": [ + "aspect", + "text" + ] + }, + "TargetIntentResult": { + "type": "object", + "description": "This is the base class of an intent prediction", + "properties": { + "targetProjectKind": { + "$ref": "#/definitions/targetProjectKind", + "description": "This is the base class of an intent prediction" + }, + "apiVersion": { + "type": "string", + "description": "The API version used to call a target service." + }, + "confidenceScore": { + "type": "number", + "format": "double", + "description": "The prediction score and it ranges from 0.0 to 1.0.", + "minimum": 0, + "maximum": 1 + } + }, + "discriminator": "targetProjectKind", + "required": [ + "targetProjectKind", + "confidenceScore" + ] + }, + "Tasks": { + "type": "object", + "description": "Contains the state for the tasks that are being executed as part of the submitted job for analyzing a conversation.", + "properties": { + "completed": { + "type": "integer", + "format": "int32", + "description": "Count of tasks that finished successfully." + }, + "failed": { + "type": "integer", + "format": "int32", + "description": "Count of tasks that failed." + }, + "inProgress": { + "type": "integer", + "format": "int32", + "description": "Count of tasks that are currently in progress." + }, + "total": { + "type": "integer", + "format": "int32", + "description": "Total count of tasks submitted as part of the job." + }, + "items": { + "type": "array", + "description": "List of results from tasks (if available).", + "items": { + "$ref": "#/definitions/AnalyzeConversationJobResult" + }, + "x-ms-identifiers": [] + } + }, + "required": [ + "completed", + "failed", + "inProgress", + "total" + ] + }, + "TemperatureResolution": { + "type": "object", + "description": "Represents the temperature entity resolution model.", + "properties": { + "value": { + "type": "number", + "format": "double", + "description": "The numeric value that the extracted text denotes." + }, + "unit": { + "$ref": "#/definitions/TemperatureUnit", + "description": "The temperature Unit of measurement." + } + }, + "required": [ + "value", + "unit" + ], + "allOf": [ + { + "$ref": "#/definitions/BaseResolution" + } + ], + "x-ms-discriminator-value": "TemperatureResolution" + }, + "TemperatureUnit": { + "type": "string", + "description": "The temperature Unit of measurement.", + "enum": [ + "Unspecified", + "Fahrenheit", + "Kelvin", + "Rankine", + "Celsius" + ], + "x-ms-enum": { + "name": "TemperatureUnit", + "modelAsString": true, + "values": [ + { + "name": "Unspecified", + "value": "Unspecified", + "description": "Unspecified temperature unit" + }, + { + "name": "Fahrenheit", + "value": "Fahrenheit", + "description": "Fahrenheit temperature unit" + }, + { + "name": "Kelvin", + "value": "Kelvin", + "description": "Kelvin temperature unit" + }, + { + "name": "Rankine", + "value": "Rankine", + "description": "Rankine temperature unit" + }, + { + "name": "Celsius", + "value": "Celsius", + "description": "Celsius temperature unit" + } + ] + } + }, + "TemporalModifier": { + "type": "string", + "description": "An optional modifier of a date/time instance.", + "enum": [ + "AfterApprox", + "Before", + "BeforeStart", + "Approx", + "ReferenceUndefined", + "SinceEnd", + "AfterMid", + "Start", + "After", + "BeforeEnd", + "Until", + "End", + "Less", + "Since", + "AfterStart", + "BeforeApprox", + "Mid", + "More" + ], + "x-ms-enum": { + "name": "TemporalModifier", + "modelAsString": true, + "values": [ + { + "name": "AfterApprox", + "value": "AfterApprox", + "description": "AfterApprox temporal modifier" + }, + { + "name": "Before", + "value": "Before", + "description": "Before temporal modifier" + }, + { + "name": "BeforeStart", + "value": "BeforeStart", + "description": "BeforeStart temporal modifier" + }, + { + "name": "Approx", + "value": "Approx", + "description": "Approx temporal modifier" + }, + { + "name": "ReferenceUndefined", + "value": "ReferenceUndefined", + "description": "ReferenceUndefined temporal modifier" + }, + { + "name": "SinceEnd", + "value": "SinceEnd", + "description": "SinceEnd temporal modifier" + }, + { + "name": "AfterMid", + "value": "AfterMid", + "description": "AfterMid temporal modifier" + }, + { + "name": "Start", + "value": "Start", + "description": "Start temporal modifier" + }, + { + "name": "After", + "value": "After", + "description": "After temporal modifier" + }, + { + "name": "BeforeEnd", + "value": "BeforeEnd", + "description": "BeforeEnd temporal modifier" + }, + { + "name": "Until", + "value": "Until", + "description": "Until temporal modifier" + }, + { + "name": "End", + "value": "End", + "description": "End temporal modifier" + }, + { + "name": "Less", + "value": "Less", + "description": "Less temporal modifier" + }, + { + "name": "Since", + "value": "Since", + "description": "Since temporal modifier" + }, + { + "name": "AfterStart", + "value": "AfterStart", + "description": "AfterStart temporal modifier" + }, + { + "name": "BeforeApprox", + "value": "BeforeApprox", + "description": "BeforeApprox temporal modifier" + }, + { + "name": "Mid", + "value": "Mid", + "description": "Mid temporal modifier" + }, + { + "name": "More", + "value": "More", + "description": "More temporal modifier" + } + ] + } + }, + "TemporalSpanResolution": { + "type": "object", + "description": "represents the resolution of a date and/or time span.", + "properties": { + "begin": { + "type": "string", + "description": "represents the resolution of a date and/or time span. An extended ISO 8601 date/time representation as described in (https://github.com/Microsoft/Recognizers-Text/blob/master/Patterns/English/English-DateTime.yaml)" + }, + "end": { + "type": "string", + "description": "represents the resolution of a date and/or time span. An extended ISO 8601 date/time representation as described in (https://github.com/Microsoft/Recognizers-Text/blob/master/Patterns/English/English-DateTime.yaml)" + }, + "duration": { + "type": "string", + "description": "An optional duration value formatted based on the ISO 8601 (https://en.wikipedia.org/wiki/ISO_8601#Durations)" + }, + "modifier": { + "$ref": "#/definitions/TemporalModifier", + "description": "An optional modifier of a date/time instance." + }, + "timex": { + "type": "string", + "description": "An optional triplet containing the beginning, the end, and the duration all stated as ISO 8601 formatted strings." + } + }, + "allOf": [ + { + "$ref": "#/definitions/BaseResolution" + } + ], + "x-ms-discriminator-value": "TemporalSpanResolution" + }, + "TextConversation": { + "type": "object", + "description": "model for text conversation", + "properties": { + "conversationItems": { + "type": "array", + "description": "Ordered list of text conversation items in the conversation.", + "items": { + "$ref": "#/definitions/TextConversationItem" + } + } + }, + "required": [ + "conversationItems" + ], + "allOf": [ + { + "$ref": "#/definitions/Conversation" + } + ], + "x-ms-discriminator-value": "text" + }, + "TextConversationItem": { + "type": "object", + "description": "The text modality of an input conversation.", + "properties": { + "id": { + "type": "string", + "description": "The ID of a conversation item." + }, + "participantId": { + "type": "string", + "description": "The participant ID of a conversation item." + }, + "language": { + "type": "string", + "description": "The override language of a conversation item in BCP 47 language representation." + }, + "modality": { + "$ref": "#/definitions/InputModality", + "description": "Enumeration of supported conversational modalities." + }, + "role": { + "$ref": "#/definitions/role", + "description": "Role of the participant." + }, + "text": { + "type": "string", + "description": "The text input" + } + }, + "required": [ + "id", + "participantId", + "text" + ] + }, + "TextSentiment": { + "type": "string", + "description": "Predicted sentiment", + "enum": [ + "positive", + "neutral", + "negative", + "mixed" + ], + "x-ms-enum": { + "name": "TextSentiment", + "modelAsString": true, + "values": [ + { + "name": "positive", + "value": "positive", + "description": "Positive statement" + }, + { + "name": "neutral", + "value": "neutral", + "description": "Neutral statement" + }, + { + "name": "negative", + "value": "negative", + "description": "Negative statement" + }, + { + "name": "mixed", + "value": "mixed", + "description": "Mixed statement" + } + ] + } + }, + "TranscriptContentType": { + "type": "string", + "description": "Enumeration of supported transcript content types.", + "enum": [ + "lexical", + "itn", + "maskedItn", + "text" + ], + "x-ms-enum": { + "name": "TranscriptContentType", + "modelAsString": true, + "values": [ + { + "name": "lexical", + "value": "lexical", + "description": "Lexical content type" + }, + { + "name": "itn", + "value": "itn", + "description": "ITN content type" + }, + { + "name": "maskedItn", + "value": "maskedItn", + "description": "Masked ITN content type" + }, + { + "name": "text", + "value": "text", + "description": "Text content type" + } + ] + } + }, + "TranscriptConversation": { + "type": "object", + "description": "model for transcript conversation", + "properties": { + "conversationItems": { + "type": "array", + "description": "Ordered list of transcript conversation items in the conversation.", + "items": { + "$ref": "#/definitions/TranscriptConversationItem" + } + } + }, + "required": [ + "conversationItems" + ], + "allOf": [ + { + "$ref": "#/definitions/Conversation" + } + ], + "x-ms-discriminator-value": "transcript" + }, + "TranscriptConversationItem": { + "type": "object", + "description": "Additional properties for supporting transcript conversation.", + "properties": { + "id": { + "type": "string", + "description": "The ID of a conversation item." + }, + "participantId": { + "type": "string", + "description": "The participant ID of a conversation item." + }, + "language": { + "type": "string", + "description": "The override language of a conversation item in BCP 47 language representation." + }, + "modality": { + "$ref": "#/definitions/InputModality", + "description": "Enumeration of supported conversational modalities." + }, + "role": { + "$ref": "#/definitions/role", + "description": "Role of the participant." + }, + "itn": { + "type": "string", + "description": "Inverse text normalization (ITN) representation of input. The inverse-text-normalized form is the recognized text from Microsoft's speech-to-text API, with phone numbers, numbers, abbreviations, and other transformations applied." + }, + "maskedItn": { + "type": "string", + "description": "Inverse-text-normalized format with profanity masking applied." + }, + "text": { + "type": "string", + "description": "Display form of the recognized text from the speech-to-text API, with punctuation and capitalization added." + }, + "lexical": { + "type": "string", + "description": "Lexical form of the recognized text from the speech-to-text API, with the actual words recognized." + }, + "wordLevelTimings": { + "type": "array", + "description": "List of word-level audio timing information.", + "items": { + "$ref": "#/definitions/WordLevelTiming" + }, + "x-ms-identifiers": [] + }, + "conversationItemLevelTiming": { + "$ref": "#/definitions/ConversationItemLevelTiming", + "description": "Audio timing at the conversation item level. This still can help with AI quality if word-level audio timings are not available." + } + }, + "required": [ + "id", + "participantId", + "itn", + "maskedItn", + "text", + "lexical" + ] + }, + "VolumeResolution": { + "type": "object", + "description": "Represents the volume entity resolution model.", + "properties": { + "value": { + "type": "number", + "format": "double", + "description": "The numeric value that the extracted text denotes." + }, + "unit": { + "$ref": "#/definitions/VolumeUnit", + "description": "The Volume Unit of measurement" + } + }, + "required": [ + "value", + "unit" + ], + "allOf": [ + { + "$ref": "#/definitions/BaseResolution" + } + ], + "x-ms-discriminator-value": "VolumeResolution" + }, + "VolumeUnit": { + "type": "string", + "description": "The Volume Unit of measurement", + "enum": [ + "Unspecified", + "CubicMeter", + "CubicCentimeter", + "CubicMillimeter", + "Hectoliter", + "Decaliter", + "Liter", + "Centiliter", + "Milliliter", + "CubicYard", + "CubicInch", + "CubicFoot", + "CubicMile", + "FluidOunce", + "Teaspoon", + "Tablespoon", + "Pint", + "Quart", + "Cup", + "Gill", + "Pinch", + "FluidDram", + "Barrel", + "Minim", + "Cord", + "Peck", + "Bushel", + "Hogshead" + ], + "x-ms-enum": { + "name": "VolumeUnit", + "modelAsString": true, + "values": [ + { + "name": "Unspecified", + "value": "Unspecified", + "description": "Unspecified volume unit." + }, + { + "name": "CubicMeter", + "value": "CubicMeter", + "description": "Volume unit in cubic meters." + }, + { + "name": "CubicCentimeter", + "value": "CubicCentimeter", + "description": "Volume unit in cubic centimeters." + }, + { + "name": "CubicMillimeter", + "value": "CubicMillimeter", + "description": "Volume unit in cubic millimeters." + }, + { + "name": "Hectoliter", + "value": "Hectoliter", + "description": "Volume unit in hectoliters." + }, + { + "name": "Decaliter", + "value": "Decaliter", + "description": "Volume unit in decaliters." + }, + { + "name": "Liter", + "value": "Liter", + "description": "Volume unit in liters." + }, + { + "name": "Centiliter", + "value": "Centiliter", + "description": "Volume unit in centiliters." + }, + { + "name": "Milliliter", + "value": "Milliliter", + "description": "Volume unit in milliliters." + }, + { + "name": "CubicYard", + "value": "CubicYard", + "description": "Volume unit in cubic yards." + }, + { + "name": "CubicInch", + "value": "CubicInch", + "description": "Volume unit in cubic inches." + }, + { + "name": "CubicFoot", + "value": "CubicFoot", + "description": "Volume unit in cubic feet." + }, + { + "name": "CubicMile", + "value": "CubicMile", + "description": "Volume unit in cubic miles." + }, + { + "name": "FluidOunce", + "value": "FluidOunce", + "description": "Volume unit in fluid ounces." + }, + { + "name": "Teaspoon", + "value": "Teaspoon", + "description": "Volume unit in teaspoons." + }, + { + "name": "Tablespoon", + "value": "Tablespoon", + "description": "Volume unit in tablespoons." + }, + { + "name": "Pint", + "value": "Pint", + "description": "Volume unit in pints." + }, + { + "name": "Quart", + "value": "Quart", + "description": "Volume unit in quarts." + }, + { + "name": "Cup", + "value": "Cup", + "description": "Volume unit in cups." + }, + { + "name": "Gill", + "value": "Gill", + "description": "Volume unit in gills." + }, + { + "name": "Pinch", + "value": "Pinch", + "description": "Volume unit in pinches." + }, + { + "name": "FluidDram", + "value": "FluidDram", + "description": "Volume unit in fluid drams." + }, + { + "name": "Barrel", + "value": "Barrel", + "description": "Volume unit in barrels." + }, + { + "name": "Minim", + "value": "Minim", + "description": "Volume unit in minims." + }, + { + "name": "Cord", + "value": "Cord", + "description": "Volume unit in cords." + }, + { + "name": "Peck", + "value": "Peck", + "description": "Volume unit in pecks." + }, + { + "name": "Bushel", + "value": "Bushel", + "description": "Volume unit in bushels." + }, + { + "name": "Hogshead", + "value": "Hogshead", + "description": "Volume unit in hogsheads." + } + ] + } + }, + "WeightResolution": { + "type": "object", + "description": "Represents the weight entity resolution model.", + "properties": { + "value": { + "type": "number", + "format": "double", + "description": "The numeric value that the extracted text denotes." + }, + "unit": { + "$ref": "#/definitions/WeightUnit", + "description": "The weight Unit of measurement." + } + }, + "required": [ + "value", + "unit" + ], + "allOf": [ + { + "$ref": "#/definitions/BaseResolution" + } + ], + "x-ms-discriminator-value": "WeightResolution" + }, + "WeightUnit": { + "type": "string", + "description": "The weight Unit of measurement.", + "enum": [ + "Unspecified", + "Kilogram", + "Gram", + "Milligram", + "Gallon", + "MetricTon", + "Ton", + "Pound", + "Ounce", + "Grain", + "PennyWeight", + "LongTonBritish", + "ShortTonUS", + "ShortHundredWeightUS", + "Stone", + "Dram" + ], + "x-ms-enum": { + "name": "WeightUnit", + "modelAsString": true, + "values": [ + { + "name": "Unspecified", + "value": "Unspecified", + "description": "Unspecified weight unit" + }, + { + "name": "Kilogram", + "value": "Kilogram", + "description": "Weight unit in kilograms" + }, + { + "name": "Gram", + "value": "Gram", + "description": "Weight unit in grams" + }, + { + "name": "Milligram", + "value": "Milligram", + "description": "Weight unit in milligrams" + }, + { + "name": "Gallon", + "value": "Gallon", + "description": "Volume unit in gallons" + }, + { + "name": "MetricTon", + "value": "MetricTon", + "description": "Weight unit in metric tons" + }, + { + "name": "Ton", + "value": "Ton", + "description": "Weight unit in tons" + }, + { + "name": "Pound", + "value": "Pound", + "description": "Weight unit in pounds" + }, + { + "name": "Ounce", + "value": "Ounce", + "description": "Weight unit in ounces" + }, + { + "name": "Grain", + "value": "Grain", + "description": "Weight unit in grains" + }, + { + "name": "PennyWeight", + "value": "PennyWeight", + "description": "Weight unit in pennyweights" + }, + { + "name": "LongTonBritish", + "value": "LongTonBritish", + "description": "Weight unit in long tons (British)" + }, + { + "name": "ShortTonUS", + "value": "ShortTonUS", + "description": "Weight unit in short tons (US)" + }, + { + "name": "ShortHundredWeightUS", + "value": "ShortHundredWeightUS", + "description": "Weight unit in short hundredweights (US)" + }, + { + "name": "Stone", + "value": "Stone", + "description": "Weight unit in stones" + }, + { + "name": "Dram", + "value": "Dram", + "description": "Weight unit in drams" + } + ] + } + }, + "WordLevelTiming": { + "type": "object", + "description": "Word-level timing information that the speech-to-text API generates. The words in this object should have 1:1 correspondence with the lexical input to allow for audio redaction.", + "properties": { + "offset": { + "type": "integer", + "format": "int64", + "description": "Offset from the start of speech audio, in ticks. 1 tick = 100 nanoseconds." + }, + "duration": { + "type": "integer", + "format": "int64", + "description": "Duration of word articulation, in ticks. 1 tick = 100 nanoseconds." + }, + "word": { + "type": "string", + "description": "Recognized word." + } + } + }, + "projectKind": { + "type": "string", + "description": "The type of the project.", + "enum": [ + "Conversation", + "Orchestration" + ], + "x-ms-enum": { + "name": "projectKind", + "modelAsString": true, + "values": [ + { + "name": "Conversation", + "value": "Conversation", + "description": "Conversation type" + }, + { + "name": "Orchestration", + "value": "Orchestration", + "description": "Orchestration type" + } + ] + } + }, + "role": { + "type": "string", + "description": "Role of the participant.", + "enum": [ + "customer", + "agent", + "generic" + ], + "x-ms-enum": { + "name": "role", + "modelAsString": true, + "values": [ + { + "name": "customer", + "value": "customer", + "description": "The participant is a customer." + }, + { + "name": "agent", + "value": "agent", + "description": "The participant is an agent." + }, + { + "name": "generic", + "value": "generic", + "description": "The is a generic participant." + } + ] + } + }, + "targetProjectKind": { + "type": "string", + "description": "The type of a target service.", + "enum": [ + "Luis", + "Conversation", + "QuestionAnswering", + "NonLinked" + ], + "x-ms-enum": { + "name": "targetProjectKind", + "modelAsString": true, + "values": [ + { + "name": "Luis", + "value": "Luis", + "description": "Luis target service type" + }, + { + "name": "Conversation", + "value": "Conversation", + "description": "Conversation target service type" + }, + { + "name": "QuestionAnswering", + "value": "QuestionAnswering", + "description": "QuestionAnswering target service type" + }, + { + "name": "NonLinked", + "value": "NonLinked", + "description": "NonLinked target service type" + } + ] + } + } + }, + "parameters": { + "Azure.Core.Foundations.ApiVersionParameter": { + "name": "api-version", + "in": "query", + "description": "The API version to use for this operation.", + "required": true, + "type": "string", + "minLength": 1, + "x-ms-parameter-location": "method", + "x-ms-client-name": "apiVersion" } } } diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/analyzetext.json b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/analyzetext.json index b4a2d5521094..ab66eba4e874 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/analyzetext.json +++ b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/analyzetext.json @@ -2,193 +2,199 @@ "swagger": "2.0", "info": { "title": "Microsoft Cognitive Language Service - Text Analysis", - "description": "The language service API is a suite of natural language processing (NLP) skills 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, language detection and question answering. Further documentation can be found in https://docs.microsoft.com/azure/cognitive-services/language-service/overview.", - "version": "2023-11-15-preview" - }, - "securityDefinitions": { - "AADToken": { - "type": "oauth2", - "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", - "flow": "implicit", - "description": "These are the [Azure Active Directory OAuth2](https://docs.microsoft.com/azure/active-directory/develop/v1-overview) Flows. When paired with [Azure role-based access](https://docs.microsoft.com/azure/role-based-access-control/overview) control it can be used to control access to Azure Maps REST APIs. Azure role-based access controls are used to designate access to one or more Azure Maps resource account or sub-resources. Any user, group, or service principal can be granted access via a built-in role or a custom role composed of one or more permissions to Azure Maps REST APIs.\n\nTo implement scenarios, we recommend viewing [authentication concepts](https://aka.ms/amauth). In summary, this security definition provides a solution for modeling application(s) via objects capable of access control on specific APIs and scopes.\n\n#### Notes\n* This security definition **requires** the use of the `x-ms-client-id` header to indicate which Azure Maps resource the application is requesting access to. This can be acquired from the [Maps management API](https://aka.ms/amauthdetails).\n* \nThe `Authorization URL` is specific to the Azure public cloud instance. Sovereign clouds have unique Authorization URLs and Azure Active directory configurations. \n* \nThe Azure role-based access control is configured from the [Azure management plane](https://aka.ms/amrbac) via Azure portal, PowerShell, CLI, Azure SDKs, or REST APIs.\n* \nUsage of the [Azure Maps Web SDK](https://aka.ms/amaadmc) allows for configuration based setup of an application for multiple use cases.\n* Currently, Azure Active Directory [v1.0 or v2.0](https://docs.microsoft.com/azure/active-directory/develop/azure-ad-endpoint-comparison) supports Work, School, and Guests but does not support Personal accounts.", - "scopes": { - "https://cognitiveservices.azure.com/.default": "https://cognitiveservices.azure.com/.default" + "version": "2023-11-15-preview", + "description": "The language service API is a suite of natural language processing (NLP) skills 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, language detection and question answering. Further documentation can be found in https://docs.microsoft.com/azure/cognitive-services/language-service/overview.0", + "x-typespec-generated": [ + { + "emitter": "@azure-tools/typespec-autorest" } - }, - "apim_key": { - "type": "apiKey", - "description": "A subscription key for a Language service resource.", - "name": "Ocp-Apim-Subscription-Key", - "in": "header" - } + ] }, - "security": [ - { - "AADToken": [ - "https://cognitiveservices.azure.com/.default" - ] - }, - { - "apim_key": [] - } + "schemes": [ + "https" ], "x-ms-parameterized-host": { "hostTemplate": "{Endpoint}/language", "useSchemePrefix": false, "parameters": [ { - "$ref": "common.json#/parameters/Endpoint" + "name": "Endpoint", + "in": "path", + "description": "Supported Cognitive Services endpoint (e.g., https://.api.cognitiveservices.azure.com).", + "required": true, + "type": "string" } ] }, + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ], + "security": [ + { + "ApiKeyAuth": [] + } + ], + "securityDefinitions": { + "ApiKeyAuth": { + "type": "apiKey", + "name": "Ocp-Apim-Subscription-Key", + "in": "header" + } + }, + "tags": [], "paths": { "/:analyze-text": { "post": { - "summary": "Request text analysis over a collection of documents.", - "description": "Submit a collection of text documents for analysis. Specify a single unique task to be executed immediately.", "operationId": "AnalyzeText", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], + "description": "Request text analysis over a collection of documents.", "parameters": [ { - "$ref": "common.json#/parameters/ApiVersionParameter" + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { - "$ref": "common.json#/parameters/ShowStats" + "name": "showStats", + "in": "query", + "description": "(Optional) if set to true, response will contain request and document level statistics.", + "required": false, + "type": "boolean" }, { - "description": "Collection of documents to analyze and a single task to execute.", - "in": "body", "name": "body", + "in": "body", + "required": true, "schema": { "$ref": "#/definitions/AnalyzeTextTask" - }, - "required": true + } } ], "responses": { "200": { - "description": "A successful call result", + "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/AnalyzeTextTaskResult" } }, "default": { - "description": "Unexpected error", + "description": "An unexpected error response.", "schema": { - "$ref": "common.json#/definitions/ErrorResponse" + "$ref": "#/definitions/ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } } } }, "x-ms-examples": { - "Successful Entity Linking Request": { - "$ref": "./examples/text/SuccessfulEntityLinkingRequest.json" + "SuccessfulDynamicClassificationRequest": { + "$ref": "./examples/SuccessfulDynamicClassificationRequest.json" }, - "Successful Entity Recognition Request": { - "$ref": "./examples/text/SuccessfulEntityRecognitionRequest.json" + "SuccessfulEntityLinkingRequest": { + "$ref": "./examples/SuccessfulEntityLinkingRequest.json" }, - "Successful Entity Recognition Inclusion Request": { - "$ref": "./examples/text/SuccessfulEntityRecognitionInclusionRequest.json" + "SuccessfulEntityRecognitionExclusionRequest": { + "$ref": "./examples/SuccessfulEntityRecognitionExclusionRequest.json" }, - "Successful Entity Recognition Exclusion Request": { - "$ref": "./examples/text/SuccessfulEntityRecognitionExclusionRequest.json" + "SuccessfulEntityRecognitionInclusionRequest": { + "$ref": "./examples/SuccessfulEntityRecognitionInclusionRequest.json" }, - "Successful Entity Recognition Overlap Policy Request": { - "$ref": "./examples/text/SuccessfulEntityRecognitionOverlapPolicy.json" + "SuccessfulEntityRecognitionInferenceOptionsRequest": { + "$ref": "./examples/SuccessfulEntityRecognitionInferenceOptionsRequest.json" }, - "Successful Entity Recognition InferenceOptions Request": { - "$ref": "./examples/text/SuccessfulEntityRecognitionInferenceOptionsRequest.json" + "SuccessfulEntityRecognitionOverlapPolicy": { + "$ref": "./examples/SuccessfulEntityRecognitionOverlapPolicy.json" }, - "Successful Key Phrase Extraction Request": { - "$ref": "./examples/text/SuccessfulKeyPhraseExtractionRequest.json" + "SuccessfulEntityRecognitionRequest": { + "$ref": "./examples/SuccessfulEntityRecognitionRequest.json" }, - "Successful PII Entity Recognition Request": { - "$ref": "./examples/text/SuccessfulPiiEntityRecognitionRequest.json" + "SuccessfulKeyPhraseExtractionRequest": { + "$ref": "./examples/SuccessfulKeyPhraseExtractionRequest.json" }, - "Successful PII Entity Recognition Redaction Request": { - "$ref": "./examples/text/SuccessfulPiiEntityRecognitionRedactionRequest.json" + "SuccessfulLanguageDetectionRequest": { + "$ref": "./examples/SuccessfulLanguageDetectionRequest.json" }, - "Successful PII Entity Recognition Exclusion Request": { - "$ref": "./examples/text/SuccessfulPiiEntityRecognitionExclusionRequest.json" + "SuccessfulPiiEntityRecognitionExclusionRequest": { + "$ref": "./examples/SuccessfulPiiEntityRecognitionExclusionRequest.json" }, - "Successful Language Detection Request": { - "$ref": "./examples/text/SuccessfulLanguageDetectionRequest.json" + "SuccessfulPiiEntityRecognitionRedactionRequest": { + "$ref": "./examples/SuccessfulPiiEntityRecognitionRedactionRequest.json" }, - "Successful Sentiment Analysis Request": { - "$ref": "./examples/text/SuccessfulSentimentAnalysisRequest.json" + "SuccessfulPiiEntityRecognitionRequest": { + "$ref": "./examples/SuccessfulPiiEntityRecognitionRequest.json" }, - "Successful Dynamic Classification Request": { - "$ref": "./examples/text/SuccessfuDynamicClassificationRequest.json" + "SuccessfulSentimentAnalysisRequest": { + "$ref": "./examples/SuccessfulSentimentAnalysisRequest.json" } } } }, "/analyze-text/jobs": { "post": { - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], + "operationId": "AnalyzeTextSubmitJob", "description": "Submit a collection of text documents for analysis. Specify one or more unique tasks to be executed as a long-running operation.", - "operationId": "AnalyzeText_SubmitJob", - "summary": "Submit text analysis job", "parameters": [ { - "$ref": "common.json#/parameters/ApiVersionParameter" + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { - "description": "Collection of documents to analyze and one or more tasks to execute.", - "in": "body", "name": "body", + "in": "body", + "required": true, "schema": { "$ref": "#/definitions/AnalyzeTextJobsInput" - }, - "required": true + } } ], "responses": { "202": { - "description": "A successful call results with an Operation-Location header used to check the status of the analysis job.", + "description": "The request has been accepted for processing, but processing has not yet completed.", "headers": { "Operation-Location": { - "type": "string" + "type": "string", + "format": "uri", + "description": "The location for monitoring the operation state." } } }, "default": { - "description": "Error response.", + "description": "An unexpected error response.", "schema": { - "$ref": "common.json#/definitions/ErrorResponse" + "$ref": "#/definitions/ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } } } }, "x-ms-examples": { - "Successful Submit Analysis Job Request": { - "$ref": "./examples/text/SuccessfulAnalyzeTextJobsMultipleTaskSubmitRequest.json" + "SuccessfulAbstractiveSummarizationTaskSubmit": { + "$ref": "./examples/SuccessfulAbstractiveSummarizationTaskSubmit.json" }, - "Successful Healthcare Post Request": { - "$ref": "./examples/text/SuccessfulHealthcarePostRequest.json" + "SuccessfulAnalyzeTextJobsMultipleTaskSubmitRequest": { + "$ref": "./examples/SuccessfulAnalyzeTextJobsMultipleTaskSubmitRequest.json" }, - "Successful Custom Healthcare Post Request": { - "$ref": "./examples/text/SuccessfulCustomHealthcarePostRequest.json" + "SuccessfulCustomAbstractiveSummarizationTaskSubmit": { + "$ref": "./examples/SuccessfulCustomAbstractiveSummarizationTaskSubmit.json" }, - "Successful Submit Abstractive Summarization Task": { - "$ref": "./examples/text/SuccessfulAbstractiveSummarizationTaskSubmit.json" + "SuccessfulCustomHealthcarePostRequest": { + "$ref": "./examples/SuccessfulCustomHealthcarePostRequest.json" }, - "Successful Submit Custom Abstractive Summarization Task": { - "$ref": "./examples/text/SuccessfulCustomAbstractiveSummarizationTaskSubmit.json" + "SuccessfulCustomSentimentAnalysisTaskSubmit": { + "$ref": "./examples/SuccessfulCustomSentimentAnalysisTaskSubmit.json" }, - "Successful Healthcare DocumentType Post Request": { - "$ref": "./examples/text/SuccessfulHealthcareDocumentTypePostRequest.json" + "SuccessfulHealthcareDocumentTypePostRequest": { + "$ref": "./examples/SuccessfulHealthcareDocumentTypePostRequest.json" }, - "Successful Custom Sentiment Analysis Post Request": { - "$ref": "./examples/text/SuccessfulCustomSentimentAnalysisTaskSubmit.json" + "SuccessfulHealthcarePostRequest": { + "$ref": "./examples/SuccessfulHealthcarePostRequest.json" } }, "x-ms-long-running-operation": true @@ -196,103 +202,135 @@ }, "/analyze-text/jobs/{jobId}": { "get": { - "produces": [ - "application/json" - ], - "description": "Get the status of an analysis job. A job may consist of one or more tasks. Once all tasks are succeeded, the job will transition to the succeeded state and results will be available for each task.", - "operationId": "AnalyzeText_JobStatus", + "operationId": "AnalyzeTextJobStatus", "summary": "Get analysis status and results", + "description": "Get the status of an analysis job. A job can consist of one or more tasks. After all tasks succeed, the job transitions to the succeeded state and results are available for each task.", "parameters": [ { - "$ref": "common.json#/parameters/ApiVersionParameter" + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { - "$ref": "common.json#/parameters/JobId" + "name": "jobId", + "in": "path", + "description": "job ID", + "required": true, + "type": "string", + "format": "uuid" }, { - "$ref": "common.json#/parameters/ShowStats" + "name": "showStats", + "in": "query", + "description": "(Optional) if set to true, response will contain request and document level statistics.", + "required": false, + "type": "boolean" }, { - "$ref": "common.json#/parameters/TopParameter" + "name": "top", + "in": "query", + "description": "The maximum number of resources to return from the collection.", + "required": false, + "type": "integer", + "format": "int32" }, { - "$ref": "common.json#/parameters/SkipParameter" + "name": "skip", + "in": "query", + "description": "An offset into the collection of the first resource to be returned.", + "required": false, + "type": "integer", + "format": "int32" } ], "responses": { "200": { - "description": "Analysis job status and metadata.", + "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/AnalyzeTextJobState" } }, "default": { - "description": "Unexpected error", + "description": "An unexpected error response.", "schema": { - "$ref": "common.json#/definitions/ErrorResponse" + "$ref": "#/definitions/ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } } } }, "x-ms-examples": { - "Successful Get Text Analysis Job Status Request": { - "$ref": "./examples/text/SuccessfulAnalyzeTextJobsMultipleTaskStatusRequest.json" + "SuccessfulAbstractiveSummarizationTaskResult": { + "$ref": "./examples/SuccessfulAbstractiveSummarizationTaskResult.json" }, - "Successful Get Text Analysis Health Request": { - "$ref": "./examples/text/SuccessfulHealthcareTaskStatusRequest.json" + "SuccessfulAnalyzeTextJobsMultipleTaskStatusRequest": { + "$ref": "./examples/SuccessfulAnalyzeTextJobsMultipleTaskStatusRequest.json" }, - "Successful Get Text Analysis Custom Health Request": { - "$ref": "./examples/text/SuccessfulCustomHealthcareTaskStatusRequest.json" + "SuccessfulCustomAbstractiveSummarizationTaskResult": { + "$ref": "./examples/SuccessfulCustomAbstractiveSummarizationTaskResult.json" }, - "Successful Get Abstractive Summarization Result": { - "$ref": "./examples/text/SuccessfulAbstractiveSummarizationTaskResult.json" + "SuccessfulCustomHealthcareTaskStatusRequest": { + "$ref": "./examples/SuccessfulCustomHealthcareTaskStatusRequest.json" }, - "Successful Get Custom Abstractive Summarization Result": { - "$ref": "./examples/text/SuccessfulCustomAbstractiveSummarizationTaskResult.json" + "SuccessfulCustomSentimentAnalysisTaskStatusRequest": { + "$ref": "./examples/SuccessfulCustomSentimentAnalysisTaskStatusRequest.json" }, - "Successful Get Text Analysis Health DocumentType Request": { - "$ref": "./examples/text/SuccessfulHealthcareDocumentTypeTaskStatusRequest.json" + "SuccessfulHealthcareDocumentTypeTaskStatusRequest": { + "$ref": "./examples/SuccessfulHealthcareDocumentTypeTaskStatusRequest.json" }, - "Successful Get Text Analysis Custom Sentiment Analysis Request": { - "$ref": "./examples/text/SuccessfulCustomSentimentAnalysisTaskStatusRequest.json" + "SuccessfulHealthcareTaskStatusRequest": { + "$ref": "./examples/SuccessfulHealthcareTaskStatusRequest.json" } } } }, "/analyze-text/jobs/{jobId}:cancel": { "post": { - "produces": [ - "application/json" - ], + "operationId": "AnalyzeTextCancelJob", + "summary": "Cancel a long-running Text Analysis job.", "description": "Cancel a long-running Text Analysis job.", - "operationId": "AnalyzeText_CancelJob", - "summary": "Cancel a long-running Text Analysis job", "parameters": [ { - "$ref": "common.json#/parameters/ApiVersionParameter" + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { - "$ref": "common.json#/parameters/JobId" + "name": "jobId", + "in": "path", + "description": "The job ID to cancel.", + "required": true, + "type": "string", + "format": "uuid" } ], "responses": { "202": { - "description": "Cancel Job request has been received.", + "description": "The request has been accepted for processing, but processing has not yet completed.", "headers": { "Operation-Location": { - "type": "string" + "type": "string", + "format": "uri", + "description": "The location for monitoring the operation state." } } }, "default": { - "description": "Unexpected error", + "description": "An unexpected error response.", "schema": { - "$ref": "common.json#/definitions/ErrorResponse" + "$ref": "#/definitions/ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } } } }, "x-ms-examples": { - "Successful Job Delete Request": { - "$ref": "./examples/text/SuccessfulAnalyzeTextJobsCancelRequest.json" + "SuccessfulAnalyzeTextJobsCancelRequest": { + "$ref": "./examples/SuccessfulAnalyzeTextJobsCancelRequest.json" } }, "x-ms-long-running-operation": true @@ -300,227 +338,285 @@ } }, "definitions": { - "AnalyzeTextTaskKind": { - "type": "string", - "description": "Enumeration of supported Text Analysis tasks.", - "enum": [ - "SentimentAnalysis", - "EntityRecognition", - "PiiEntityRecognition", - "KeyPhraseExtraction", - "LanguageDetection", - "EntityLinking", - "DynamicClassification" + "AbstractiveSummarizationLROResult": { + "type": "object", + "description": "An object representing the results for an Abstractive Summarization task.", + "properties": { + "results": { + "$ref": "#/definitions/AbstractiveSummarizationResult", + "description": "Results of the task." + } + }, + "required": [ + "results" ], - "x-ms-enum": { - "name": "AnalyzeTextTaskKind", - "modelAsString": true - } - }, - "AnalyzeTextLROTaskKind": { - "type": "string", - "description": "Enumeration of supported long-running Text Analysis tasks.", - "enum": [ - "SentimentAnalysis", - "EntityRecognition", - "PiiEntityRecognition", - "KeyPhraseExtraction", - "EntityLinking", - "Healthcare", - "CustomHealthcare", - "ExtractiveSummarization", - "CustomEntityRecognition", - "CustomSingleLabelClassification", - "CustomMultiLabelClassification", - "AbstractiveSummarization", - "CustomSentimentAnalysis", - "CustomAbstractiveSummarization" + "allOf": [ + { + "$ref": "#/definitions/AnalyzeTextLROResult" + } ], - "x-ms-enum": { - "name": "AnalyzeTextLROTaskKind", - "modelAsString": true - } + "x-ms-discriminator-value": "AbstractiveSummarizationLROResults" }, - "AnalyzeTextTaskResultsKind": { - "type": "string", - "description": "Enumeration of supported Text Analysis task results.", - "enum": [ - "SentimentAnalysisResults", - "EntityRecognitionResults", - "PiiEntityRecognitionResults", - "KeyPhraseExtractionResults", - "LanguageDetectionResults", - "EntityLinkingResults", - "DynamicClassificationResults" + "AbstractiveSummarizationLROTask": { + "type": "object", + "description": "An object representing the task definition for an Abstractive Summarization task.", + "properties": { + "parameters": { + "$ref": "#/definitions/AbstractiveSummarizationTaskParameters", + "description": "Parameters for the Abstractive Summarization task." + } + }, + "required": [ + "parameters" ], - "x-ms-enum": { - "name": "AnalyzeTextTaskResultsKind", - "modelAsString": true - } - }, - "AnalyzeTextLROResultsKind": { - "type": "string", - "description": "Enumeration of supported Text Analysis long-running operation task results.", - "enum": [ - "SentimentAnalysisLROResults", - "EntityRecognitionLROResults", - "PiiEntityRecognitionLROResults", - "KeyPhraseExtractionLROResults", - "EntityLinkingLROResults", - "HealthcareLROResults", - "CustomHealthcareLROResults", - "ExtractiveSummarizationLROResults", - "CustomEntityRecognitionLROResults", - "CustomSingleLabelClassificationLROResults", - "CustomMultiLabelClassificationLROResults", - "AbstractiveSummarizationLROResults", - "CustomSentimentAnalysisLROResults", - "CustomAbstractiveSummarizationLROResults" + "allOf": [ + { + "$ref": "#/definitions/AnalyzeTextLROTask" + } ], - "x-ms-enum": { - "name": "AnalyzeTextLROResultsKind", - "modelAsString": true - } + "x-ms-discriminator-value": "AbstractiveSummarization" }, - "MultiLanguageAnalysisInput": { + "AbstractiveSummarizationResult": { "type": "object", + "description": "An object representing the pre-built Abstractive Summarization results of each document.", "properties": { - "documents": { + "errors": { "type": "array", + "description": "Errors by document id.", "items": { - "$ref": "#/definitions/MultiLanguageInput" + "$ref": "#/definitions/DocumentError" } - } - } - }, - "LanguageDetectionAnalysisInput": { - "type": "object", - "properties": { + }, + "statistics": { + "$ref": "#/definitions/RequestStatistics", + "description": "if showStats=true was specified in the request this field will contain information about the request payload." + }, + "modelVersion": { + "type": "string", + "description": "This field indicates which model is used for scoring." + }, "documents": { "type": "array", + "description": "Response by document", "items": { - "$ref": "#/definitions/LanguageInput" + "$ref": "#/definitions/AbstractiveSummaryDocumentResultWithDetectedLanguage" } } - } - }, - "AnalyzeTextTask": { - "type": "object", - "discriminator": "kind", - "required": [ - "kind" - ], - "properties": { - "kind": { - "$ref": "#/definitions/AnalyzeTextTaskKind" - } - } - }, - "AnalyzeTextLROTask": { - "type": "object", - "discriminator": "kind", - "required": [ - "kind" - ], - "properties": { - "kind": { - "$ref": "#/definitions/AnalyzeTextLROTaskKind" - } }, - "allOf": [ - { - "$ref": "common.json#/definitions/TaskIdentifier" - } + "required": [ + "errors", + "modelVersion", + "documents" ] }, - "AnalyzeTextTaskResult": { + "AbstractiveSummarizationTaskParameters": { "type": "object", - "discriminator": "kind", - "required": [ - "kind" - ], + "description": "Supported parameters for the pre-built Abstractive Summarization task.", "properties": { - "kind": { - "$ref": "#/definitions/AnalyzeTextTaskResultsKind" + "loggingOptOut": { + "type": "boolean", + "description": "logging opt out", + "default": false + }, + "modelVersion": { + "type": "string", + "description": "model version", + "default": "latest" + }, + "sentenceCount": { + "type": "integer", + "format": "int32", + "description": "Controls the approximate number of sentences in the output summaries." + }, + "stringIndexType": { + "type": "string", + "description": "String index type", + "default": "TextElements_v8", + "enum": [ + "TextElements_v8", + "UnicodeCodePoint", + "Utf16CodeUnit" + ], + "x-ms-enum": { + "name": "StringIndexType", + "modelAsString": true, + "values": [ + { + "name": "TextElements_v8", + "value": "TextElements_v8", + "description": "Returned offset and length values will correspond to TextElements (Graphemes and Grapheme clusters) confirming to the Unicode 8.0.0 standard. Use this option if your application is written in .Net Framework or .Net Core and you will be using StringInfo." + }, + { + "name": "UnicodeCodePoint", + "value": "UnicodeCodePoint", + "description": "Returned offset and length values will correspond to Unicode code points. Use this option if your application is written in a language that support Unicode, for example Python." + }, + { + "name": "Utf16CodeUnit", + "value": "Utf16CodeUnit", + "description": "Returned offset and length values will correspond to UTF-16 code units. Use this option if your application is written in a language that support Unicode, for example Java, JavaScript." + } + ] + } + }, + "summaryLength": { + "$ref": "#/definitions/SummaryLengthBucket", + "description": "(NOTE: Recommended to use summaryLength over sentenceCount) Controls the approximate length of the output summaries." + }, + "query": { + "type": "string", + "description": "(Optional) If provided, the query will be used to generate the summary." } } }, - "AnalyzeTextEntityLinkingInput": { + "AbstractiveSummary": { "type": "object", + "description": "An object representing a single summary with context for given document.", "properties": { - "analysisInput": { - "$ref": "#/definitions/MultiLanguageAnalysisInput" + "text": { + "type": "string", + "description": "The text of the summary." }, - "parameters": { - "$ref": "#/definitions/EntityLinkingTaskParameters" + "contexts": { + "type": "array", + "description": "The context list of the summary.", + "items": { + "$ref": "#/definitions/SummaryContext" + }, + "x-ms-identifiers": [] } }, - "allOf": [ - { - "$ref": "#/definitions/AnalyzeTextTask" - } - ], - "x-ms-discriminator-value": "EntityLinking" + "required": [ + "text" + ] }, - "AnalyzeTextEntityRecognitionInput": { + "AbstractiveSummaryDocumentResultWithDetectedLanguage": { "type": "object", + "description": "An object representing the Abstractive Summarization result of a single document with detected language.", "properties": { - "analysisInput": { - "$ref": "#/definitions/MultiLanguageAnalysisInput" + "id": { + "type": "string", + "description": "Unique, non-empty document identifier." }, - "parameters": { - "$ref": "#/definitions/EntitiesTaskParameters" - } - }, - "allOf": [ - { - "$ref": "#/definitions/AnalyzeTextTask" + "warnings": { + "type": "array", + "description": "Warnings encountered while processing document.", + "items": { + "$ref": "#/definitions/DocumentWarning" + }, + "x-ms-identifiers": [] + }, + "statistics": { + "$ref": "#/definitions/DocumentStatistics", + "description": "if showStats=true was specified in the request this field will contain information about the document payload." + }, + "summaries": { + "type": "array", + "description": "A list of abstractive summaries.", + "items": { + "$ref": "#/definitions/AbstractiveSummary" + }, + "x-ms-identifiers": [] + }, + "detectedLanguage": { + "$ref": "#/definitions/DetectedLanguage", + "description": "If 'language' is set to 'auto' for the document in the request this field will contain a 2 letter ISO 639-1 representation of the language detected for this document." } - ], - "x-ms-discriminator-value": "EntityRecognition" + }, + "required": [ + "id", + "warnings", + "summaries" + ] }, - "AnalyzeTextKeyPhraseExtractionInput": { + "AgeMetadata": { "type": "object", + "description": "Represents the Age entity Metadata model.", "properties": { - "analysisInput": { - "$ref": "#/definitions/MultiLanguageAnalysisInput" + "value": { + "type": "number", + "format": "double", + "description": "The numeric value that the extracted text denotes." }, - "parameters": { - "$ref": "#/definitions/KeyPhraseTaskParameters" + "unit": { + "$ref": "#/definitions/AgeUnit", + "description": "Unit of measure for age." } }, + "required": [ + "value", + "unit" + ], "allOf": [ { - "$ref": "#/definitions/AnalyzeTextTask" + "$ref": "#/definitions/BaseMetadata" } ], - "x-ms-discriminator-value": "KeyPhraseExtraction" + "x-ms-discriminator-value": "AgeMetadata" }, - "AnalyzeTextPiiEntitiesRecognitionInput": { + "AgeUnit": { + "type": "string", + "description": "The Age Unit of measurement", + "enum": [ + "Unspecified", + "Year", + "Month", + "Week", + "Day" + ], + "x-ms-enum": { + "name": "AgeUnit", + "modelAsString": true, + "values": [ + { + "name": "Unspecified", + "value": "Unspecified", + "description": "Unspecified time period" + }, + { + "name": "Year", + "value": "Year", + "description": "Time period of a year" + }, + { + "name": "Month", + "value": "Month", + "description": "Time period of a month" + }, + { + "name": "Week", + "value": "Week", + "description": "Time period of a week" + }, + { + "name": "Day", + "value": "Day", + "description": "Time period of a day" + } + ] + } + }, + "AllowOverlapEntityPolicyType": { "type": "object", - "properties": { - "analysisInput": { - "$ref": "#/definitions/MultiLanguageAnalysisInput" - }, - "parameters": { - "$ref": "#/definitions/PiiTaskParameters" - } - }, + "description": "Represents the allow overlap policy. Will apply no post processing logic for the entities. Whatever the model predicts is what will be returned to the user. This allows the user to get a full view of every single model's possible values and apply their own custom logic on entity selection", "allOf": [ { - "$ref": "#/definitions/AnalyzeTextTask" + "$ref": "#/definitions/BaseEntityOverlapPolicy" } ], - "x-ms-discriminator-value": "PiiEntityRecognition" + "x-ms-discriminator-value": "allowOverlap" }, - "AnalyzeTextLanguageDetectionInput": { + "AnalyzeTextDynamicClassificationInput": { "type": "object", + "description": "Contains the analyze text dynamic classifications input.", "properties": { "analysisInput": { - "$ref": "#/definitions/LanguageDetectionAnalysisInput" + "$ref": "#/definitions/MultiLanguageAnalysisInput", + "description": "Input to be analyzed." }, "parameters": { - "$ref": "#/definitions/LanguageDetectionTaskParameters" + "$ref": "#/definitions/DynamicClassificationTaskParameters", + "description": "Task parameters." } }, "allOf": [ @@ -528,16 +624,19 @@ "$ref": "#/definitions/AnalyzeTextTask" } ], - "x-ms-discriminator-value": "LanguageDetection" + "x-ms-discriminator-value": "DynamicClassification" }, - "AnalyzeTextSentimentAnalysisInput": { + "AnalyzeTextEntityLinkingInput": { "type": "object", + "description": "Contains the analyze text Entity linking input.", "properties": { "analysisInput": { - "$ref": "#/definitions/MultiLanguageAnalysisInput" + "$ref": "#/definitions/MultiLanguageAnalysisInput", + "description": "Contains the analysis input to be handled by the service." }, "parameters": { - "$ref": "#/definitions/SentimentAnalysisTaskParameters" + "$ref": "#/definitions/EntityLinkingTaskParameters", + "description": "Task parameters." } }, "allOf": [ @@ -545,16 +644,19 @@ "$ref": "#/definitions/AnalyzeTextTask" } ], - "x-ms-discriminator-value": "SentimentAnalysis" + "x-ms-discriminator-value": "EntityLinking" }, - "AnalyzeTextDynamicClassificationInput": { + "AnalyzeTextEntityRecognitionInput": { "type": "object", + "description": "The entity recognition analyze text input task request.", "properties": { "analysisInput": { - "$ref": "#/definitions/MultiLanguageAnalysisInput" + "$ref": "#/definitions/MultiLanguageAnalysisInput", + "description": "The input to be analyzed." }, "parameters": { - "$ref": "#/definitions/DynamicClassificationTaskParameters" + "$ref": "#/definitions/EntitiesTaskParameters", + "description": "Task parameters." } }, "allOf": [ @@ -562,1232 +664,1737 @@ "$ref": "#/definitions/AnalyzeTextTask" } ], - "x-ms-discriminator-value": "DynamicClassification" + "x-ms-discriminator-value": "EntityRecognition" }, - "AnalyzeTextJobsInput": { + "AnalyzeTextJobState": { "type": "object", + "description": "The object containing the analyze job LRO job state.", "properties": { "displayName": { - "description": "Optional display name for the analysis job.", - "type": "string" + "type": "string", + "description": "display name" }, - "defaultLanguage": { - "description": "Default language to use for records requesting automatic language detection.", - "type": "string" + "createdDateTime": { + "type": "string", + "format": "date-time", + "description": "Date and time job created" }, - "analysisInput": { - "$ref": "#/definitions/MultiLanguageAnalysisInput" + "expirationDateTime": { + "type": "string", + "format": "date-time", + "description": "Date and time job expires" }, - "tasks": { - "description": "The set of tasks to execute on the input documents.", + "jobId": { + "$ref": "#/definitions/Azure.Core.uuid", + "description": "job ID", + "readOnly": true + }, + "lastUpdatedDateTime": { + "type": "string", + "format": "date-time", + "description": "last updated date and time" + }, + "status": { + "$ref": "#/definitions/State", + "description": "status" + }, + "errors": { "type": "array", + "description": "errors", "items": { - "$ref": "#/definitions/AnalyzeTextLROTask" - } + "$ref": "#/definitions/Error" + }, + "x-ms-identifiers": [] + }, + "nextLink": { + "type": "string", + "description": "next link" + }, + "tasks": { + "$ref": "#/definitions/Tasks", + "description": "List of tasks." + }, + "statistics": { + "$ref": "#/definitions/RequestStatistics", + "description": "if showStats=true was specified in the request this field will contain information about the request payload." } }, "required": [ - "analysisInput", + "createdDateTime", + "jobId", + "lastUpdatedDateTime", + "status", "tasks" ] }, - "CustomEntitiesTaskParameters": { + "AnalyzeTextJobsInput": { "type": "object", - "description": "Supported parameters for a Custom Entities task.", + "description": "The input object for the analyze text LRO.", "properties": { - "stringIndexType": { - "$ref": "common.json#/definitions/StringIndexType" + "displayName": { + "type": "string", + "description": "Name for the task." + }, + "analysisInput": { + "$ref": "#/definitions/MultiLanguageAnalysisInput", + "description": "Contains the input to be analyzed." + }, + "tasks": { + "type": "array", + "description": "List of tasks to be performed as part of the LRO.", + "items": { + "$ref": "#/definitions/AnalyzeTextLROTask" + }, + "x-ms-identifiers": [] + }, + "defaultLanguage": { + "type": "string", + "description": "Default language to use for records requesting automatic language detection." } }, - "allOf": [ - { - "$ref": "common.json#/definitions/CustomTaskParameters" - } + "required": [ + "analysisInput", + "tasks" ] }, - "CustomEntitiesLROTask": { + "AnalyzeTextKeyPhraseExtractionInput": { "type": "object", - "description": "Use custom models to ease the process of information extraction from unstructured documents like contracts or financial documents", + "description": "Contains the analyze text KeyPhraseExtraction task input.", "properties": { + "analysisInput": { + "$ref": "#/definitions/MultiLanguageAnalysisInput", + "description": "Contains the input documents." + }, "parameters": { - "$ref": "#/definitions/CustomEntitiesTaskParameters" + "$ref": "#/definitions/KeyPhraseTaskParameters", + "description": "Key phrase extraction task parameters." } }, "allOf": [ { - "$ref": "#/definitions/AnalyzeTextLROTask" + "$ref": "#/definitions/AnalyzeTextTask" } ], - "x-ms-discriminator-value": "CustomEntityRecognition" + "x-ms-discriminator-value": "KeyPhraseExtraction" }, - "CustomEntitiesResult": { + "AnalyzeTextLROResult": { "type": "object", + "description": "Contains the AnalyzeText long running operation result object.", "properties": { - "documents": { - "type": "array", - "description": "Response by document", - "items": { - "$ref": "#/definitions/EntitiesDocumentResultWithDetectedLanguage" - } + "lastUpdateDateTime": { + "type": "string", + "format": "date-time", + "description": "The last updated time in UTC for the task." + }, + "status": { + "$ref": "#/definitions/State", + "description": "The status of the task at the mentioned last update time." + }, + "taskName": { + "type": "string", + "description": "task name" + }, + "kind": { + "$ref": "#/definitions/AnalyzeTextLROResultsKind", + "description": "Kind of the task." } }, - "allOf": [ - { - "$ref": "common.json#/definitions/CustomResult" - } - ], + "discriminator": "kind", "required": [ - "documents" + "lastUpdateDateTime", + "status", + "kind" ] }, - "EntitiesDocumentResultWithDetectedLanguage": { - "type": "object", - "description": "Single entities recognition result with detected language.", - "allOf": [ - { - "$ref": "#/definitions/EntitiesDocumentResult" - }, - { - "$ref": "#/definitions/DocumentDetectedLanguage" - } - ] + "AnalyzeTextLROResultsKind": { + "type": "string", + "description": "The kind of the response object returned by the analyze-text long running task.", + "enum": [ + "SentimentAnalysisLROResults", + "EntityRecognitionLROResults", + "PiiEntityRecognitionLROResults", + "KeyPhraseExtractionLROResults", + "EntityLinkingLROResults", + "HealthcareLROResults", + "CustomEntityRecognitionLROResults", + "CustomSingleLabelClassificationLROResults", + "CustomMultiLabelClassificationLROResults", + "ExtractiveSummarizationLROResults", + "AbstractiveSummarizationLROResults", + "CustomHealthcareLROResults", + "CustomSentimentAnalysisLROResults", + "CustomAbstractiveSummarizationLROResults" + ], + "x-ms-enum": { + "name": "AnalyzeTextLROResultsKind", + "modelAsString": true, + "values": [ + { + "name": "SentimentAnalysisLROResults", + "value": "SentimentAnalysisLROResults", + "description": "Sentiment analysis LRO results" + }, + { + "name": "EntityRecognitionLROResults", + "value": "EntityRecognitionLROResults", + "description": "Entity recognition LRO results" + }, + { + "name": "PiiEntityRecognitionLROResults", + "value": "PiiEntityRecognitionLROResults", + "description": "PII entity recognition LRO results" + }, + { + "name": "KeyPhraseExtractionLROResults", + "value": "KeyPhraseExtractionLROResults", + "description": "Key phrase extraction LRO results" + }, + { + "name": "EntityLinkingLROResults", + "value": "EntityLinkingLROResults", + "description": "Entity linking LRO results" + }, + { + "name": "HealthcareLROResults", + "value": "HealthcareLROResults", + "description": "Healthcare LRO results" + }, + { + "name": "CustomEntityRecognitionLROResults", + "value": "CustomEntityRecognitionLROResults", + "description": "Custom entity recognition LRO results" + }, + { + "name": "CustomSingleLabelClassificationLROResults", + "value": "CustomSingleLabelClassificationLROResults", + "description": "Custom single label classification LRO results" + }, + { + "name": "CustomMultiLabelClassificationLROResults", + "value": "CustomMultiLabelClassificationLROResults", + "description": "Custom multi label classification LRO results" + }, + { + "name": "ExtractiveSummarizationLROResults", + "value": "ExtractiveSummarizationLROResults", + "description": "Extractive summarization LRO results" + }, + { + "name": "AbstractiveSummarizationLROResults", + "value": "AbstractiveSummarizationLROResults", + "description": "Abstractive summarization LRO results" + }, + { + "name": "CustomHealthcareLROResults", + "value": "CustomHealthcareLROResults", + "description": "Custom healthcare LRO results" + }, + { + "name": "CustomSentimentAnalysisLROResults", + "value": "CustomSentimentAnalysisLROResults", + "description": "Custom sentiment analysis LRO results" + }, + { + "name": "CustomAbstractiveSummarizationLROResults", + "value": "CustomAbstractiveSummarizationLROResults", + "description": "Custom abstractive summarization LRO results" + } + ] + } }, - "CustomSingleLabelClassificationTaskParameters": { + "AnalyzeTextLROTask": { "type": "object", - "description": "Supported parameters for a Custom Single Classification task.", - "allOf": [ - { - "$ref": "common.json#/definitions/CustomTaskParameters" + "description": "The long running task to be performed by the service on the input documents.", + "properties": { + "taskName": { + "type": "string", + "description": "task name" + }, + "kind": { + "$ref": "#/definitions/AnalyzeTextLROTaskKind", + "description": "The kind of task to perform." } + }, + "discriminator": "kind", + "required": [ + "kind" ] }, - "CustomSingleLabelClassificationLROTask": { + "AnalyzeTextLROTaskKind": { + "type": "string", + "description": "The kind of the long running analyze text tasks supported.", + "enum": [ + "SentimentAnalysis", + "EntityRecognition", + "PiiEntityRecognition", + "KeyPhraseExtraction", + "EntityLinking", + "Healthcare", + "CustomEntityRecognition", + "CustomSingleLabelClassification", + "CustomMultiLabelClassification", + "ExtractiveSummarization", + "AbstractiveSummarization", + "CustomHealthcare", + "CustomSentimentAnalysis", + "CustomAbstractiveSummarization" + ], + "x-ms-enum": { + "name": "AnalyzeTextLROTaskKind", + "modelAsString": true, + "values": [ + { + "name": "SentimentAnalysis", + "value": "SentimentAnalysis", + "description": "Sentiment analysis task" + }, + { + "name": "EntityRecognition", + "value": "EntityRecognition", + "description": "Entity recognition task" + }, + { + "name": "PiiEntityRecognition", + "value": "PiiEntityRecognition", + "description": "PII entity recognition task" + }, + { + "name": "KeyPhraseExtraction", + "value": "KeyPhraseExtraction", + "description": "Key phrase extraction task" + }, + { + "name": "EntityLinking", + "value": "EntityLinking", + "description": "Entity linking task" + }, + { + "name": "Healthcare", + "value": "Healthcare", + "description": "Healthcare task" + }, + { + "name": "CustomEntityRecognition", + "value": "CustomEntityRecognition", + "description": "Custom entity recognition task" + }, + { + "name": "CustomSingleLabelClassification", + "value": "CustomSingleLabelClassification", + "description": "Custom single label classification task" + }, + { + "name": "CustomMultiLabelClassification", + "value": "CustomMultiLabelClassification", + "description": "Custom multi label classification task" + }, + { + "name": "ExtractiveSummarization", + "value": "ExtractiveSummarization", + "description": "Extractive summarization task" + }, + { + "name": "AbstractiveSummarization", + "value": "AbstractiveSummarization", + "description": "Abstractive summarization task" + }, + { + "name": "CustomHealthcare", + "value": "CustomHealthcare", + "description": "Custom healthcare task" + }, + { + "name": "CustomSentimentAnalysis", + "value": "CustomSentimentAnalysis", + "description": "Custom sentiment analysis task" + }, + { + "name": "CustomAbstractiveSummarization", + "value": "CustomAbstractiveSummarization", + "description": "Custom abstractive summarization task" + } + ] + } + }, + "AnalyzeTextLanguageDetectionInput": { "type": "object", - "description": "Use custom models to classify text into single label taxonomy", + "description": "Contains the language detection document analysis task input.", "properties": { + "analysisInput": { + "$ref": "#/definitions/LanguageDetectionAnalysisInput", + "description": "Documents to be analyzed." + }, "parameters": { - "$ref": "#/definitions/CustomSingleLabelClassificationTaskParameters" + "$ref": "#/definitions/LanguageDetectionTaskParameters", + "description": "task parameters." } }, "allOf": [ { - "$ref": "#/definitions/AnalyzeTextLROTask" + "$ref": "#/definitions/AnalyzeTextTask" } ], - "x-ms-discriminator-value": "CustomSingleLabelClassification" + "x-ms-discriminator-value": "LanguageDetection" }, - "CustomLabelClassificationResult": { + "AnalyzeTextPiiEntitiesRecognitionInput": { "type": "object", + "description": "Contains the analyze text PIIEntityRecognition task input.", "properties": { - "documents": { - "type": "array", - "description": "Response by document", - "items": { - "$ref": "#/definitions/ClassificationDocumentResultWithDetectedLanguage" - } + "analysisInput": { + "$ref": "#/definitions/MultiLanguageAnalysisInput", + "description": "Contains the input documents." + }, + "parameters": { + "$ref": "#/definitions/PiiTaskParameters", + "description": "Pii task parameters." } }, "allOf": [ { - "$ref": "common.json#/definitions/CustomResult" + "$ref": "#/definitions/AnalyzeTextTask" } ], - "required": [ - "documents" - ] - }, - "ClassificationDocumentResultWithDetectedLanguage": { - "type": "object", - "description": "Classification document result with language detection.", - "allOf": [ - { - "$ref": "#/definitions/ClassificationDocumentResult" - }, - { - "$ref": "#/definitions/DocumentDetectedLanguage" - } - ] + "x-ms-discriminator-value": "PiiEntityRecognition" }, - "ClassificationResult": { + "AnalyzeTextSentimentAnalysisInput": { "type": "object", - "required": [ - "category", - "confidenceScore" - ], + "description": "Contains the analyze text SentimentAnalysis task input.", "properties": { - "category": { - "type": "string", - "description": "Classification type." + "analysisInput": { + "$ref": "#/definitions/MultiLanguageAnalysisInput", + "description": "Contains the input documents." }, - "confidenceScore": { - "type": "number", - "format": "double", - "description": "Confidence score between 0 and 1 of the recognized class." - } - } - }, - "CustomMultiLabelClassificationTaskParameters": { - "type": "object", - "description": "Supported parameters for a Custom Multi Classification task.", - "allOf": [ - { - "$ref": "common.json#/definitions/CustomTaskParameters" - } - ] - }, - "CustomMultiLabelClassificationLROTask": { - "type": "object", - "description": "Use custom models to classify text into multi label taxonomy", - "properties": { "parameters": { - "$ref": "#/definitions/CustomMultiLabelClassificationTaskParameters" + "$ref": "#/definitions/SentimentAnalysisTaskParameters", + "description": "Sentiment Analysis task parameters." } }, "allOf": [ { - "$ref": "#/definitions/AnalyzeTextLROTask" + "$ref": "#/definitions/AnalyzeTextTask" } ], - "x-ms-discriminator-value": "CustomMultiLabelClassification" + "x-ms-discriminator-value": "SentimentAnalysis" }, - "ClassificationDocumentResult": { + "AnalyzeTextTask": { "type": "object", + "description": "Collection of documents to analyze and a single task to execute.", "properties": { - "class": { - "type": "array", - "items": { - "$ref": "#/definitions/ClassificationResult" - } + "kind": { + "$ref": "#/definitions/AnalyzeTextTaskKind", + "description": "The kind of task to perform." } }, - "allOf": [ - { - "$ref": "#/definitions/DocumentResult" - } - ], + "discriminator": "kind", "required": [ - "class" + "kind" ] }, - "DynamicClassificationDocumentResult": { + "AnalyzeTextTaskKind": { + "type": "string", + "description": "The kind of the analyze-text tasks supported.", + "enum": [ + "SentimentAnalysis", + "EntityRecognition", + "PiiEntityRecognition", + "KeyPhraseExtraction", + "LanguageDetection", + "EntityLinking", + "DynamicClassification" + ], + "x-ms-enum": { + "name": "AnalyzeTextTaskKind", + "modelAsString": true, + "values": [ + { + "name": "SentimentAnalysis", + "value": "SentimentAnalysis", + "description": "Sentiment analysis task" + }, + { + "name": "EntityRecognition", + "value": "EntityRecognition", + "description": "Entity recognition task" + }, + { + "name": "PiiEntityRecognition", + "value": "PiiEntityRecognition", + "description": "PII entity recognition task" + }, + { + "name": "KeyPhraseExtraction", + "value": "KeyPhraseExtraction", + "description": "Key phrase extraction task" + }, + { + "name": "LanguageDetection", + "value": "LanguageDetection", + "description": "Language detection task" + }, + { + "name": "EntityLinking", + "value": "EntityLinking", + "description": "Entity linking task" + }, + { + "name": "DynamicClassification", + "value": "DynamicClassification", + "description": "Dynamic classification task" + } + ] + } + }, + "AnalyzeTextTaskResult": { "type": "object", + "description": "The result object for the analyze task.", "properties": { - "classifications": { - "type": "array", - "items": { - "$ref": "#/definitions/ClassificationResult" - } + "kind": { + "$ref": "#/definitions/AnalyzeTextTaskResultsKind", + "description": "The kind of task result." } }, - "allOf": [ - { - "$ref": "#/definitions/DocumentResult" - } - ], + "discriminator": "kind", "required": [ - "classifications" + "kind" ] }, - "HealthcareTaskParameters": { - "type": "object", - "description": "Supported parameters for a Healthcare task.", - "properties": { - "fhirVersion": { - "type": "string", - "description": "The FHIR Spec version that the result will use to format the fhirBundle. For additional information see https://www.hl7.org/fhir/overview.html.", - "enum": [ - "4.0.1" - ], - "x-ms-enum": { - "name": "fhirVersion", - "modelAsString": true - } - }, - "documentType": { - "x-ms-enum": { - "name": "healthcareDocumentType", - "modelAsString": true + "AnalyzeTextTaskResultsKind": { + "type": "string", + "description": "The kind of the response object returned by the analyze-text task.", + "enum": [ + "SentimentAnalysisResults", + "EntityRecognitionResults", + "PiiEntityRecognitionResults", + "KeyPhraseExtractionResults", + "LanguageDetectionResults", + "EntityLinkingResults", + "DynamicClassificationResults" + ], + "x-ms-enum": { + "name": "AnalyzeTextTaskResultsKind", + "modelAsString": true, + "values": [ + { + "name": "SentimentAnalysisResults", + "value": "SentimentAnalysisResults", + "description": "Sentiment analysis results" }, - "type": "string", - "description": "Document type that can be provided as input for Fhir Documents. Expect to have fhirVersion provided when used. Behavior of using None enum is the same as not using the documentType parameter.", - "enum": [ - "None", - "ClinicalTrial", - "DischargeSummary", - "ProgressNote", - "HistoryAndPhysical", - "Consult", - "Imaging", - "Pathology", - "ProcedureNote" - ] - }, - "stringIndexType": { - "$ref": "common.json#/definitions/StringIndexType" - } - }, - "allOf": [ - { - "$ref": "common.json#/definitions/PreBuiltTaskParameters" - } - ] + { + "name": "EntityRecognitionResults", + "value": "EntityRecognitionResults", + "description": "Entity recognition results" + }, + { + "name": "PiiEntityRecognitionResults", + "value": "PiiEntityRecognitionResults", + "description": "PII entity recognition results" + }, + { + "name": "KeyPhraseExtractionResults", + "value": "KeyPhraseExtractionResults", + "description": "Key phrase extraction results" + }, + { + "name": "LanguageDetectionResults", + "value": "LanguageDetectionResults", + "description": "Language detection results" + }, + { + "name": "EntityLinkingResults", + "value": "EntityLinkingResults", + "description": "Entity linking results" + }, + { + "name": "DynamicClassificationResults", + "value": "DynamicClassificationResults", + "description": "Dynamic classification results" + } + ] + } }, - "CustomHealthcareTaskParameters": { + "AreaMetadata": { "type": "object", - "description": "Supported parameters for a custom Healthcare task.", + "description": "Represents the Area entity Metadata model.", "properties": { - "stringIndexType": { - "$ref": "common.json#/definitions/StringIndexType" + "value": { + "type": "number", + "format": "double", + "description": "The numeric value that the extracted text denotes." + }, + "unit": { + "$ref": "#/definitions/AreaUnit", + "description": "Unit of measure for area." } }, + "required": [ + "value", + "unit" + ], "allOf": [ { - "$ref": "common.json#/definitions/CustomTaskParameters" + "$ref": "#/definitions/BaseMetadata" } - ] + ], + "x-ms-discriminator-value": "AreaMetadata" }, - "HealthcareLROTask": { - "type": "object", - "properties": { - "parameters": { - "$ref": "#/definitions/HealthcareTaskParameters" - } - }, - "allOf": [ - { - "$ref": "#/definitions/AnalyzeTextLROTask" - } + "AreaUnit": { + "type": "string", + "description": "The area unit of measurement.", + "enum": [ + "Unspecified", + "SquareKilometer", + "SquareHectometer", + "SquareDecameter", + "SquareDecimeter", + "SquareMeter", + "SquareCentimeter", + "SquareMillimeter", + "SquareInch", + "SquareFoot", + "SquareMile", + "SquareYard", + "Acre" ], - "x-ms-discriminator-value": "Healthcare" + "x-ms-enum": { + "name": "AreaUnit", + "modelAsString": true, + "values": [ + { + "name": "Unspecified", + "value": "Unspecified", + "description": "Unspecified area unit" + }, + { + "name": "SquareKilometer", + "value": "SquareKilometer", + "description": "Area unit in square kilometers" + }, + { + "name": "SquareHectometer", + "value": "SquareHectometer", + "description": "Area unit in square hectometers" + }, + { + "name": "SquareDecameter", + "value": "SquareDecameter", + "description": "Area unit in square decameters" + }, + { + "name": "SquareDecimeter", + "value": "SquareDecimeter", + "description": "Area unit in square decimeters" + }, + { + "name": "SquareMeter", + "value": "SquareMeter", + "description": "Area unit in square meters" + }, + { + "name": "SquareCentimeter", + "value": "SquareCentimeter", + "description": "Area unit in square centimeters" + }, + { + "name": "SquareMillimeter", + "value": "SquareMillimeter", + "description": "Area unit in square millimeters" + }, + { + "name": "SquareInch", + "value": "SquareInch", + "description": "Area unit in square inches" + }, + { + "name": "SquareFoot", + "value": "SquareFoot", + "description": "Area unit in square feet" + }, + { + "name": "SquareMile", + "value": "SquareMile", + "description": "Area unit in square miles" + }, + { + "name": "SquareYard", + "value": "SquareYard", + "description": "Area unit in square yards" + }, + { + "name": "Acre", + "value": "Acre", + "description": "Area unit in acres" + } + ] + } }, - "CustomHealthcareLROTask": { - "type": "object", - "properties": { - "parameters": { - "$ref": "#/definitions/CustomHealthcareTaskParameters" - } - }, - "allOf": [ - { - "$ref": "#/definitions/AnalyzeTextLROTask" - } + "Association": { + "type": "string", + "description": "Describes if the entity is the subject of the text or if it describes someone else.", + "enum": [ + "subject", + "other" ], - "x-ms-discriminator-value": "CustomHealthcare" + "x-ms-enum": { + "name": "Association", + "modelAsString": false, + "values": [ + { + "name": "subject", + "value": "subject", + "description": "Subject association" + }, + { + "name": "other", + "value": "other", + "description": "Other association" + } + ] + } }, - "HealthcareResult": { + "Azure.Core.uuid": { + "type": "string", + "format": "uuid", + "description": "Universally Unique Identifier" + }, + "BaseEntityOverlapPolicy": { "type": "object", + "description": "The abstract base class for entity OverlapPolicy.", "properties": { - "documents": { - "type": "array", - "items": { - "$ref": "#/definitions/HealthcareEntitiesDocumentResultWithDocumentDetectedLanguage" + "policyKind": { + "type": "string", + "description": "The entity OverlapPolicy object kind.", + "default": "matchLongest", + "enum": [ + "matchLongest", + "allowOverlap" + ], + "x-ms-enum": { + "name": "policyKind", + "modelAsString": true, + "values": [ + { + "name": "matchLongest", + "value": "matchLongest", + "description": "Represents MatchLongestEntityPolicyType" + }, + { + "name": "allowOverlap", + "value": "allowOverlap", + "description": "Represents AllowOverlapEntityPolicyType" + } + ] } } }, - "allOf": [ - { - "$ref": "common.json#/definitions/PreBuiltResult" - } - ], + "discriminator": "policyKind", "required": [ - "documents" + "policyKind" ] }, - "CustomHealthcareResult": { + "BaseMetadata": { "type": "object", + "description": "The abstract base class for entity Metadata.", "properties": { - "documents": { - "type": "array", - "items": { - "$ref": "#/definitions/CustomHealthcareEntitiesDocumentResultWithDocumentDetectedLanguage" - } + "metadataKind": { + "$ref": "#/definitions/MetadataKind", + "description": "The entity Metadata object kind." } }, - "allOf": [ - { - "$ref": "common.json#/definitions/CustomResult" - } - ], + "discriminator": "metadataKind", "required": [ - "documents" + "metadataKind" ] }, - "HealthcareEntitiesDocumentResultWithDocumentDetectedLanguage": { + "Certainty": { + "type": "string", + "description": "Describes the entities certainty and polarity.", + "enum": [ + "positive", + "positivePossible", + "neutralPossible", + "negativePossible", + "negative" + ], + "x-ms-enum": { + "name": "Certainty", + "modelAsString": false, + "values": [ + { + "name": "positive", + "value": "positive", + "description": "Positive certainty" + }, + { + "name": "positivePossible", + "value": "positivePossible", + "description": "Possibly positive certainty" + }, + { + "name": "neutralPossible", + "value": "neutralPossible", + "description": "Possibly neutral certainty" + }, + { + "name": "negativePossible", + "value": "negativePossible", + "description": "Possibly negative certainty" + }, + { + "name": "negative", + "value": "negative", + "description": "Negative certainty" + } + ] + } + }, + "ClassificationDocumentResultWithDetectedLanguage": { "type": "object", - "allOf": [ - { - "$ref": "#/definitions/HealthcareEntitiesDocumentResult" + "description": "Contains the classification doc result for the task with detected language.", + "properties": { + "id": { + "type": "string", + "description": "Unique, non-empty document identifier." }, - { - "$ref": "#/definitions/DocumentDetectedLanguage" + "warnings": { + "type": "array", + "description": "Warnings encountered while processing document.", + "items": { + "$ref": "#/definitions/DocumentWarning" + }, + "x-ms-identifiers": [] + }, + "statistics": { + "$ref": "#/definitions/DocumentStatistics", + "description": "if showStats=true was specified in the request this field will contain information about the document payload." + }, + "class": { + "type": "array", + "description": "Contains the classification doc results for all docs.", + "items": { + "$ref": "#/definitions/ClassificationResult" + }, + "x-ms-identifiers": [] + }, + "detectedLanguage": { + "$ref": "#/definitions/DetectedLanguage", + "description": "If 'language' is set to 'auto' for the document in the request this field will contain a 2 letter ISO 639-1 representation of the language detected for this document." } + }, + "required": [ + "id", + "warnings", + "class" ] }, - "CustomHealthcareEntitiesDocumentResultWithDocumentDetectedLanguage": { + "ClassificationResult": { "type": "object", - "allOf": [ - { - "$ref": "#/definitions/CustomHealthcareEntitiesDocumentResult" + "description": "Contains the classification result.", + "properties": { + "category": { + "type": "string", + "description": "Classification type." }, - { - "$ref": "#/definitions/DocumentDetectedLanguage" + "confidenceScore": { + "type": "number", + "format": "double", + "description": "Confidence score between 0 and 1 of the recognized class." } + }, + "required": [ + "category", + "confidenceScore" ] }, - "HealthcareEntitiesDocumentResult": { + "Conditionality": { + "type": "string", + "description": "Describes any conditionality on the entity.", + "enum": [ + "hypothetical", + "conditional" + ], + "x-ms-enum": { + "name": "Conditionality", + "modelAsString": false, + "values": [ + { + "name": "hypothetical", + "value": "hypothetical", + "description": "Hypothetical conditionality" + }, + { + "name": "conditional", + "value": "conditional", + "description": "Conditional conditionality" + } + ] + } + }, + "CurrencyMetadata": { "type": "object", + "description": "Represents the Currency ) entity Metadata model.", "properties": { - "entities": { - "description": "Healthcare entities.", - "type": "array", - "items": { - "$ref": "#/definitions/HealthcareEntity" - } + "value": { + "type": "number", + "format": "double", + "description": "The numeric value that the extracted text denotes." }, - "relations": { - "type": "array", - "description": "Healthcare entity relations.", - "items": { - "$ref": "#/definitions/HealthcareRelation" - } + "unit": { + "type": "string", + "description": "Currency unit." }, - "fhirBundle": { - "type": "object", - "description": "JSON bundle containing a FHIR compatible object for consumption in other Healthcare tools. For additional information see https://www.hl7.org/fhir/overview.html.", - "additionalProperties": {} + "iso4217": { + "type": "string", + "description": "The alphabetic code based on another ISO standard, ISO 3166, which lists the codes for country names. The first two letters of the ISO 4217 three-letter code are the same as the code for the country name, and, where possible, the third letter corresponds to the first letter of the currency name." } }, + "required": [ + "value", + "unit" + ], "allOf": [ { - "$ref": "#/definitions/DocumentResult" + "$ref": "#/definitions/BaseMetadata" } ], - "required": [ - "entities", - "relations" - ] + "x-ms-discriminator-value": "CurrencyMetadata" }, - "CustomHealthcareEntitiesDocumentResult": { + "CustomAbstractiveSummarizationLROResult": { "type": "object", + "description": "An object representing the results for an Custom Abstractive Summarization task.", "properties": { - "entities": { - "description": "Healthcare entities.", - "type": "array", - "items": { - "$ref": "#/definitions/CustomHealthcareEntity" - } - }, - "relations": { - "type": "array", - "description": "Healthcare entity relations.", - "items": { - "$ref": "#/definitions/HealthcareRelation" - } + "results": { + "$ref": "#/definitions/CustomAbstractiveSummarizationResult", + "description": "Results of the task." } }, + "required": [ + "results" + ], "allOf": [ { - "$ref": "#/definitions/DocumentResult" + "$ref": "#/definitions/AnalyzeTextLROResult" } ], - "required": [ - "entities", - "relations" - ] + "x-ms-discriminator-value": "CustomAbstractiveSummarizationLROResults" }, - "HealthcareEntity": { + "CustomAbstractiveSummarizationLROTask": { "type": "object", + "description": "An object representing the task definition for an Custom Abstractive Summarization task.", "properties": { - "text": { - "type": "string", - "description": "Entity text as appears in the request." + "parameters": { + "$ref": "#/definitions/CustomAbstractiveSummarizationTaskParameters", + "description": "Parameters for the Custom Abstractive Summarization task." + } + }, + "required": [ + "parameters" + ], + "allOf": [ + { + "$ref": "#/definitions/AnalyzeTextLROTask" + } + ], + "x-ms-discriminator-value": "CustomAbstractiveSummarization" + }, + "CustomAbstractiveSummarizationResult": { + "type": "object", + "description": "An object representing the custom summarization results of each document.", + "properties": { + "documents": { + "type": "array", + "description": "Response by document", + "items": { + "$ref": "#/definitions/AbstractiveSummaryDocumentResultWithDetectedLanguage" + } }, - "category": { - "x-ms-enum": { - "name": "healthcareEntityCategory", - "modelAsString": true - }, - "type": "string", - "description": "Healthcare Entity Category.", - "enum": [ - "BodyStructure", - "Age", - "Gender", - "Ethnicity", - "ExaminationName", - "Date", - "Direction", - "Frequency", - "MeasurementValue", - "MeasurementUnit", - "RelationalOperator", - "Time", - "Course", - "GeneOrProtein", - "Variant", - "Expression", - "MutationType", - "AdministrativeEvent", - "CareEnvironment", - "HealthcareProfession", - "Diagnosis", - "SymptomOrSign", - "ConditionQualifier", - "ConditionScale", - "MedicationClass", - "MedicationName", - "Dosage", - "MedicationForm", - "MedicationRoute", - "FamilyRelation", - "TreatmentName", - "Allergen", - "Employment", - "LivingStatus", - "SubstanceUse", - "SubstanceUseAmount" - ] + "errors": { + "type": "array", + "description": "Errors by document id.", + "items": { + "$ref": "#/definitions/DocumentError" + } }, - "subcategory": { + "statistics": { + "$ref": "#/definitions/RequestStatistics", + "description": "if showStats=true was specified in the request this field will contain information about the request payload." + }, + "projectName": { "type": "string", - "description": "(Optional) Entity sub type." + "description": "This field indicates the project name for the model." }, - "offset": { + "deploymentName": { + "type": "string", + "description": "This field indicates the deployment name for the model." + } + }, + "required": [ + "documents", + "errors", + "projectName", + "deploymentName" + ] + }, + "CustomAbstractiveSummarizationTaskParameters": { + "type": "object", + "description": "Supported parameters for the Custom Abstractive Summarization task.", + "properties": { + "sentenceCount": { "type": "integer", "format": "int32", - "description": "Start position for the entity text. Use of different 'stringIndexType' values can affect the offset returned." + "description": "Controls the approximate number of sentences in the output summaries." }, - "length": { - "type": "integer", - "format": "int32", - "description": "Length for the entity text. Use of different 'stringIndexType' values can affect the length returned." + "stringIndexType": { + "type": "string", + "description": "String index type", + "default": "TextElements_v8", + "enum": [ + "TextElements_v8", + "UnicodeCodePoint", + "Utf16CodeUnit" + ], + "x-ms-enum": { + "name": "StringIndexType", + "modelAsString": true, + "values": [ + { + "name": "TextElements_v8", + "value": "TextElements_v8", + "description": "Returned offset and length values will correspond to TextElements (Graphemes and Grapheme clusters) confirming to the Unicode 8.0.0 standard. Use this option if your application is written in .Net Framework or .Net Core and you will be using StringInfo." + }, + { + "name": "UnicodeCodePoint", + "value": "UnicodeCodePoint", + "description": "Returned offset and length values will correspond to Unicode code points. Use this option if your application is written in a language that support Unicode, for example Python." + }, + { + "name": "Utf16CodeUnit", + "value": "Utf16CodeUnit", + "description": "Returned offset and length values will correspond to UTF-16 code units. Use this option if your application is written in a language that support Unicode, for example Java, JavaScript." + } + ] + } }, - "confidenceScore": { - "type": "number", - "format": "double", - "description": "Confidence score between 0 and 1 of the extracted entity." + "summaryLength": { + "$ref": "#/definitions/SummaryLengthBucket", + "description": "(NOTE: Recommended to use summaryLength over sentenceCount) Controls the approximate length of the output summaries." }, - "assertion": { - "type": "object", - "$ref": "#/definitions/HealthcareAssertion" + "loggingOptOut": { + "type": "boolean", + "description": "logging opt out", + "default": false }, - "name": { - "description": "Preferred name for the entity. Example: 'histologically' would have a 'name' of 'histologic'.", - "type": "string" + "projectName": { + "type": "string", + "description": "This field indicates the project name for the model." }, - "links": { - "description": "Entity references in known data sources.", - "type": "array", - "items": { - "$ref": "#/definitions/HealthcareEntityLink" - } + "deploymentName": { + "type": "string", + "description": "This field indicates the deployment name for the model." } }, "required": [ - "text", - "category", - "offset", - "length", - "confidenceScore" + "projectName", + "deploymentName" ] }, - "CustomHealthcareEntity": { + "CustomEntitiesLROTask": { "type": "object", + "description": "Contains the custom text LRO task.", "properties": { - "entityComponentInformation": { - "description": "(Optional) Entity component information listing fired components of the extracted entity. This object only applies for custom healthcare.", - "type": "array", - "items": { - "$ref": "#/definitions/EntityComponentInformation" - } + "parameters": { + "$ref": "#/definitions/CustomEntitiesTaskParameters", + "description": "task parameters." } }, "allOf": [ { - "$ref": "#/definitions/HealthcareEntity" + "$ref": "#/definitions/AnalyzeTextLROTask" } - ] + ], + "x-ms-discriminator-value": "CustomEntityRecognition" }, - "HealthcareRelation": { + "CustomEntitiesResultWithDocumentDetectedLanguage": { "type": "object", - "description": "Every relation is an entity graph of a certain relationType, where all entities are connected and have specific roles within the relation context.", - "required": [ - "relationType", - "entities" - ], + "description": "Contains the list of detected custom entities result for the documents along with detected language.", "properties": { - "relationType": { - "description": "Type of relation. Examples include: `DosageOfMedication` or 'FrequencyOfMedication', etc.", - "type": "string", - "enum": [ - "Abbreviation", - "BodySiteOfCondition", - "BodySiteOfTreatment", - "CourseOfCondition", - "CourseOfExamination", - "CourseOfMedication", - "CourseOfTreatment", - "DirectionOfBodyStructure", - "DirectionOfCondition", - "DirectionOfExamination", - "DirectionOfTreatment", - "DosageOfMedication", - "ExaminationFindsCondition", - "ExpressionOfGene", - "ExpressionOfVariant", - "FormOfMedication", - "FrequencyOfCondition", - "FrequencyOfMedication", - "FrequencyOfTreatment", - "MutationTypeOfGene", - "MutationTypeOfVariant", - "QualifierOfCondition", - "RelationOfExamination", - "RouteOfMedication", - "ScaleOfCondition", - "TimeOfCondition", - "TimeOfEvent", - "TimeOfExamination", - "TimeOfMedication", - "TimeOfTreatment", - "UnitOfCondition", - "UnitOfExamination", - "ValueOfCondition", - "ValueOfExamination", - "VariantOfGene" - ], - "x-ms-enum": { - "name": "relationType", - "modelAsString": true + "errors": { + "type": "array", + "description": "Errors by document id.", + "items": { + "$ref": "#/definitions/DocumentError" } }, - "confidenceScore": { - "type": "number", - "format": "double", - "description": "Confidence score between 0 and 1 of the extracted relation." + "statistics": { + "$ref": "#/definitions/RequestStatistics", + "description": "if showStats=true was specified in the request this field will contain information about the request payload." }, - "entities": { - "description": "The entities in the relation.", + "projectName": { + "type": "string", + "description": "This field indicates the project name for the model." + }, + "deploymentName": { + "type": "string", + "description": "This field indicates the deployment name for the model." + }, + "documents": { "type": "array", + "description": "Enumeration of the document results with detected language.", "items": { - "$ref": "#/definitions/HealthcareRelationEntity" + "$ref": "#/definitions/EntitiesDocumentResultWithDetectedLanguage" } } - } + }, + "required": [ + "errors", + "projectName", + "deploymentName", + "documents" + ] }, - "HealthcareAssertion": { + "CustomEntitiesTaskParameters": { "type": "object", + "description": "Supported parameters for a Custom Entities task.", "properties": { - "conditionality": { - "description": "Describes any conditionality on the entity.", - "type": "string", - "enum": [ - "hypothetical", - "conditional" - ], - "x-ms-enum": { - "name": "Conditionality", - "modelAsString": false - } + "loggingOptOut": { + "type": "boolean", + "description": "logging opt out", + "default": false }, - "certainty": { - "description": "Describes the entities certainty and polarity.", + "projectName": { "type": "string", - "enum": [ - "positive", - "positivePossible", - "neutralPossible", - "negativePossible", - "negative" - ], - "x-ms-enum": { - "name": "Certainty", - "modelAsString": false - } + "description": "This field indicates the project name for the model." }, - "association": { - "description": "Describes if the entity is the subject of the text or if it describes someone else.", + "deploymentName": { "type": "string", - "enum": [ - "subject", - "other" - ], - "x-ms-enum": { - "name": "Association", - "modelAsString": false - } + "description": "This field indicates the deployment name for the model." }, - "temporality": { - "description": "Describes temporal information regarding the entity.", + "stringIndexType": { "type": "string", + "description": "Optional parameter to provide the string index type used to interpret string offsets. Defaults to TextElements (Graphemes).", + "default": "TextElements_v8", "enum": [ - "current", - "past", - "future" + "TextElements_v8", + "UnicodeCodePoint", + "Utf16CodeUnit" ], "x-ms-enum": { - "name": "Temporality", - "modelAsString": false + "name": "StringIndexType", + "modelAsString": true, + "values": [ + { + "name": "TextElements_v8", + "value": "TextElements_v8", + "description": "Returned offset and length values will correspond to TextElements (Graphemes and Grapheme clusters) confirming to the Unicode 8.0.0 standard. Use this option if your application is written in .Net Framework or .Net Core and you will be using StringInfo." + }, + { + "name": "UnicodeCodePoint", + "value": "UnicodeCodePoint", + "description": "Returned offset and length values will correspond to Unicode code points. Use this option if your application is written in a language that support Unicode, for example Python." + }, + { + "name": "Utf16CodeUnit", + "value": "Utf16CodeUnit", + "description": "Returned offset and length values will correspond to UTF-16 code units. Use this option if your application is written in a language that support Unicode, for example Java, JavaScript." + } + ] } } - } + }, + "required": [ + "projectName", + "deploymentName" + ] }, - "HealthcareRelationEntity": { + "CustomEntityRecognitionLROResult": { "type": "object", - "required": [ - "ref", - "role" - ], + "description": "Contains the custom entity recognition job result.", "properties": { - "ref": { - "description": "Reference link object, using a JSON pointer RFC 6901 (URI Fragment Identifier Representation), pointing to the entity .", - "type": "string" - }, - "role": { - "description": "Role of entity in the relationship. For example: 'CD20-positive diffuse large B-cell lymphoma' has the following entities with their roles in parenthesis: CD20 (GeneOrProtein), Positive (Expression), diffuse large B-cell lymphoma (Diagnosis).", - "type": "string" + "results": { + "$ref": "#/definitions/CustomEntitiesResultWithDocumentDetectedLanguage", + "description": "List of results." } - } - }, - "HealthcareEntityLink": { - "type": "object", + }, "required": [ - "dataSource", - "id" + "results" ], - "properties": { - "dataSource": { - "description": "Entity Catalog. Examples include: UMLS, CHV, MSH, etc.", - "type": "string" - }, - "id": { - "description": "Entity id in the given source catalog.", - "type": "string" + "allOf": [ + { + "$ref": "#/definitions/AnalyzeTextLROResult" } - } + ], + "x-ms-discriminator-value": "CustomEntityRecognitionLROResults" }, - "EntityComponentInformation": { - "description": "This object contains information of the detected entity components. The possible component types may expand in the future. Parsing code should handle unexpected values gracefully", + "CustomHealthcareEntitiesDocumentResultWithDocumentDetectedLanguage": { "type": "object", - "discriminator": "entityComponentKind", + "description": "Contains the document custom healthcare results with detected language.", "properties": { - "entityComponentKind": { - "description": "The component object kind.", + "id": { "type": "string", - "enum": [ - "PrebuiltComponent", - "LearnedComponent", - "ListComponent" - ], - "x-ms-enum": { - "name": "entityComponentKind", - "modelAsString": true - } + "description": "Unique, non-empty document identifier." + }, + "warnings": { + "type": "array", + "description": "Warnings encountered while processing document.", + "items": { + "$ref": "#/definitions/DocumentWarning" + }, + "x-ms-identifiers": [] + }, + "statistics": { + "$ref": "#/definitions/DocumentStatistics", + "description": "if showStats=true was specified in the request this field will contain information about the document payload." + }, + "entities": { + "type": "array", + "description": "Healthcare entities.", + "items": { + "$ref": "#/definitions/CustomHealthcareEntity" + }, + "x-ms-identifiers": [] + }, + "relations": { + "type": "array", + "description": "Healthcare entity relations.", + "items": { + "$ref": "#/definitions/HealthcareRelation" + }, + "x-ms-identifiers": [] + }, + "detectedLanguage": { + "$ref": "#/definitions/DetectedLanguage", + "description": "If 'language' is set to 'auto' for the document in the request this field will contain a 2 letter ISO 639-1 representation of the language detected for this document." } }, "required": [ - "entityComponentKind" + "id", + "warnings", + "entities", + "relations" ] }, - "PrebuiltComponent": { - "description": "This object contains information of the prebuilt component of the detected entity.", - "allOf": [ - { - "$ref": "#/definitions/EntityComponentInformation" - } - ], + "CustomHealthcareEntity": { "type": "object", - "x-ms-discriminator-value": "PrebuiltComponent", + "description": "Contains the custom healthcare entity.", "properties": { - "value": { + "text": { "type": "string", - "description": "The prebuilt component of an extracted entity type." - } - } + "description": "Entity text as appears in the request." + }, + "category": { + "$ref": "#/definitions/healthcareEntityCategory", + "description": "Healthcare Entity Category." + }, + "subcategory": { + "type": "string", + "description": "(Optional) Entity sub type." + }, + "offset": { + "type": "integer", + "format": "int32", + "description": "Start position for the entity text. Use of different 'stringIndexType' values can affect the offset returned." + }, + "length": { + "type": "integer", + "format": "int32", + "description": "Length for the entity text. Use of different 'stringIndexType' values can affect the length returned." + }, + "confidenceScore": { + "type": "number", + "format": "double", + "description": "Confidence score between 0 and 1 of the extracted entity." + }, + "assertion": { + "$ref": "#/definitions/HealthcareAssertion", + "description": "Assertion of the entity." + }, + "name": { + "type": "string", + "description": "Preferred name for the entity. Example: 'histologically' would have a 'name' of 'histologic'." + }, + "links": { + "type": "array", + "description": "Entity references in known data sources.", + "items": { + "$ref": "#/definitions/HealthcareEntityLink" + } + }, + "entityComponentInformation": { + "type": "array", + "description": "(Optional) Entity component information listing fired components of the extracted entity. This object only applies for custom healthcare.", + "items": { + "$ref": "#/definitions/EntityComponentInformation" + }, + "x-ms-identifiers": [] + } + }, + "required": [ + "text", + "category", + "offset", + "length", + "confidenceScore" + ] }, - "LearnedComponent": { - "description": "This object contains information of the learned component of the detected entity.", + "CustomHealthcareLROResult": { + "type": "object", + "description": "Contains the custom healthcare job result.", + "properties": { + "results": { + "$ref": "#/definitions/CustomHealthcareResult", + "description": "Contains the list of document results." + } + }, + "required": [ + "results" + ], "allOf": [ { - "$ref": "#/definitions/EntityComponentInformation" + "$ref": "#/definitions/AnalyzeTextLROResult" } ], + "x-ms-discriminator-value": "CustomHealthcareLROResults" + }, + "CustomHealthcareLROTask": { "type": "object", - "x-ms-discriminator-value": "LearnedComponent", + "description": "Contains the custom healthcare task definition.", "properties": { - "value": { - "type": "string", - "description": "The learned component of an extracted entity type." + "parameters": { + "$ref": "#/definitions/CustomHealthcareTaskParameters", + "description": "Contains the custom healthcare task parameters." } - } - }, - "ListComponent": { - "description": "This object contains information of the list component of the detected entity.", + }, "allOf": [ { - "$ref": "#/definitions/EntityComponentInformation" + "$ref": "#/definitions/AnalyzeTextLROTask" } ], + "x-ms-discriminator-value": "CustomHealthcare" + }, + "CustomHealthcareResult": { "type": "object", - "x-ms-discriminator-value": "ListComponent", + "description": "Contains the custom healthcare result for the request.", "properties": { - "value": { + "errors": { + "type": "array", + "description": "Errors by document id.", + "items": { + "$ref": "#/definitions/DocumentError" + } + }, + "statistics": { + "$ref": "#/definitions/RequestStatistics", + "description": "if showStats=true was specified in the request this field will contain information about the request payload." + }, + "projectName": { "type": "string", - "description": "The list key of an extracted entity type." + "description": "This field indicates the project name for the model." + }, + "deploymentName": { + "type": "string", + "description": "This field indicates the deployment name for the model." + }, + "documents": { + "type": "array", + "description": "List of custom healthcare results for the document.", + "items": { + "$ref": "#/definitions/CustomHealthcareEntitiesDocumentResultWithDocumentDetectedLanguage" + } } - } + }, + "required": [ + "errors", + "projectName", + "deploymentName", + "documents" + ] }, - "SentimentAnalysisTaskParameters": { + "CustomHealthcareTaskParameters": { "type": "object", - "description": "Supported parameters for a Sentiment Analysis task.", + "description": "Supported parameters for a custom Healthcare task.", "properties": { - "opinionMining": { + "loggingOptOut": { "type": "boolean", + "description": "logging opt out", "default": false }, + "projectName": { + "type": "string", + "description": "This field indicates the project name for the model." + }, + "deploymentName": { + "type": "string", + "description": "This field indicates the deployment name for the model." + }, "stringIndexType": { - "$ref": "common.json#/definitions/StringIndexType" + "type": "string", + "description": "Optional parameter to provide the string index type used to interpret string offsets. Defaults to TextElements (Graphemes).", + "default": "TextElements_v8", + "enum": [ + "TextElements_v8", + "UnicodeCodePoint", + "Utf16CodeUnit" + ], + "x-ms-enum": { + "name": "StringIndexType", + "modelAsString": true, + "values": [ + { + "name": "TextElements_v8", + "value": "TextElements_v8", + "description": "Returned offset and length values will correspond to TextElements (Graphemes and Grapheme clusters) confirming to the Unicode 8.0.0 standard. Use this option if your application is written in .Net Framework or .Net Core and you will be using StringInfo." + }, + { + "name": "UnicodeCodePoint", + "value": "UnicodeCodePoint", + "description": "Returned offset and length values will correspond to Unicode code points. Use this option if your application is written in a language that support Unicode, for example Python." + }, + { + "name": "Utf16CodeUnit", + "value": "Utf16CodeUnit", + "description": "Returned offset and length values will correspond to UTF-16 code units. Use this option if your application is written in a language that support Unicode, for example Java, JavaScript." + } + ] + } } }, - "allOf": [ - { - "$ref": "common.json#/definitions/PreBuiltTaskParameters" - } + "required": [ + "projectName", + "deploymentName" ] }, - "SentimentAnalysisLROTask": { + "CustomLabelClassificationResultWithDocumentDetectedLanguage": { "type": "object", - "description": "An object representing the task definition for a Sentiment Analysis task.", + "description": "Contains the custom label classification with detected language results.", "properties": { - "parameters": { - "$ref": "#/definitions/SentimentAnalysisTaskParameters" + "errors": { + "type": "array", + "description": "Errors by document id.", + "items": { + "$ref": "#/definitions/DocumentError" + } + }, + "statistics": { + "$ref": "#/definitions/RequestStatistics", + "description": "if showStats=true was specified in the request this field will contain information about the request payload." + }, + "projectName": { + "type": "string", + "description": "This field indicates the project name for the model." + }, + "deploymentName": { + "type": "string", + "description": "This field indicates the deployment name for the model." + }, + "documents": { + "type": "array", + "description": "Response by document", + "items": { + "$ref": "#/definitions/ClassificationDocumentResultWithDetectedLanguage" + } } }, - "allOf": [ - { - "$ref": "#/definitions/AnalyzeTextLROTask" - } - ], - "x-ms-discriminator-value": "SentimentAnalysis" + "required": [ + "errors", + "projectName", + "deploymentName", + "documents" + ] }, - "SentimentTaskResult": { + "CustomMultiLabelClassificationLROResult": { "type": "object", + "description": "Contains the custom multi label classification job result.", "properties": { "results": { - "$ref": "#/definitions/SentimentResponse" + "$ref": "#/definitions/CustomLabelClassificationResultWithDocumentDetectedLanguage", + "description": "List of results." } }, + "required": [ + "results" + ], "allOf": [ { - "$ref": "#/definitions/AnalyzeTextTaskResult" + "$ref": "#/definitions/AnalyzeTextLROResult" } ], - "required": [ - "results" - ], - "x-ms-discriminator-value": "SentimentAnalysisResults" + "x-ms-discriminator-value": "CustomMultiLabelClassificationLROResults" }, - "SentimentResponse": { + "CustomMultiLabelClassificationLROTask": { "type": "object", + "description": "Use custom models to classify text into multi label taxonomy", "properties": { - "documents": { - "type": "array", - "description": "Sentiment analysis per document.", - "items": { - "$ref": "#/definitions/SentimentDocumentResultWithDetectedLanguage" - } + "parameters": { + "$ref": "#/definitions/CustomMultiLabelClassificationTaskParameters", + "description": "Task parameters." } }, "allOf": [ { - "$ref": "common.json#/definitions/PreBuiltResult" + "$ref": "#/definitions/AnalyzeTextLROTask" } ], - "required": [ - "documents" - ] - }, - "SentimentDocumentResultWithDetectedLanguage": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/SentimentDocumentResult" - }, - { - "$ref": "#/definitions/DocumentDetectedLanguage" - } - ] + "x-ms-discriminator-value": "CustomMultiLabelClassification" }, - "CustomSentimentDocumentResult": { + "CustomMultiLabelClassificationTaskParameters": { "type": "object", + "description": "Supported parameters for a Custom Multi Classification task.", "properties": { - "sentiment": { - "type": "string", - "description": "Predicted sentiment for document (Negative, Neutral, Positive, or Mixed).", - "enum": [ - "positive", - "neutral", - "negative", - "mixed" - ], - "x-ms-enum": { - "name": "DocumentSentimentValue", - "modelAsString": false - } + "loggingOptOut": { + "type": "boolean", + "description": "logging opt out", + "default": false }, - "confidenceScores": { - "description": "Document level sentiment confidence scores between 0 and 1 for each sentiment class.", - "$ref": "#/definitions/SentimentConfidenceScorePerLabel" + "projectName": { + "type": "string", + "description": "This field indicates the project name for the model." }, - "sentences": { - "type": "array", - "description": "Sentence level sentiment analysis.", - "items": { - "$ref": "#/definitions/CustomSentenceSentiment" - } + "deploymentName": { + "type": "string", + "description": "This field indicates the deployment name for the model." } }, - "allOf": [ - { - "$ref": "#/definitions/DocumentResult" - } - ], "required": [ - "sentiment", - "confidenceScores", - "sentences" + "projectName", + "deploymentName" ] }, "CustomSentenceSentiment": { "type": "object", - "required": [ - "text", - "sentiment", - "confidenceScores", - "offset", - "length" - ], + "description": "A document's sentence custom sentiment.", "properties": { "text": { "type": "string", "description": "The sentence text." }, "sentiment": { - "type": "string", - "description": "The predicted Sentiment for the sentence.", - "enum": [ - "positive", - "neutral", - "negative" - ], - "x-ms-enum": { - "name": "SentenceSentimentValue", - "modelAsString": false - } + "$ref": "#/definitions/SentenceSentimentValue", + "description": "The predicted Sentiment for the sentence." }, "confidenceScores": { - "description": "The sentiment confidence score between 0 and 1 for the sentence for all classes.", - "$ref": "#/definitions/SentimentConfidenceScorePerLabel" + "$ref": "#/definitions/SentimentConfidenceScores", + "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." + "description": "The target offset from the start of the sentence." }, "length": { "type": "integer", "format": "int32", - "description": "The length of the sentence." - } - } - }, - "SentimentDocumentResult": { - "type": "object", - "properties": { - "sentiment": { - "type": "string", - "description": "Predicted sentiment for document (Negative, Neutral, Positive, or Mixed).", - "enum": [ - "positive", - "neutral", - "negative", - "mixed" - ], - "x-ms-enum": { - "name": "DocumentSentimentValue", - "modelAsString": false - } - }, - "confidenceScores": { - "description": "Document level sentiment confidence scores between 0 and 1 for each sentiment class.", - "$ref": "#/definitions/SentimentConfidenceScorePerLabel" - }, - "sentences": { - "type": "array", - "description": "Sentence level sentiment analysis.", - "items": { - "$ref": "#/definitions/SentenceSentiment" - } + "description": "The length of the target." } }, - "allOf": [ - { - "$ref": "#/definitions/DocumentResult" - } - ], "required": [ + "text", "sentiment", "confidenceScores", - "sentences" + "offset", + "length" ] }, - "SentimentConfidenceScorePerLabel": { + "CustomSentimentAnalysisLROResult": { "type": "object", + "description": "Custom Sentiment Analysis Analyze Text long tunning operation result object.", + "properties": { + "results": { + "$ref": "#/definitions/CustomSentimentAnalysisResult", + "description": "Results of the task." + } + }, "required": [ - "positive", - "neutral", - "negative" + "results" ], + "allOf": [ + { + "$ref": "#/definitions/AnalyzeTextLROResult" + } + ], + "x-ms-discriminator-value": "CustomSentimentAnalysisLROResults" + }, + "CustomSentimentAnalysisLROTask": { + "type": "object", + "description": "Use custom models to ease the process of sentiment analysis from documents like product reviews", "properties": { - "positive": { - "type": "number", - "format": "double", - "description": "Confidence score for positive sentiment" - }, - "neutral": { - "type": "number", - "format": "double", - "description": "Confidence score for neutral sentiment" - }, - "negative": { - "type": "number", - "format": "double", - "description": "Confidence score for negative sentiment" + "parameters": { + "$ref": "#/definitions/CustomSentimentAnalysisTaskParameters", + "description": "Custom Sentiment Analysis task parameters." } }, - "description": "Represents the confidence scores between 0 and 1 across all sentiment classes: positive, neutral, negative." + "allOf": [ + { + "$ref": "#/definitions/AnalyzeTextLROTask" + } + ], + "x-ms-discriminator-value": "CustomSentimentAnalysis" }, - "SentenceSentiment": { + "CustomSentimentAnalysisResult": { "type": "object", - "required": [ - "text", - "sentiment", - "confidenceScores", - "offset", - "length" - ], + "description": "Custom Sentiment analysis results for the input documents.", "properties": { - "text": { - "type": "string", - "description": "The sentence text." - }, - "sentiment": { - "type": "string", - "description": "The predicted Sentiment for the sentence.", - "enum": [ - "positive", - "neutral", - "negative" - ], - "x-ms-enum": { - "name": "SentenceSentimentValue", - "modelAsString": false + "errors": { + "type": "array", + "description": "Errors by document id.", + "items": { + "$ref": "#/definitions/DocumentError" } }, - "confidenceScores": { - "description": "The sentiment confidence score between 0 and 1 for the sentence for all classes.", - "$ref": "#/definitions/SentimentConfidenceScorePerLabel" - }, - "offset": { - "type": "integer", - "format": "int32", - "description": "The sentence offset from the start of the document." + "statistics": { + "$ref": "#/definitions/RequestStatistics", + "description": "if showStats=true was specified in the request this field will contain information about the request payload." }, - "length": { - "type": "integer", - "format": "int32", - "description": "The length of the sentence." + "projectName": { + "type": "string", + "description": "This field indicates the project name for the model." }, - "targets": { - "type": "array", - "description": "The array of sentence targets for the sentence.", - "items": { - "$ref": "#/definitions/SentenceTarget" - } + "deploymentName": { + "type": "string", + "description": "This field indicates the deployment name for the model." }, - "assessments": { + "documents": { "type": "array", - "description": "The array of assessments for the sentence.", + "description": "The custom sentiment analysis results for each document in the input.", "items": { - "$ref": "#/definitions/SentenceAssessment" + "$ref": "#/definitions/CustomSentimentAnalysisResultDocument" } } - } + }, + "required": [ + "errors", + "projectName", + "deploymentName", + "documents" + ] }, - "SentenceTarget": { + "CustomSentimentAnalysisResultDocument": { "type": "object", - "required": [ - "confidenceScores", - "length", - "offset", - "relations", - "sentiment", - "text" - ], + "description": "Custom Sentiment analysis result for a specific document.", "properties": { - "sentiment": { + "id": { "type": "string", - "enum": [ - "positive", - "mixed", - "negative" - ], - "x-ms-enum": { - "name": "TokenSentimentValue", - "modelAsString": false - }, - "description": "Targeted sentiment in the sentence." + "description": "Unique, non-empty document identifier." }, - "confidenceScores": { - "description": "Target sentiment confidence scores for the target in the sentence.", - "$ref": "#/definitions/TargetConfidenceScoreLabel" + "warnings": { + "type": "array", + "description": "Warnings encountered while processing document.", + "items": { + "$ref": "#/definitions/DocumentWarning" + }, + "x-ms-identifiers": [] }, - "offset": { - "type": "integer", - "format": "int32", - "description": "The target offset from the start of the sentence." + "statistics": { + "$ref": "#/definitions/DocumentStatistics", + "description": "if showStats=true was specified in the request this field will contain information about the document payload." }, - "length": { - "type": "integer", - "format": "int32", - "description": "The length of the target." + "sentiment": { + "$ref": "#/definitions/DocumentSentimentValue", + "description": "Predicted sentiment for document (Negative, Neutral, Positive, or Mixed)." }, - "text": { - "type": "string", - "description": "The target text detected." + "confidenceScores": { + "$ref": "#/definitions/SentimentConfidenceScores", + "description": "The sentiment confidence score between 0 and 1 for the sentence for all classes." }, - "relations": { + "sentences": { "type": "array", - "description": "The array of either assessment or target objects which is related to the target.", + "description": "The document's sentences sentiment.", "items": { - "$ref": "#/definitions/TargetRelation" - } + "$ref": "#/definitions/CustomSentenceSentiment" + }, + "x-ms-identifiers": [] + }, + "detectedLanguage": { + "$ref": "#/definitions/DetectedLanguage", + "description": "If 'language' is set to 'auto' for the document in the request this field will contain a 2 letter ISO 639-1 representation of the language detected for this document." } - } - }, - "SentenceAssessment": { - "type": "object", + }, "required": [ - "confidenceScores", - "isNegated", - "length", - "offset", + "id", + "warnings", "sentiment", - "text" - ], + "confidenceScores", + "sentences" + ] + }, + "CustomSentimentAnalysisTaskParameters": { + "type": "object", + "description": "Supported parameters for a Custom Sentiment Analysis task.", "properties": { - "sentiment": { - "type": "string", - "enum": [ - "positive", - "mixed", - "negative" - ], - "x-ms-enum": { - "name": "TokenSentimentValue", - "modelAsString": false - }, - "description": "Assessment sentiment in the sentence." - }, - "confidenceScores": { - "description": "Assessment sentiment confidence scores in the sentence.", - "$ref": "#/definitions/TargetConfidenceScoreLabel" - }, - "offset": { - "type": "integer", - "format": "int32", - "description": "The assessment offset from the start of the sentence." + "loggingOptOut": { + "type": "boolean", + "description": "logging opt out", + "default": false }, - "length": { - "type": "integer", - "format": "int32", - "description": "The length of the assessment." + "projectName": { + "type": "string", + "description": "This field indicates the project name for the model." }, - "text": { + "deploymentName": { "type": "string", - "description": "The assessment text detected." + "description": "This field indicates the deployment name for the model." }, - "isNegated": { - "type": "boolean", - "description": "The indicator representing if the assessment is negated." - } - } - }, - "TargetRelation": { - "type": "object", - "required": [ - "ref", - "relationType" - ], - "properties": { - "relationType": { + "stringIndexType": { "type": "string", + "description": "Specifies the method used to interpret string offsets.", + "default": "TextElements_v8", "enum": [ - "assessment", - "target" + "TextElements_v8", + "UnicodeCodePoint", + "Utf16CodeUnit" ], "x-ms-enum": { - "name": "TargetRelationType", - "modelAsString": false - }, - "description": "The type related to the target." - }, - "ref": { - "type": "string", - "description": "The JSON pointer indicating the linked object." - } - } - }, - "TargetConfidenceScoreLabel": { - "type": "object", - "required": [ - "negative", - "positive" - ], - "properties": { - "positive": { - "type": "number", - "format": "double", - "description": "Confidence score for positive sentiment" - }, - "negative": { - "type": "number", - "format": "double", - "description": "Confidence score for negative sentiment" + "name": "StringIndexType", + "modelAsString": true, + "values": [ + { + "name": "TextElements_v8", + "value": "TextElements_v8", + "description": "Returned offset and length values will correspond to TextElements (Graphemes and Grapheme clusters) confirming to the Unicode 8.0.0 standard. Use this option if your application is written in .Net Framework or .Net Core and you will be using StringInfo." + }, + { + "name": "UnicodeCodePoint", + "value": "UnicodeCodePoint", + "description": "Returned offset and length values will correspond to Unicode code points. Use this option if your application is written in a language that support Unicode, for example Python." + }, + { + "name": "Utf16CodeUnit", + "value": "Utf16CodeUnit", + "description": "Returned offset and length values will correspond to UTF-16 code units. Use this option if your application is written in a language that support Unicode, for example Java, JavaScript." + } + ] + } } }, - "description": "Represents the confidence scores across all sentiment classes: positive and negative." + "required": [ + "projectName", + "deploymentName" + ] }, - "CustomSentimentAnalysisTaskParameters": { + "CustomSingleLabelClassificationLROResult": { "type": "object", - "description": "Supported parameters for a Custom Sentiment Analysis task.", + "description": "Contains the custom single label classification job result.", "properties": { - "stringIndexType": { - "$ref": "common.json#/definitions/StringIndexType" + "results": { + "$ref": "#/definitions/CustomLabelClassificationResultWithDocumentDetectedLanguage", + "description": "List of results." } }, + "required": [ + "results" + ], "allOf": [ { - "$ref": "common.json#/definitions/CustomTaskParameters" + "$ref": "#/definitions/AnalyzeTextLROResult" } - ] + ], + "x-ms-discriminator-value": "CustomSingleLabelClassificationLROResults" }, - "CustomSentimentAnalysisLROTask": { + "CustomSingleLabelClassificationLROTask": { "type": "object", - "description": "Use custom models to ease the process of sentiment analysis from documents like product reviews", + "description": "Use custom models to classify text into single label taxonomy", "properties": { "parameters": { - "$ref": "#/definitions/CustomSentimentAnalysisTaskParameters" + "$ref": "#/definitions/CustomSingleLabelClassificationTaskParameters", + "description": "Task parameters" } }, "allOf": [ @@ -1795,620 +2402,444 @@ "$ref": "#/definitions/AnalyzeTextLROTask" } ], - "x-ms-discriminator-value": "CustomSentimentAnalysis" + "x-ms-discriminator-value": "CustomSingleLabelClassification" }, - "CustomSentimentAnalysisResult": { + "CustomSingleLabelClassificationTaskParameters": { "type": "object", + "description": "Supported parameters for a Custom Single Classification task.", "properties": { - "documents": { - "type": "array", - "description": "Sentiment analysis per document.", - "items": { - "$ref": "#/definitions/CustomSentimentAnalysisResultWithDetectedLanguage" - } + "loggingOptOut": { + "type": "boolean", + "description": "logging opt out", + "default": false + }, + "projectName": { + "type": "string", + "description": "This field indicates the project name for the model." + }, + "deploymentName": { + "type": "string", + "description": "This field indicates the deployment name for the model." } }, - "allOf": [ - { - "$ref": "common.json#/definitions/CustomResult" - } - ], "required": [ - "documents" + "projectName", + "deploymentName" ] }, - "CustomSentimentAnalysisResultWithDetectedLanguage": { - "description": "Custom Sentiment analysis result on one document with detected language", + "DateMetadata": { "type": "object", - "allOf": [ - { - "$ref": "#/definitions/CustomSentimentDocumentResult" - }, - { - "$ref": "#/definitions/DocumentDetectedLanguage" - } - ] - }, - "EntityList": { - "description": "(Optional) describes the entity categories.", - "items": { - "type": "string", - "enum": [ - "Address", - "Numeric", - "Age", - "Currency", - "Number", - "NumberRange", - "Percentage", - "Ordinal", - "Temperature", - "Dimension", - "Length", - "Weight", - "Height", - "Speed", - "Area", - "Volume", - "Information", - "Temporal", - "Date", - "Time", - "DateTime", - "DateRange", - "TimeRange", - "DateTimeRange", - "Duration", - "SetTemporal", - "Event", - "SportsEvent", - "CulturalEvent", - "NaturalEvent", - "Location", - "GPE", - "City", - "State", - "CountryRegion", - "Continent", - "Structural", - "Airport", - "Geological", - "Organization", - "OrganizationMedical", - "OrganizationStockExchange", - "OrganizationSports", - "Person", - "PersonType", - "Email", - "URL", - "IP", - "PhoneNumber", - "Product", - "ComputingProduct", - "Skill" - ], - "x-ms-enum": { - "name": "EntityCategory", - "modelAsString": true, - "values": [ - { - "value": "Address", - "description": "Specific street-level mentions of locations: house/building numbers, streets, avenues, highways, intersections referenced by name." - }, - { - "value": "Numeric", - "description": "Numeric values, including digits and number words." - }, - { - "value": "Age", - "description": "Age-related values." - }, - { - "value": "Currency", - "description": "Currency-related values." - }, - { - "value": "Number", - "description": "Numbers without a unit" - }, - { - "value": "NumberRange", - "description": "Range of Numbers" - }, - { - "value": "Percentage", - "description": "Percentage-related values." - }, - { - "value": "Ordinal", - "description": "Ordinal numbers." - }, - { - "value": "Temperature", - "description": "Temperature-related values." - }, - { - "value": "Dimension", - "description": "Dimension of measurements" - }, - { - "value": "Length", - "description": "Length of an object." - }, - { - "value": "Weight", - "description": "Weight of an object." - }, - { - "value": "Height", - "description": "Height of an object." - }, - { - "value": "Speed", - "description": "Speed of an object." - }, - { - "value": "Area", - "description": "Area of an object." - }, - { - "value": "Volume", - "description": "Volume of an object." - }, - { - "value": "Information", - "description": "Unit of measure for digital information." - }, - { - "value": "Temporal", - "description": "Items relating to time." - }, - { - "value": "Date", - "description": "Calendar dates." - }, - { - "value": "Time", - "description": "Times of day." - }, - { - "value": "DateTime", - "description": "Calendar dates with time." - }, - { - "value": "DateRange", - "description": "Range of dates." - }, - { - "value": "TimeRange", - "description": "Range of times." - }, - { - "value": "DateTimeRange", - "description": "Range of date and time." - }, - { - "value": "Duration", - "description": "Duration of time." - }, - { - "value": "SetTemporal", - "description": "Set of time-related values." - }, - { - "value": "Event", - "description": "Social, sports, business, political, educational, natural, historical, criminal, violent, legal, military events with a timed period." - }, - { - "value": "SportsEvent", - "description": "Sports event-related values." - }, - { - "value": "CulturalEvent", - "description": "Cultural event-related values." - }, - { - "value": "NaturalEvent", - "description": "Natural event-related values." - }, - { - "value": "Location", - "description": "Particular point or place in physical space." - }, - { - "value": "GPE", - "description": "Cities, countries/regions, states.", - "name": "GeoPoliticalEntity" - }, - { - "value": "City", - "description": "City-related values." - }, - { - "value": "State", - "description": "State-related values." - }, - { - "value": "CountryRegion", - "description": "Country or region-related values." - }, - { - "value": "Continent", - "description": "Continent-related values." - }, - { - "value": "Structural", - "description": "Manmade structures." - }, - { - "value": "Airport", - "description": "Airports." - }, - { - "value": "Geological", - "description": " Geographic and natural features such as rivers, oceans, and deserts." - }, - { - "value": "Organization", - "description": "Corporations, agencies, and other groups of people defined by some established organizational structure. These labels can include companies, political parties/movements, musical bands, sport clubs, government bodies, and public organizations. Nationalities or religions are not ORGANIZATION." - }, - { - "value": "OrganizationMedical", - "description": "Medical companies and groups." - }, - { - "value": "OrganizationStockExchange", - "description": "Stock exchange groups." - }, - { - "value": "OrganizationSports", - "description": "Sports-related organizations." - }, - { - "value": "Person", - "description": "First, last, and middle names, names of fictional characters, and aliases. Titles, such as “Mr.” or “President”, are not considered part of the named entity." - }, - { - "value": "PersonType", - "description": "Human roles classified by a group membership." - }, - { - "value": "Email", - "description": "Email addresses." - }, - { - "value": "URL", - "description": "URLs to websites." - }, - { - "value": "IP", - "description": "network IP addresses." - }, - { - "value": "PhoneNumber", - "description": "Phone numbers (US and EU phone numbers only)." - }, - { - "value": "Product", - "description": "Single or group of commercial, consumable objects, electronics, vehicles, food groups." - }, - { - "value": "ComputingProduct", - "description": "Computing products." - }, - { - "value": "Skill", - "description": "A capability, skill, or expertise." - } - ] - } - }, - "type": "array", - "uniqueItems": true - }, - "BaseEntityOverlapPolicy": { - "description": "The abstract base class for entity OverlapPolicy.", - "type": "object", - "discriminator": "policyKind", + "description": "A Metadata for date entity instances.", "properties": { - "policyKind": { - "description": "The entity OverlapPolicy object kind.", - "type": "string", - "default": "matchLongest", - "enum": [ - "matchLongest", - "allowOverlap" - ], - "x-ms-enum": { - "name": "policyKind", - "modelAsString": true - } + "dateValues": { + "type": "array", + "description": "List of date values.", + "items": { + "$ref": "#/definitions/DateValue" + }, + "x-ms-identifiers": [] } }, - "required": [ - "policyKind" - ] - }, - "EntityInferenceOptions": { - "description": "The class that house the inference options allowed for named entity recognition.", - "type": "object", - "properties": { - "excludeNormalizedValues": { - "description": "Option to include/exclude the detected entity values to be normalized and included in the metadata. The numeric and temporal entity types support value normalization.", - "type": "boolean", - "default": "false" - } - } - }, - "MatchLongestEntityPolicyType": { - "description": "Represents the Match longest overlap policy. No overlapping entities as far as it is possible. 1. If there are overlapping entities, the longest one will be returned. 2. If the set of characters predicted for 2 or more entities are exactly the same, select the entity that has the higher confidence score.3. If the entity scores are identical, return all entities that are still present after applying the previous rules. 3. If there is partial overlap (as in Hello Text Analytics) follow the above steps starting from 1. ", "allOf": [ { - "$ref": "#/definitions/BaseEntityOverlapPolicy" + "$ref": "#/definitions/BaseMetadata" } ], - "type": "object", - "x-ms-discriminator-value": "matchLongest" + "x-ms-discriminator-value": "DateMetadata" }, - "AllowOverlapEntityPolicyType": { - "description": "Represents the allow overlap policy. Will apply no post processing logic for the entities. Whatever the model predicts is what will be returned to the user. This allows the user to get a full view of every single model's possible values and apply their own custom logic on entity selection", + "DateTimeMetadata": { + "type": "object", + "description": "A Metadata for datetime entity instances.", + "properties": { + "dateValues": { + "type": "array", + "description": "List of date values.", + "items": { + "$ref": "#/definitions/DateValue" + }, + "x-ms-identifiers": [] + } + }, "allOf": [ { - "$ref": "#/definitions/BaseEntityOverlapPolicy" + "$ref": "#/definitions/BaseMetadata" } ], - "type": "object", - "x-ms-discriminator-value": "allowOverlap" + "x-ms-discriminator-value": "DateTimeMetadata" }, - "EntitiesTaskParameters": { + "DateValue": { "type": "object", - "description": "Supported parameters for an Entity Recognition task.", + "description": "Represents the date value.", "properties": { - "stringIndexType": { - "$ref": "common.json#/definitions/StringIndexType" - }, - "inclusionList": { - "description": "(Optional) request parameter that limits the output to the requested entity types included in this list. We will apply inclusionList before exclusionList", - "$ref": "#/definitions/EntityList" - }, - "exclusionList": { - "description": "(Optional) request parameter that filters out any entities that are included the excludeList. When a user specifies an excludeList, they cannot get a prediction returned with an entity in that list. We will apply inclusionList before exclusionList", - "$ref": "#/definitions/EntityList" + "timex": { + "type": "string", + "description": "An extended ISO 8601 date/time representation as described in (https://github.com/Microsoft/Recognizers-Text/blob/master/Patterns/English/English-DateTime.yaml)" }, - "overlapPolicy": { - "description": "(Optional) describes the type of overlap policy to apply to the ner output.", - "$ref": "#/definitions/BaseEntityOverlapPolicy" + "value": { + "type": "string", + "description": "The actual time that the extracted text denote." }, - "inferenceOptions": { - "description": "(Optional) request parameter that allows the user to provide settings for running the inference.", - "$ref": "#/definitions/EntityInferenceOptions" + "modifier": { + "$ref": "#/definitions/TemporalModifier", + "description": "Modifier for datetime to indicate point of reference like before, after etc." } }, - "allOf": [ - { - "$ref": "common.json#/definitions/PreBuiltTaskParameters" - } + "required": [ + "timex", + "value" ] }, - "EntitiesLROTask": { + "DetectedLanguage": { "type": "object", - "description": "An object representing the task definition for an Entities Recognition task.", + "description": "Contains the details of the detected language for the text.", "properties": { - "parameters": { - "$ref": "#/definitions/EntitiesTaskParameters" + "name": { + "type": "string", + "description": "Long name of a detected language (e.g. English, French)." + }, + "iso6391Name": { + "type": "string", + "description": "A two letter representation of the detected language according to the ISO 639-1 standard (e.g. en, fr)." + }, + "confidenceScore": { + "type": "number", + "format": "double", + "description": "A confidence score between 0 and 1. Scores close to 1 indicate 100% certainty that the identified language is true." + }, + "script": { + "$ref": "#/definitions/ScriptKind", + "description": "Identifies the script of the input document." + }, + "scriptCode": { + "$ref": "#/definitions/ScriptCode", + "description": "Identifies the script of the input document." } }, - "allOf": [ - { - "$ref": "#/definitions/AnalyzeTextLROTask" - } - ], - "x-ms-discriminator-value": "EntityRecognition" + "required": [ + "name", + "iso6391Name", + "confidenceScore" + ] }, - "EntitiesTaskResult": { + "DocumentError": { "type": "object", + "description": "Contains details of errors encountered during a job execution.", "properties": { - "results": { - "$ref": "#/definitions/EntitiesResult" + "id": { + "type": "string", + "description": "The ID of the input document." + }, + "error": { + "$ref": "#/definitions/Error", + "description": "Error encountered." } }, - "allOf": [ - { - "$ref": "#/definitions/AnalyzeTextTaskResult" - } - ], "required": [ - "results" + "id", + "error" + ] + }, + "DocumentSentimentValue": { + "type": "string", + "description": "Predicted sentiment for document (Negative, Neutral, Positive, or Mixed).", + "enum": [ + "positive", + "neutral", + "negative", + "mixed" ], - "x-ms-discriminator-value": "EntityRecognitionResults" + "x-ms-enum": { + "name": "DocumentSentimentValue", + "modelAsString": false, + "values": [ + { + "name": "positive", + "value": "positive", + "description": "Positive statement" + }, + { + "name": "neutral", + "value": "neutral", + "description": "Neutral statement" + }, + { + "name": "negative", + "value": "negative", + "description": "Negative statement" + }, + { + "name": "mixed", + "value": "mixed", + "description": "Mixed statement" + } + ] + } }, - "EntitiesResult": { + "DocumentStatistics": { "type": "object", + "description": "if showStats=true was specified in the request this field will contain information about the document payload.", "properties": { - "documents": { - "type": "array", - "description": "Response by document", - "items": { - "$ref": "#/definitions/EntitiesResultWithDetectedLanguage" - } + "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." } }, - "allOf": [ - { - "$ref": "common.json#/definitions/PreBuiltResult" - } - ], "required": [ - "documents" + "charactersCount", + "transactionsCount" ] }, - "EntitiesResultWithDetectedLanguage": { + "DocumentWarning": { "type": "object", - "allOf": [ - { - "$ref": "#/definitions/EntitiesDocumentResultWithMetadata" + "description": "Contains the warnings object with warnings encountered for the processed document.", + "properties": { + "code": { + "$ref": "#/definitions/WarningCodeValue", + "description": "Warning code." }, - { - "$ref": "#/definitions/DocumentDetectedLanguage" + "message": { + "type": "string", + "description": "Warning message." + }, + "targetRef": { + "type": "string", + "description": "A JSON pointer reference indicating the target object." } + }, + "required": [ + "code", + "message" ] }, - "EntitiesDocumentResult": { + "DynamicClassificationDocumentResult": { "type": "object", + "description": "Contains the Dynamic Classification document result.", "properties": { - "entities": { + "id": { + "type": "string", + "description": "Unique, non-empty document identifier." + }, + "warnings": { "type": "array", - "description": "Recognized entities in the document.", + "description": "Warnings encountered while processing document.", "items": { - "$ref": "#/definitions/Entity" - } + "$ref": "#/definitions/DocumentWarning" + }, + "x-ms-identifiers": [] + }, + "statistics": { + "$ref": "#/definitions/DocumentStatistics", + "description": "if showStats=true was specified in the request this field will contain information about the document payload." + }, + "classifications": { + "type": "array", + "description": "Array of classification results.", + "items": { + "$ref": "#/definitions/ClassificationResult" + }, + "x-ms-identifiers": [] } }, - "allOf": [ - { - "$ref": "#/definitions/DocumentResult" - } - ], "required": [ - "entities" + "id", + "warnings", + "classifications" ] }, - "EntitiesDocumentResultWithMetadata": { + "DynamicClassificationResult": { "type": "object", + "description": "Contains the Dynamic Classification result.", "properties": { - "entities": { + "errors": { "type": "array", - "description": "Recognized entities in the document.", + "description": "Errors by document id.", "items": { - "$ref": "#/definitions/EntityWithMetadata" + "$ref": "#/definitions/DocumentError" + } + }, + "statistics": { + "$ref": "#/definitions/RequestStatistics", + "description": "if showStats=true was specified in the request this field will contain information about the request payload." + }, + "modelVersion": { + "type": "string", + "description": "This field indicates which model is used for scoring." + }, + "documents": { + "type": "array", + "description": "Response by document", + "items": { + "$ref": "#/definitions/DynamicClassificationDocumentResult" } } }, - "allOf": [ - { - "$ref": "#/definitions/DocumentResult" - } - ], "required": [ - "entities" + "errors", + "modelVersion", + "documents" ] }, - "EntityTag": { + "DynamicClassificationTaskParameters": { "type": "object", + "description": "Supported parameters for a Dynamic Classification task.", "properties": { - "name": { + "loggingOptOut": { + "type": "boolean", + "description": "logging opt out", + "default": false + }, + "modelVersion": { "type": "string", - "description": "Tags are to express some similarities/affinity between entities. Entity Tags will be unique globally." + "description": "model version", + "default": "latest" }, - "confidenceScore": { - "type": "number", - "format": "double", - "description": "Detection score between 0 and 1 of the extracted entity." + "classificationType": { + "type": "string", + "description": "Specifies either one or multiple categories per document. Defaults to multi classification which may return more than one class for each document.", + "default": "Multi", + "enum": [ + "Multi", + "Single" + ], + "x-ms-enum": { + "name": "ClassificationType", + "modelAsString": true, + "values": [ + { + "name": "Multi", + "value": "Multi", + "description": "Multi selection" + }, + { + "name": "Single", + "value": "Single", + "description": "Single selection" + } + ] + } + }, + "categories": { + "type": "array", + "description": "a list of categories to which input is classified to.", + "items": { + "type": "string" + } } }, "required": [ - "name" + "categories" ] }, - "Entity": { + "DynamicClassificationTaskResult": { "type": "object", - "required": [ - "text", - "category", - "offset", - "length", - "confidenceScore" - ], + "description": "Result for Dynamic Classification task.", "properties": { - "text": { - "type": "string", - "description": "Entity text as appears in the request." - }, - "category": { - "type": "string", - "description": "Entity type." - }, - "subcategory": { - "type": "string", - "description": "(Optional) Entity sub type." - }, - "offset": { - "type": "integer", - "format": "int32", - "description": "Start position for the entity text. Use of different 'stringIndexType' values can affect the offset returned." - }, - "length": { - "type": "integer", - "format": "int32", - "description": "Length for the entity text. Use of different 'stringIndexType' values can affect the length returned." - }, - "confidenceScore": { - "type": "number", - "format": "double", - "description": "Confidence score between 0 and 1 of the extracted entity." + "results": { + "$ref": "#/definitions/DynamicClassificationResult", + "description": "Results for Dynamic Classification task" } - } - }, - "EntityWithTags": { + }, + "required": [ + "results" + ], "allOf": [ { - "$ref": "#/definitions/Entity" + "$ref": "#/definitions/AnalyzeTextTaskResult" } ], + "x-ms-discriminator-value": "DynamicClassificationResults" + }, + "EntitiesDocumentResultWithDetectedLanguage": { "type": "object", - "required": [ - "type", - "tags" - ], + "description": "Contains the entity recognition task result for the document with detected language.", "properties": { - "type": { + "id": { "type": "string", - "description": "An entity type is the lowest (or finest) granularity at which the entity has been detected. The type maps to the specific metadata attributes associated with the entity detected." + "description": "Unique, non-empty document identifier." }, - "tags": { + "warnings": { "type": "array", - "description": "List of entity tags. Tags are to express some similarities/affinity between entities.", + "description": "Warnings encountered while processing document.", "items": { - "$ref": "#/definitions/EntityTag" - } - } - } - }, - "EntityWithMetadata": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/EntityWithTags" - } - ], - "properties": { - "metadata": { - "description": "The entity metadata object.", - "type": "object", - "$ref": "#/definitions/BaseMetadata" + "$ref": "#/definitions/DocumentWarning" + }, + "x-ms-identifiers": [] + }, + "statistics": { + "$ref": "#/definitions/DocumentStatistics", + "description": "if showStats=true was specified in the request this field will contain information about the document payload." + }, + "entities": { + "type": "array", + "description": "Recognized entities in the document.", + "items": { + "$ref": "#/definitions/Entity" + }, + "x-ms-identifiers": [] + }, + "detectedLanguage": { + "$ref": "#/definitions/DetectedLanguage", + "description": "If 'language' is set to 'auto' for the document in the request this field will contain a 2 letter ISO 639-1 representation of the language detected for this document." } - } + }, + "required": [ + "id", + "warnings", + "entities" + ] }, - "EntityLinkingTaskParameters": { + "EntitiesDocumentResultWithMetadataDetectedLanguage": { "type": "object", - "description": "Supported parameters for an Entity Linking task.", + "description": "Contains the entity recognition task result for the document with metadata and detected language.", "properties": { - "stringIndexType": { - "$ref": "common.json#/definitions/StringIndexType" + "id": { + "type": "string", + "description": "Unique, non-empty document identifier." + }, + "warnings": { + "type": "array", + "description": "Warnings encountered while processing document.", + "items": { + "$ref": "#/definitions/DocumentWarning" + }, + "x-ms-identifiers": [] + }, + "statistics": { + "$ref": "#/definitions/DocumentStatistics", + "description": "if showStats=true was specified in the request this field will contain information about the document payload." + }, + "entities": { + "type": "array", + "description": "Recognized entities in the document.", + "items": { + "$ref": "#/definitions/EntityWithMetadata" + }, + "x-ms-identifiers": [] + }, + "detectedLanguage": { + "$ref": "#/definitions/DetectedLanguage", + "description": "If 'language' is set to 'auto' for the document in the request this field will contain a 2 letter ISO 639-1 representation of the language detected for this document." } }, - "allOf": [ - { - "$ref": "common.json#/definitions/PreBuiltTaskParameters" - } + "required": [ + "id", + "warnings", + "entities" ] }, - "EntityLinkingLROTask": { + "EntitiesLROTask": { "type": "object", - "description": "An object representing the task definition for an Entity Linking task.", + "description": "An object representing the task definition for an Entities Recognition task.", "properties": { "parameters": { - "$ref": "#/definitions/EntityLinkingTaskParameters" + "$ref": "#/definitions/EntitiesTaskParameters", + "description": "Task parameters." } }, "allOf": [ @@ -2416,1619 +2847,1762 @@ "$ref": "#/definitions/AnalyzeTextLROTask" } ], - "x-ms-discriminator-value": "EntityLinking" - }, - "EntityLinkingTaskResult": { - "type": "object", - "properties": { - "results": { - "$ref": "#/definitions/EntityLinkingResult" - } - }, - "allOf": [ - { - "$ref": "#/definitions/AnalyzeTextTaskResult" - } - ], - "required": [ - "results" - ], - "x-ms-discriminator-value": "EntityLinkingResults" + "x-ms-discriminator-value": "EntityRecognition" }, - "EntityLinkingResult": { + "EntitiesResult": { "type": "object", + "description": "Contains the entity recognition task result.", "properties": { + "errors": { + "type": "array", + "description": "Errors by document id.", + "items": { + "$ref": "#/definitions/DocumentError" + } + }, + "statistics": { + "$ref": "#/definitions/RequestStatistics", + "description": "if showStats=true was specified in the request this field will contain information about the request payload." + }, + "modelVersion": { + "type": "string", + "description": "This field indicates which model is used for scoring." + }, "documents": { "type": "array", "description": "Response by document", "items": { - "$ref": "#/definitions/EntityLinkingResultWithDetectedLanguage" + "$ref": "#/definitions/EntitiesDocumentResultWithMetadataDetectedLanguage" } } }, - "allOf": [ - { - "$ref": "common.json#/definitions/PreBuiltResult" - } - ], "required": [ + "errors", + "modelVersion", "documents" ] }, - "EntityLinkingResultWithDetectedLanguage": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/LinkedEntitiesDocumentResult" - }, - { - "$ref": "#/definitions/DocumentDetectedLanguage" - } - ] - }, - "LinkedEntitiesDocumentResult": { + "EntitiesTaskParameters": { "type": "object", - "required": [ - "entities" - ], + "description": "Supported parameters for an Entity Recognition task.", "properties": { - "entities": { - "type": "array", - "description": "Recognized well known entities in the document.", - "items": { - "$ref": "#/definitions/LinkedEntity" - } + "loggingOptOut": { + "type": "boolean", + "description": "logging opt out", + "default": false + }, + "modelVersion": { + "type": "string", + "description": "model version", + "default": "latest" + }, + "stringIndexType": { + "type": "string", + "description": "(Optional) parameter to provide the string index type used to interpret string offsets. Defaults to TextElements (Graphemes).", + "default": "TextElements_v8", + "enum": [ + "TextElements_v8", + "UnicodeCodePoint", + "Utf16CodeUnit" + ], + "x-ms-enum": { + "name": "StringIndexType", + "modelAsString": true, + "values": [ + { + "name": "TextElements_v8", + "value": "TextElements_v8", + "description": "Returned offset and length values will correspond to TextElements (Graphemes and Grapheme clusters) confirming to the Unicode 8.0.0 standard. Use this option if your application is written in .Net Framework or .Net Core and you will be using StringInfo." + }, + { + "name": "UnicodeCodePoint", + "value": "UnicodeCodePoint", + "description": "Returned offset and length values will correspond to Unicode code points. Use this option if your application is written in a language that support Unicode, for example Python." + }, + { + "name": "Utf16CodeUnit", + "value": "Utf16CodeUnit", + "description": "Returned offset and length values will correspond to UTF-16 code units. Use this option if your application is written in a language that support Unicode, for example Java, JavaScript." + } + ] + } + }, + "inclusionList": { + "type": "array", + "description": "(Optional) request parameter that limits the output to the requested entity types included in this list. We will apply inclusionList before exclusionList", + "items": { + "$ref": "#/definitions/EntityCategory" + } + }, + "exclusionList": { + "type": "array", + "description": "(Optional) request parameter that filters out any entities that are included the excludeList. When a user specifies an excludeList, they cannot get a prediction returned with an entity in that list. We will apply inclusionList before exclusionList", + "items": { + "$ref": "#/definitions/EntityCategory" + } + }, + "overlapPolicy": { + "$ref": "#/definitions/BaseEntityOverlapPolicy", + "description": "(Optional) describes the type of overlap policy to apply to the ner output." + }, + "inferenceOptions": { + "$ref": "#/definitions/EntityInferenceOptions", + "description": "(Optional) request parameter that allows the user to provide settings for running the inference." + } + } + }, + "EntitiesTaskResult": { + "type": "object", + "description": "Contains the entity task", + "properties": { + "results": { + "$ref": "#/definitions/EntitiesResult", + "description": "Results for entity recognition." } }, + "required": [ + "results" + ], "allOf": [ { - "$ref": "#/definitions/DocumentResult" + "$ref": "#/definitions/AnalyzeTextTaskResult" } - ] + ], + "x-ms-discriminator-value": "EntityRecognitionResults" }, - "LinkedEntity": { + "Entity": { "type": "object", - "required": [ - "name", - "matches", - "language", - "url", - "dataSource" - ], + "description": "Defines the detected entity object containing the entity category and entity text detected, etc.", "properties": { - "name": { + "text": { "type": "string", - "description": "Entity Linking formal name." - }, - "matches": { - "type": "array", - "description": "List of instances this entity appears in the text.", - "items": { - "$ref": "#/definitions/Match" - } + "description": "Entity text as appears in the request." }, - "language": { + "category": { "type": "string", - "description": "Language used in the data source." + "description": "Entity type." }, - "id": { + "subcategory": { "type": "string", - "description": "Unique identifier of the recognized entity from the data source." + "description": "(Optional) Entity sub type." }, - "url": { - "type": "string", - "description": "URL for the entity's page from the data source." + "offset": { + "type": "integer", + "format": "int32", + "description": "Start position for the entity text. Use of different 'stringIndexType' values can affect the offset returned." }, - "dataSource": { - "type": "string", - "description": "Data source used to extract entity linking, such as Wiki/Bing etc." + "length": { + "type": "integer", + "format": "int32", + "description": "Length for the entity text. Use of different 'stringIndexType' values can affect the length returned." }, - "bingId": { - "type": "string", - "description": "Bing Entity Search API unique identifier of the recognized entity." + "confidenceScore": { + "type": "number", + "format": "double", + "description": "Confidence score between 0 and 1 of the extracted entity." } - } - }, - "AgeUnit": { - "type": "string", - "enum": [ - "Unspecified", - "Year", - "Month", - "Week", - "Day" - ], - "x-ms-enum": { - "name": "AgeUnit", - "modelAsString": true - }, - "description": "The Age Unit of measurement" - }, - "VolumeUnit": { - "type": "string", - "enum": [ - "Unspecified", - "CubicMeter", - "CubicCentimeter", - "CubicMillimeter", - "Hectoliter", - "Decaliter", - "Liter", - "Centiliter", - "Milliliter", - "CubicYard", - "CubicInch", - "CubicFoot", - "CubicMile", - "FluidOunce", - "Teaspoon", - "Tablespoon", - "Pint", - "Quart", - "Cup", - "Gill", - "Pinch", - "FluidDram", - "Barrel", - "Minim", - "Cord", - "Peck", - "Bushel", - "Hogshead" - ], - "x-ms-enum": { - "name": "VolumeUnit", - "modelAsString": true - }, - "description": "The Volume Unit of measurement" - }, - "SpeedUnit": { - "type": "string", - "enum": [ - "Unspecified", - "MetersPerSecond", - "KilometersPerHour", - "KilometersPerMinute", - "KilometersPerSecond", - "MilesPerHour", - "Knots", - "FeetPerSecond", - "FeetPerMinute", - "YardsPerMinute", - "YardsPerSecond", - "MetersPerMillisecond", - "CentimetersPerMillisecond", - "KilometersPerMillisecond" - ], - "x-ms-enum": { - "name": "SpeedUnit", - "modelAsString": true - }, - "description": "The speed Unit of measurement" - }, - "AreaUnit": { - "type": "string", - "enum": [ - "Unspecified", - "SquareKilometer", - "SquareHectometer", - "SquareDecameter", - "SquareDecimeter", - "SquareMeter", - "SquareCentimeter", - "SquareMillimeter", - "SquareInch", - "SquareFoot", - "SquareMile", - "SquareYard", - "Acre" - ], - "x-ms-enum": { - "name": "AreaUnit", - "modelAsString": true - }, - "description": "The area Unit of measurement" - }, - "LengthUnit": { - "type": "string", - "enum": [ - "Unspecified", - "Kilometer", - "Hectometer", - "Decameter", - "Meter", - "Decimeter", - "Centimeter", - "Millimeter", - "Micrometer", - "Nanometer", - "Picometer", - "Mile", - "Yard", - "Inch", - "Foot", - "LightYear", - "Point" - ], - "x-ms-enum": { - "name": "LengthUnit", - "modelAsString": true }, - "description": "The length Unit of measurement" + "required": [ + "text", + "category", + "offset", + "length", + "confidenceScore" + ] }, - "InformationUnit": { + "EntityCategory": { "type": "string", + "description": "Contains all the entity categories detected by entity recognition.", "enum": [ - "Unspecified", - "Bit", - "Kilobit", - "Megabit", - "Gigabit", - "Terabit", - "Petabit", - "Byte", - "Kilobyte", - "Megabyte", - "Gigabyte", - "Terabyte", - "Petabyte" + "Address", + "Numeric", + "Age", + "Currency", + "Number", + "NumberRange", + "Percentage", + "Ordinal", + "Temperature", + "Dimension", + "Length", + "Weight", + "Height", + "Speed", + "Area", + "Volume", + "Information", + "Temporal", + "Date", + "Time", + "DateTime", + "DateRange", + "TimeRange", + "DateTimeRange", + "Duration", + "SetTemporal", + "Event", + "SportsEvent", + "CulturalEvent", + "NaturalEvent", + "Location", + "GPE", + "City", + "State", + "CountryRegion", + "Continent", + "Structural", + "Airport", + "Geological", + "Organization", + "OrganizationMedical", + "OrganizationStockExchange", + "OrganizationSports", + "Person", + "PersonType", + "Email", + "URL", + "IP", + "PhoneNumber", + "Product", + "ComputingProduct", + "Skill" ], "x-ms-enum": { - "name": "InformationUnit", + "name": "EntityCategory", "modelAsString": true, "values": [ { - "value": "Unspecified", - "description": "Unspecified information unit." + "name": "Address", + "value": "Address", + "description": "Specific street-level mentions of locations: house/building numbers, streets, avenues, highways, intersections referenced by name." }, { - "value": "Bit", - "description": "Bit information unit. " + "name": "Numeric", + "value": "Numeric", + "description": "Numeric values, including digits and number words." }, { - "value": "Kilobit", - "description": "Kilobit information unit. Usually defined as 1000 bits or 1024 bits." + "name": "Age", + "value": "Age", + "description": "Age-related values." }, { - "value": "Megabit", - "description": "Megabit information unit. Usually defined as 1000 kilobits or 1024 kilobits." + "name": "Currency", + "value": "Currency", + "description": "Currency-related values." }, { - "value": "Gigabit", - "description": "Gigabit information unit. Usually defined as 1000 megabits or 1024 megabits." + "name": "Number", + "value": "Number", + "description": "Numbers without a unit" }, { - "value": "Terabit", - "description": "Terabit information unit. Usually defined as 1000 gigabits or 1024 gigabits." + "name": "NumberRange", + "value": "NumberRange", + "description": "Range of Numbers" }, { - "value": "Petabit", - "description": "Petabit information unit. Usually defined as 1000 terabits or 1024 terabits." + "name": "Percentage", + "value": "Percentage", + "description": "Percentage-related values." }, { - "value": "Byte", - "description": "Byte information unit. Usually defined as 8 bits are used to form a byte.." + "name": "Ordinal", + "value": "Ordinal", + "description": "Ordinal numbers." }, { - "value": "Kilobyte", - "description": "Kilobyte information unit. Usually defined as 1000 bytes or 1024 bytes." + "name": "Temperature", + "value": "Temperature", + "description": "Temperature-related values." }, { - "value": "Megabyte", - "description": "Megabyte information unit. Usually defined as 1000 kilobytes or 1024 kilobytes." + "name": "Dimension", + "value": "Dimension", + "description": "Dimension of measurements" }, { - "value": "Gigabyte", - "description": "Gigabyte information unit. Usually defined as 1000 megabytes or 1024 megabytes." + "name": "Length", + "value": "Length", + "description": "Length of an object." }, { - "value": "Terabyte", - "description": "Terabyte information unit. Usually defined as 1000 gigabytes or 1024 gigabytes." + "name": "Weight", + "value": "Weight", + "description": "Weight of an object." }, { - "value": "Petabyte", - "description": "Petabyte information unit. Usually defined as 1000 terabytes or 1024 terabytes." + "name": "Height", + "value": "Height", + "description": "Height of an object." + }, + { + "name": "Speed", + "value": "Speed", + "description": "Speed of an object." + }, + { + "name": "Area", + "value": "Area", + "description": "Area of an object." + }, + { + "name": "Volume", + "value": "Volume", + "description": "Volume of an object." + }, + { + "name": "Information", + "value": "Information", + "description": "Unit of measure for digital information." + }, + { + "name": "Temporal", + "value": "Temporal", + "description": "Items relating to time." + }, + { + "name": "Date", + "value": "Date", + "description": "Calendar dates." + }, + { + "name": "Time", + "value": "Time", + "description": "Times of day." + }, + { + "name": "DateTime", + "value": "DateTime", + "description": "Calendar dates with time." + }, + { + "name": "DateRange", + "value": "DateRange", + "description": "Range of dates." + }, + { + "name": "TimeRange", + "value": "TimeRange", + "description": "Range of times." + }, + { + "name": "DateTimeRange", + "value": "DateTimeRange", + "description": "Range of date and time." + }, + { + "name": "Duration", + "value": "Duration", + "description": "Duration of time." + }, + { + "name": "SetTemporal", + "value": "SetTemporal", + "description": "Set of time-related values." + }, + { + "name": "Event", + "value": "Event", + "description": "Social, sports, business, political, educational, natural, historical, criminal, violent, legal, military events with a timed period." + }, + { + "name": "SportsEvent", + "value": "SportsEvent", + "description": "Sports event-related values." + }, + { + "name": "CulturalEvent", + "value": "CulturalEvent", + "description": "Cultural event-related values." + }, + { + "name": "NaturalEvent", + "value": "NaturalEvent", + "description": "Natural event-related values." + }, + { + "name": "Location", + "value": "Location", + "description": "Particular point or place in physical space." + }, + { + "name": "GPE", + "value": "GPE", + "description": "Cities, countries/regions, states." + }, + { + "name": "City", + "value": "City", + "description": "City-related values." + }, + { + "name": "State", + "value": "State", + "description": "State-related values." + }, + { + "name": "CountryRegion", + "value": "CountryRegion", + "description": "Country or region-related values." + }, + { + "name": "Continent", + "value": "Continent", + "description": "Continent-related values." + }, + { + "name": "Structural", + "value": "Structural", + "description": "Manmade structures." + }, + { + "name": "Airport", + "value": "Airport", + "description": "Airports." + }, + { + "name": "Geological", + "value": "Geological", + "description": "Geographic and natural features such as rivers, oceans, and deserts." + }, + { + "name": "Organization", + "value": "Organization", + "description": "Corporations, agencies, and other groups of people defined by some established organizational structure. These labels can include companies, political parties/movements, musical bands, sport clubs, government bodies, and public organizations. Nationalities or religions are not ORGANIZATION." + }, + { + "name": "OrganizationMedical", + "value": "OrganizationMedical", + "description": "Medical companies and groups." + }, + { + "name": "OrganizationStockExchange", + "value": "OrganizationStockExchange", + "description": "Stock exchange groups." + }, + { + "name": "OrganizationSports", + "value": "OrganizationSports", + "description": "Sports-related organizations." + }, + { + "name": "Person", + "value": "Person", + "description": "First, last, and middle names, names of fictional characters, and aliases. Titles, such as 'Mr.' or 'President', are not considered part of the named entity." + }, + { + "name": "PersonType", + "value": "PersonType", + "description": "Human roles classified by a group membership." + }, + { + "name": "Email", + "value": "Email", + "description": "Email addresses." + }, + { + "name": "URL", + "value": "URL", + "description": "URLs to websites." + }, + { + "name": "IP", + "value": "IP", + "description": "network IP addresses." + }, + { + "name": "PhoneNumber", + "value": "PhoneNumber", + "description": "Phone numbers (US and EU phone numbers only)." + }, + { + "name": "Product", + "value": "Product", + "description": "Single or group of commercial, consumable objects, electronics, vehicles, food groups." + }, + { + "name": "ComputingProduct", + "value": "ComputingProduct", + "description": "Computing products." + }, + { + "name": "Skill", + "value": "Skill", + "description": "A capability, skill, or expertise." } ] - }, - "description": "The information (data) Unit of measurement." - }, - "TemperatureUnit": { - "type": "string", - "enum": [ - "Unspecified", - "Fahrenheit", - "Kelvin", - "Rankine", - "Celsius" - ], - "x-ms-enum": { - "name": "TemperatureUnit", - "modelAsString": true - }, - "description": "The temperature Unit of measurement." - }, - "WeightUnit": { - "type": "string", - "enum": [ - "Unspecified", - "Kilogram", - "Gram", - "Milligram", - "Gallon", - "MetricTon", - "Ton", - "Pound", - "Ounce", - "Grain", - "PennyWeight", - "LongTonBritish", - "ShortTonUS", - "ShortHundredWeightUS", - "Stone", - "Dram" - ], - "x-ms-enum": { - "name": "WeightUnit", - "modelAsString": true - }, - "description": "The weight Unit of measurement." - }, - "NumberKind": { - "type": "string", - "enum": [ - "Integer", - "Decimal", - "Power", - "Fraction", - "Percent", - "Unspecified" - ], - "x-ms-enum": { - "name": "NumberKind", - "modelAsString": true - }, - "description": "The type of the extracted number entity." - }, - "OrdinalRelativeTo": { - "type": "string", - "enum": [ - "Current", - "End", - "Start" - ], - "x-ms-enum": { - "name": "RelativeTo", - "modelAsString": true - }, - "description": "The reference point that the ordinal number denotes." - }, - "RangeInclusivity": { - "type": "string", - "enum": [ - "NoneInclusive", - "LeftInclusive", - "RightInclusive", - "LeftRightInclusive" - ], - "x-ms-enum": { - "name": "RangeInclusivity", - "modelAsString": true - }, - "description": "The range inclusiveness of this property property." - }, - "NumericRangeKind": { - "type": "string", - "enum": [ - "Number", - "Speed", - "Weight", - "Length", - "Volume", - "Area", - "Age", - "Information", - "Temperature", - "Currency" - ], - "x-ms-enum": { - "name": "RangeKind", - "modelAsString": true - }, - "description": "The kind of range that the resolution object represents." + } }, - "BaseMetadata": { - "description": "The abstract base class for entity Metadata.", + "EntityComponentInformation": { "type": "object", - "discriminator": "metadataKind", + "description": "This object contains information of the detected entity components. The possible component types may expand in the future. Parsing code should handle unexpected values gracefully", "properties": { - "metadataKind": { - "description": "The entity Metadata object kind.", - "type": "string", - "enum": [ - "DateMetadata", - "DateTimeMetadata", - "TimeMetadata", - "TemporalSetMetadata", - "NumberMetadata", - "OrdinalMetadata", - "SpeedMetadata", - "WeightMetadata", - "LengthMetadata", - "VolumeMetadata", - "AreaMetadata", - "AgeMetadata", - "InformationMetadata", - "TemperatureMetadata", - "CurrencyMetadata", - "NumericRangeMetadata", - "TemporalSpanMetadata" - ], - "x-ms-enum": { - "name": "MetadataKind", - "modelAsString": true - } + "entityComponentKind": { + "$ref": "#/definitions/entityComponentKind", + "description": "Kind of entity component." } }, + "discriminator": "entityComponentKind", "required": [ - "metadataKind" + "entityComponentKind" ] }, - "QuantityMetadata": { - "description": "Represents Metadata for quantities.", + "EntityInferenceOptions": { "type": "object", + "description": "The class that houses the inference options allowed for named entity recognition.", "properties": { - "value": { - "type": "number", - "format": "double", - "description": "The numeric value that the extracted text denotes." + "excludeNormalizedValues": { + "type": "boolean", + "description": "Option to include/exclude the detected entity values to be normalized and included in the metadata. The numeric and temporal entity types support value normalization.", + "default": false } - }, - "required": [ - "value" - ] + } }, - "AgeMetadata": { - "description": "Represents the Age entity Metadata model.", - "allOf": [ - { - "$ref": "#/definitions/BaseMetadata" - }, - { - "$ref": "#/definitions/QuantityMetadata" - } - ], + "EntityLinkingLROResult": { "type": "object", - "x-ms-discriminator-value": "AgeMetadata", + "description": "Contains the analyze text Entity linking task LRO result.", "properties": { - "unit": { - "$ref": "#/definitions/AgeUnit" + "results": { + "$ref": "#/definitions/EntityLinkingResult", + "description": "Entity linking result." } }, "required": [ - "unit" - ] - }, - "VolumeMetadata": { - "description": "Represents the volume entity Metadata model.", + "results" + ], "allOf": [ { - "$ref": "#/definitions/BaseMetadata" - }, - { - "$ref": "#/definitions/QuantityMetadata" + "$ref": "#/definitions/AnalyzeTextLROResult" } ], + "x-ms-discriminator-value": "EntityLinkingLROResults" + }, + "EntityLinkingLROTask": { "type": "object", - "x-ms-discriminator-value": "VolumeMetadata", + "description": "Contains the analyze text Entity linking LRO task.", "properties": { - "unit": { - "$ref": "#/definitions/VolumeUnit" + "parameters": { + "$ref": "#/definitions/EntityLinkingTaskParameters", + "description": "Task parameters." } }, - "required": [ - "unit" - ] - }, - "SpeedMetadata": { - "description": "Represents the speed entity Metadata model.", "allOf": [ { - "$ref": "#/definitions/BaseMetadata" - }, - { - "$ref": "#/definitions/QuantityMetadata" + "$ref": "#/definitions/AnalyzeTextLROTask" } ], + "x-ms-discriminator-value": "EntityLinking" + }, + "EntityLinkingResult": { "type": "object", - "x-ms-discriminator-value": "SpeedMetadata", + "description": "Entity linking result.", "properties": { - "unit": { - "$ref": "#/definitions/SpeedUnit" + "errors": { + "type": "array", + "description": "Errors by document id.", + "items": { + "$ref": "#/definitions/DocumentError" + } + }, + "statistics": { + "$ref": "#/definitions/RequestStatistics", + "description": "if showStats=true was specified in the request this field will contain information about the request payload." + }, + "modelVersion": { + "type": "string", + "description": "This field indicates which model is used for scoring." + }, + "documents": { + "type": "array", + "description": "Response by document", + "items": { + "$ref": "#/definitions/EntityLinkingResultWithDetectedLanguage" + } } }, "required": [ - "unit" + "errors", + "modelVersion", + "documents" ] }, - "AreaMetadata": { - "description": "Represents the area entity Metadata model.", - "allOf": [ - { - "$ref": "#/definitions/BaseMetadata" - }, - { - "$ref": "#/definitions/QuantityMetadata" - } - ], + "EntityLinkingResultWithDetectedLanguage": { "type": "object", - "x-ms-discriminator-value": "AreaMetadata", + "description": "Entity linking document result with auto language detection.", "properties": { - "unit": { - "$ref": "#/definitions/AreaUnit" + "id": { + "type": "string", + "description": "Unique, non-empty document identifier." + }, + "warnings": { + "type": "array", + "description": "Warnings encountered while processing document.", + "items": { + "$ref": "#/definitions/DocumentWarning" + }, + "x-ms-identifiers": [] + }, + "statistics": { + "$ref": "#/definitions/DocumentStatistics", + "description": "if showStats=true was specified in the request this field will contain information about the document payload." + }, + "entities": { + "type": "array", + "description": "Recognized well known entities in the document.", + "items": { + "$ref": "#/definitions/LinkedEntity" + } + }, + "detectedLanguage": { + "$ref": "#/definitions/DetectedLanguage", + "description": "If 'language' is set to 'auto' for the document in the request this field will contain a 2 letter ISO 639-1 representation of the language detected for this document." } }, "required": [ - "unit" + "id", + "warnings", + "entities" ] }, - "LengthMetadata": { - "description": "Represents the length entity Metadata model.", - "allOf": [ - { - "$ref": "#/definitions/BaseMetadata" - }, - { - "$ref": "#/definitions/QuantityMetadata" - } - ], + "EntityLinkingTaskParameters": { "type": "object", - "x-ms-discriminator-value": "LengthMetadata", + "description": "Supported parameters for an Entity Linking task.", "properties": { - "unit": { - "$ref": "#/definitions/LengthUnit" - } - }, - "required": [ - "unit" - ] - }, - "InformationMetadata": { - "description": "Represents the information (data) entity Metadata model.", - "allOf": [ - { - "$ref": "#/definitions/BaseMetadata" + "loggingOptOut": { + "type": "boolean", + "description": "logging opt out", + "default": false }, - { - "$ref": "#/definitions/QuantityMetadata" + "modelVersion": { + "type": "string", + "description": "model version", + "default": "latest" + }, + "stringIndexType": { + "type": "string", + "description": "Optional parameter to provide the string index type used to interpret string offsets. Defaults to TextElements (Graphemes).", + "default": "TextElements_v8", + "enum": [ + "TextElements_v8", + "UnicodeCodePoint", + "Utf16CodeUnit" + ], + "x-ms-enum": { + "name": "StringIndexType", + "modelAsString": true, + "values": [ + { + "name": "TextElements_v8", + "value": "TextElements_v8", + "description": "Returned offset and length values will correspond to TextElements (Graphemes and Grapheme clusters) confirming to the Unicode 8.0.0 standard. Use this option if your application is written in .Net Framework or .Net Core and you will be using StringInfo." + }, + { + "name": "UnicodeCodePoint", + "value": "UnicodeCodePoint", + "description": "Returned offset and length values will correspond to Unicode code points. Use this option if your application is written in a language that support Unicode, for example Python." + }, + { + "name": "Utf16CodeUnit", + "value": "Utf16CodeUnit", + "description": "Returned offset and length values will correspond to UTF-16 code units. Use this option if your application is written in a language that support Unicode, for example Java, JavaScript." + } + ] + } } - ], + } + }, + "EntityLinkingTaskResult": { "type": "object", - "x-ms-discriminator-value": "InformationMetadata", + "description": "Contains the analyze text Entity linking task result.", "properties": { - "unit": { - "$ref": "#/definitions/InformationUnit" + "results": { + "$ref": "#/definitions/EntityLinkingResult", + "description": "Entity linking result." } }, "required": [ - "unit" - ] - }, - "TemperatureMetadata": { - "description": "Represents the temperature entity Metadata model.", + "results" + ], "allOf": [ { - "$ref": "#/definitions/BaseMetadata" - }, - { - "$ref": "#/definitions/QuantityMetadata" + "$ref": "#/definitions/AnalyzeTextTaskResult" } ], + "x-ms-discriminator-value": "EntityLinkingResults" + }, + "EntityRecognitionLROResult": { "type": "object", - "x-ms-discriminator-value": "TemperatureMetadata", + "description": "Contains the entity recognition job task result.", "properties": { - "unit": { - "$ref": "#/definitions/TemperatureUnit" + "results": { + "$ref": "#/definitions/EntitiesResult", + "description": "Results for the task." } }, "required": [ - "unit" - ] - }, - "WeightMetadata": { - "description": "Represents the weight entity Metadata model.", + "results" + ], "allOf": [ { - "$ref": "#/definitions/BaseMetadata" - }, - { - "$ref": "#/definitions/QuantityMetadata" + "$ref": "#/definitions/AnalyzeTextLROResult" } ], + "x-ms-discriminator-value": "EntityRecognitionLROResults" + }, + "EntityTag": { "type": "object", - "x-ms-discriminator-value": "WeightMetadata", + "description": "Entity tag object which contains the name of the tags abd any associated confidence score. Entity Tags are used to express some similarities/affinity between entities.", "properties": { - "unit": { - "$ref": "#/definitions/WeightUnit" + "name": { + "type": "string", + "description": "Name of the tag. Entity Tag names will be unique globally." + }, + "confidenceScore": { + "type": "number", + "format": "double", + "description": "Detection score between 0 and 1 of the extracted entity." } }, "required": [ - "unit" + "name" ] }, - "CurrencyMetadata": { - "description": "Represents the currency entity Metadata model.", - "allOf": [ - { - "$ref": "#/definitions/BaseMetadata" - }, - { - "$ref": "#/definitions/QuantityMetadata" - } - ], + "EntityWithMetadata": { "type": "object", - "x-ms-discriminator-value": "CurrencyMetadata", + "description": "Entity object with tags and metadata.", "properties": { - "iso4217": { + "text": { "type": "string", - "description": "The alphabetic code based on another ISO standard, ISO 3166, which lists the codes for country names. The first two letters of the ISO 4217 three-letter code are the same as the code for the country name, and, where possible, the third letter corresponds to the first letter of the currency name." + "description": "Entity text as appears in the request." }, - "value": { + "category": { + "type": "string", + "description": "Entity type." + }, + "subcategory": { + "type": "string", + "description": "(Optional) Entity sub type." + }, + "offset": { + "type": "integer", + "format": "int32", + "description": "Start position for the entity text. Use of different 'stringIndexType' values can affect the offset returned." + }, + "length": { + "type": "integer", + "format": "int32", + "description": "Length for the entity text. Use of different 'stringIndexType' values can affect the length returned." + }, + "confidenceScore": { "type": "number", "format": "double", - "description": "The money amount captured in the extracted entity" + "description": "Confidence score between 0 and 1 of the extracted entity." }, - "unit": { + "type": { "type": "string", - "description": "The unit of the amount captured in the extracted entity" + "description": "An entity type is the lowest (or finest) granularity at which the entity has been detected. The type maps to the specific metadata attributes associated with the entity detected." + }, + "tags": { + "type": "array", + "description": "List of entity tags. Tags are to express some similarities/affinity between entities.", + "items": { + "$ref": "#/definitions/EntityTag" + }, + "x-ms-identifiers": [] + }, + "metadata": { + "$ref": "#/definitions/BaseMetadata", + "description": "The entity metadata object." } }, "required": [ - "value", - "unit" + "text", + "category", + "offset", + "length", + "confidenceScore", + "type", + "tags" ] }, - "DateValue": { - "description": "Represents the date value.", + "Error": { "type": "object", + "description": "The error response object returned when the service encounters some errors during processing the request.", "properties": { - "timex": { - "$ref": "#/definitions/TimeExpression" + "code": { + "$ref": "#/definitions/ErrorCode", + "description": "One of a server-defined set of error codes." }, - "value": { + "message": { "type": "string", - "description": "The actual time that the extracted text denote." + "description": "A human-readable representation of the error." }, - "modifier": { - "$ref": "#/definitions/TemporalModifier" + "target": { + "type": "string", + "description": "The target of the error." + }, + "details": { + "type": "array", + "description": "An array of details about specific errors that led to this reported error.", + "items": { + "$ref": "#/definitions/Error" + }, + "x-ms-identifiers": [] + }, + "innererror": { + "$ref": "#/definitions/InnerErrorModel", + "description": "An object containing more specific information than the current object about the error." } }, "required": [ - "timex", - "value" + "code", + "message" ] }, - "BaseTemporalMetadata": { - "type": "object", - "properties": { - "dateValues": { - "type": "array", - "description": "The list of date values.", - "items": { - "$ref": "#/definitions/DateValue" + "ErrorCode": { + "type": "string", + "description": "Human-readable error code.", + "enum": [ + "InvalidRequest", + "InvalidArgument", + "Unauthorized", + "Forbidden", + "NotFound", + "ProjectNotFound", + "OperationNotFound", + "AzureCognitiveSearchNotFound", + "AzureCognitiveSearchIndexNotFound", + "TooManyRequests", + "AzureCognitiveSearchThrottling", + "AzureCognitiveSearchIndexLimitReached", + "InternalServerError", + "ServiceUnavailable", + "Timeout", + "QuotaExceeded", + "Conflict", + "Warning" + ], + "x-ms-enum": { + "name": "ErrorCode", + "modelAsString": true, + "values": [ + { + "name": "InvalidRequest", + "value": "InvalidRequest", + "description": "Invalid request error" + }, + { + "name": "InvalidArgument", + "value": "InvalidArgument", + "description": "Invalid argument error" + }, + { + "name": "Unauthorized", + "value": "Unauthorized", + "description": "Unauthorized access error" + }, + { + "name": "Forbidden", + "value": "Forbidden", + "description": "Forbidden access error" + }, + { + "name": "NotFound", + "value": "NotFound", + "description": "Not found error" + }, + { + "name": "ProjectNotFound", + "value": "ProjectNotFound", + "description": "Project not found error" + }, + { + "name": "OperationNotFound", + "value": "OperationNotFound", + "description": "Operation not found error" + }, + { + "name": "AzureCognitiveSearchNotFound", + "value": "AzureCognitiveSearchNotFound", + "description": "Azure Cognitive Search not found error" + }, + { + "name": "AzureCognitiveSearchIndexNotFound", + "value": "AzureCognitiveSearchIndexNotFound", + "description": "Azure Cognitive Search index not found error" + }, + { + "name": "TooManyRequests", + "value": "TooManyRequests", + "description": "Too many requests error" + }, + { + "name": "AzureCognitiveSearchThrottling", + "value": "AzureCognitiveSearchThrottling", + "description": "Azure Cognitive Search throttling error" + }, + { + "name": "AzureCognitiveSearchIndexLimitReached", + "value": "AzureCognitiveSearchIndexLimitReached", + "description": "Azure Cognitive Search index limit reached error" + }, + { + "name": "InternalServerError", + "value": "InternalServerError", + "description": "Internal server error" + }, + { + "name": "ServiceUnavailable", + "value": "ServiceUnavailable", + "description": "Service unavailable error" + }, + { + "name": "Timeout", + "value": "Timeout", + "description": "Timeout error" + }, + { + "name": "QuotaExceeded", + "value": "QuotaExceeded", + "description": "Quota exceeded error" + }, + { + "name": "Conflict", + "value": "Conflict", + "description": "Conflict error" + }, + { + "name": "Warning", + "value": "Warning", + "description": "Warning error" } - } + ] } }, - "DateMetadata": { - "description": "A Metadata for date entity instances.", - "allOf": [ - { - "$ref": "#/definitions/BaseMetadata" - }, - { - "$ref": "#/definitions/BaseTemporalMetadata" - } - ], + "ErrorResponse": { "type": "object", - "x-ms-discriminator-value": "DateMetadata" + "description": "Error response.", + "properties": { + "error": { + "$ref": "#/definitions/Error", + "description": "The error object." + } + }, + "required": [ + "error" + ] }, - "DateTimeMetadata": { - "description": "A Metadata for datetime entity instances.", - "allOf": [ - { - "$ref": "#/definitions/BaseMetadata" - }, - { - "$ref": "#/definitions/BaseTemporalMetadata" - } - ], + "ExtractedSummaryDocumentResultWithDetectedLanguage": { "type": "object", - "x-ms-discriminator-value": "DateTimeMetadata" - }, - "TemporalSetMetadata": { - "description": "A Metadata for temporal set entity instances.", - "allOf": [ - { - "$ref": "#/definitions/BaseMetadata" + "description": "A ranked list of sentences representing the extracted summary.", + "properties": { + "id": { + "type": "string", + "description": "Unique, non-empty document identifier." }, - { - "$ref": "#/definitions/BaseTemporalMetadata" - } - ], - "type": "object", - "x-ms-discriminator-value": "TemporalSetMetadata" - }, - "TimeMetadata": { - "description": "A Metadata for time entity instances.", - "allOf": [ - { - "$ref": "#/definitions/BaseMetadata" + "warnings": { + "type": "array", + "description": "Warnings encountered while processing document.", + "items": { + "$ref": "#/definitions/DocumentWarning" + }, + "x-ms-identifiers": [] }, - { - "$ref": "#/definitions/BaseTemporalMetadata" + "statistics": { + "$ref": "#/definitions/DocumentStatistics", + "description": "if showStats=true was specified in the request this field will contain information about the document payload." + }, + "sentences": { + "type": "array", + "description": "Specifies the the extracted sentences from the input document.", + "items": { + "$ref": "#/definitions/ExtractedSummarySentence" + }, + "x-ms-identifiers": [] + }, + "detectedLanguage": { + "$ref": "#/definitions/DetectedLanguage", + "description": "If 'language' is set to 'auto' for the document in the request this field will contain a 2 letter ISO 639-1 representation of the language detected for this document." } - ], - "type": "object", - "x-ms-discriminator-value": "TimeMetadata" + }, + "required": [ + "id", + "warnings", + "sentences" + ] }, - "NumberMetadata": { - "description": "A metadata for numeric entity instances.", - "allOf": [ - { - "$ref": "#/definitions/BaseMetadata" - } - ], + "ExtractedSummarySentence": { "type": "object", - "x-ms-discriminator-value": "NumberMetadata", + "description": "Represents an extracted sentences from the input document.", "properties": { - "numberKind": { - "$ref": "#/definitions/NumberKind" + "text": { + "type": "string", + "description": "The extracted sentence text." }, - "value": { + "rankScore": { "type": "number", "format": "double", - "description": "A numeric representation of what the extracted text denotes." + "description": "A double value representing the relevance of the sentence within the summary. Higher values indicate higher importance." + }, + "offset": { + "type": "integer", + "format": "int32", + "description": "The sentence offset from the start of the document, based on the value of the parameter StringIndexType." + }, + "length": { + "type": "integer", + "format": "int32", + "description": "The length of the sentence." } }, "required": [ - "numberKind", - "value" + "text", + "rankScore", + "offset", + "length" ] }, - "OrdinalMetadata": { - "description": "A Metadata for ordinal numbers entity instances.", + "ExtractiveSummarizationLROResult": { + "type": "object", + "description": "An object representing the results for an Extractive Summarization task.", + "properties": { + "results": { + "$ref": "#/definitions/ExtractiveSummarizationResult", + "description": "Results of the task." + } + }, + "required": [ + "results" + ], "allOf": [ { - "$ref": "#/definitions/BaseMetadata" + "$ref": "#/definitions/AnalyzeTextLROResult" } ], + "x-ms-discriminator-value": "ExtractiveSummarizationLROResults" + }, + "ExtractiveSummarizationLROTask": { "type": "object", - "x-ms-discriminator-value": "OrdinalMetadata", + "description": "An object representing the task definition for an Extractive Summarization task.", "properties": { - "offset": { - "type": "string", - "description": "The offset With respect to the reference (e.g., offset = -1 in \"show me the second to last\"" - }, - "relativeTo": { - "$ref": "#/definitions/OrdinalRelativeTo" - }, - "value": { - "type": "string", - "description": "A simple arithmetic expression that the ordinal denotes." + "parameters": { + "$ref": "#/definitions/ExtractiveSummarizationTaskParameters", + "description": "Parameters for the Extractive Summarization task." } }, - "required": [ - "offset", - "relativeTo", - "value" - ] - }, - "TemporalSpanMetadata": { - "description": "represents the Metadata of a date and/or time span.", "allOf": [ { - "$ref": "#/definitions/BaseMetadata" + "$ref": "#/definitions/AnalyzeTextLROTask" } ], + "x-ms-discriminator-value": "ExtractiveSummarization" + }, + "ExtractiveSummarizationResult": { "type": "object", - "x-ms-discriminator-value": "TemporalSpanMetadata", + "description": "An object representing the pre-built Extractive Summarization results of each document.", "properties": { - "spanValues": { - "$ref": "#/definitions/TemporalSpanValues" + "errors": { + "type": "array", + "description": "Errors by document id.", + "items": { + "$ref": "#/definitions/DocumentError" + } + }, + "statistics": { + "$ref": "#/definitions/RequestStatistics", + "description": "if showStats=true was specified in the request this field will contain information about the request payload." + }, + "modelVersion": { + "type": "string", + "description": "This field indicates which model is used for scoring." + }, + "documents": { + "type": "array", + "description": "Response by document", + "items": { + "$ref": "#/definitions/ExtractedSummaryDocumentResultWithDetectedLanguage" + } } - } + }, + "required": [ + "errors", + "modelVersion", + "documents" + ] }, - "TemporalSpanValues": { + "ExtractiveSummarizationTaskParameters": { "type": "object", + "description": "Supported parameters for an Extractive Summarization task.", "properties": { - "begin": { - "$ref": "#/definitions/TimeExpression" + "loggingOptOut": { + "type": "boolean", + "description": "logging opt out", + "default": false }, - "end": { - "$ref": "#/definitions/TimeExpression" + "modelVersion": { + "type": "string", + "description": "model version", + "default": "latest" }, - "duration": { + "sentenceCount": { + "type": "integer", + "format": "int64", + "description": "Specifies the number of sentences in the extracted summary.", + "default": 3 + }, + "sortBy": { "type": "string", - "description": "An optional duration value formatted based on the ISO 8601 (https://en.wikipedia.org/wiki/ISO_8601#Durations)" + "description": "Specifies how to sort the extracted summaries.", + "default": "Offset", + "enum": [ + "Offset", + "Rank" + ], + "x-ms-enum": { + "name": "ExtractiveSummarizationSortingCriteria", + "modelAsString": true, + "values": [ + { + "name": "Offset", + "value": "Offset", + "description": "Indicates that results should be sorted in order of appearance in the text." + }, + { + "name": "Rank", + "value": "Rank", + "description": "Indicates that results should be sorted in order of importance (i.e. rank score) according to the model." + } + ] + } }, - "modifier": { - "$ref": "#/definitions/TemporalModifier" + "stringIndexType": { + "type": "string", + "description": "Specifies the method used to interpret string offsets.", + "default": "TextElements_v8", + "enum": [ + "TextElements_v8", + "UnicodeCodePoint", + "Utf16CodeUnit" + ], + "x-ms-enum": { + "name": "StringIndexType", + "modelAsString": true, + "values": [ + { + "name": "TextElements_v8", + "value": "TextElements_v8", + "description": "Returned offset and length values will correspond to TextElements (Graphemes and Grapheme clusters) confirming to the Unicode 8.0.0 standard. Use this option if your application is written in .Net Framework or .Net Core and you will be using StringInfo." + }, + { + "name": "UnicodeCodePoint", + "value": "UnicodeCodePoint", + "description": "Returned offset and length values will correspond to Unicode code points. Use this option if your application is written in a language that support Unicode, for example Python." + }, + { + "name": "Utf16CodeUnit", + "value": "Utf16CodeUnit", + "description": "Returned offset and length values will correspond to UTF-16 code units. Use this option if your application is written in a language that support Unicode, for example Java, JavaScript." + } + ] + } }, - "timex": { + "query": { "type": "string", - "description": "An optional triplet containing the beginning, the end, and the duration all stated as ISO 8601 formatted strings." + "description": "(Optional) If provided, the query will be used to extract most relevant sentences from the document." } } }, - "NumericRangeMetadata": { - "description": "represents the Metadata of numeric intervals.", - "allOf": [ - { - "$ref": "#/definitions/BaseMetadata" + "FhirBundle": { + "type": "object", + "description": "JSON bundle containing a FHIR compatible object for consumption in other Healthcare tools. For additional information see https://www.hl7.org/fhir/overview.html.", + "additionalProperties": {} + }, + "HealthcareAssertion": { + "type": "object", + "description": "Assertion of the entity.", + "properties": { + "conditionality": { + "$ref": "#/definitions/Conditionality", + "description": "Describes any conditionality on the entity." + }, + "certainty": { + "$ref": "#/definitions/Certainty", + "description": "Describes the entities certainty and polarity." + }, + "association": { + "$ref": "#/definitions/Association", + "description": "Describes if the entity is the subject of the text or if it describes someone else." + }, + "temporality": { + "$ref": "#/definitions/Temporality", + "description": "Describes temporal information regarding the entity." } - ], + } + }, + "HealthcareEntitiesDocumentResultWithDocumentDetectedLanguage": { "type": "object", - "x-ms-discriminator-value": "NumericRangeMetadata", + "description": "Result object for the processed Healthcare document with detected language.", "properties": { - "rangeKind": { - "$ref": "#/definitions/NumericRangeKind" + "id": { + "type": "string", + "description": "Unique, non-empty document identifier." }, - "minimum": { - "type": "number", - "format": "double", - "description": "The beginning value of the interval." + "warnings": { + "type": "array", + "description": "Warnings encountered while processing document.", + "items": { + "$ref": "#/definitions/DocumentWarning" + }, + "x-ms-identifiers": [] }, - "maximum": { - "type": "number", - "format": "double", - "description": "The ending value of the interval." + "statistics": { + "$ref": "#/definitions/DocumentStatistics", + "description": "if showStats=true was specified in the request this field will contain information about the document payload." }, - "rangeInclusivity": { - "$ref": "#/definitions/RangeInclusivity" + "entities": { + "type": "array", + "description": "Healthcare entities.", + "items": { + "$ref": "#/definitions/HealthcareEntity" + }, + "x-ms-identifiers": [] + }, + "relations": { + "type": "array", + "description": "Healthcare entity relations.", + "items": { + "$ref": "#/definitions/HealthcareRelation" + }, + "x-ms-identifiers": [] + }, + "fhirBundle": { + "$ref": "#/definitions/FhirBundle", + "description": "JSON bundle containing a FHIR compatible object for consumption in other Healthcare tools. For additional information see https://www.hl7.org/fhir/overview.html." + }, + "detectedLanguage": { + "$ref": "#/definitions/DetectedLanguage", + "description": "If 'language' is set to 'auto' for the document in the request this field will contain a 2 letter ISO 639-1 representation of the language detected for this document." } }, "required": [ - "rangeKind", - "minimum", - "maximum" + "id", + "warnings", + "entities", + "relations" ] }, - "TemporalModifier": { - "type": "string", - "description": "An optional modifier of a date/time instance.", - "enum": [ - "AfterApprox", - "Before", - "BeforeStart", - "Approx", - "ReferenceUndefined", - "SinceEnd", - "AfterMid", - "Start", - "After", - "BeforeEnd", - "Until", - "End", - "Less", - "Since", - "AfterStart", - "BeforeApprox", - "Mid", - "More" - ], - "x-ms-enum": { - "name": "TemporalModifier", - "modelAsString": true - } - }, - "TimeExpression": { - "type": "string", - "description": "An extended ISO 8601 date/time representation as described in (https://github.com/Microsoft/Recognizers-Text/blob/master/Patterns/English/English-DateTime.yaml)" - }, - "Match": { + "HealthcareEntity": { "type": "object", - "required": [ - "confidenceScore", - "text", - "offset", - "length" - ], + "description": "Healthcare entity extracted from the document", "properties": { - "confidenceScore": { - "type": "number", - "format": "double", - "description": "If a well known item is recognized, a decimal number denoting the confidence level between 0 and 1 will be returned." - }, "text": { "type": "string", "description": "Entity text as appears in the request." }, + "category": { + "$ref": "#/definitions/healthcareEntityCategory", + "description": "Healthcare Entity Category." + }, + "subcategory": { + "type": "string", + "description": "(Optional) Entity sub type." + }, "offset": { "type": "integer", "format": "int32", - "description": "Start position for the entity match text." + "description": "Start position for the entity text. Use of different 'stringIndexType' values can affect the offset returned." }, "length": { "type": "integer", "format": "int32", - "description": "Length for the entity match text." - } - } - }, - "PiiTaskParameters": { - "type": "object", - "description": "Supported parameters for a PII Entities Recognition task.", - "properties": { - "domain": { - "$ref": "#/definitions/PiiDomain" + "description": "Length for the entity text. Use of different 'stringIndexType' values can affect the length returned." }, - "piiCategories": { - "$ref": "#/definitions/PiiCategories" + "confidenceScore": { + "type": "number", + "format": "double", + "description": "Confidence score between 0 and 1 of the extracted entity." }, - "excludePiiCategories": { - "$ref": "#/definitions/PiiCategoriesExclude" + "assertion": { + "$ref": "#/definitions/HealthcareAssertion", + "description": "Assertion of the entity." }, - "stringIndexType": { - "$ref": "common.json#/definitions/StringIndexType" + "name": { + "type": "string", + "description": "Preferred name for the entity. Example: 'histologically' would have a 'name' of 'histologic'." }, - "redactionCharacter": { - "$ref": "common.json#/definitions/RedactionCharacter" + "links": { + "type": "array", + "description": "Entity references in known data sources.", + "items": { + "$ref": "#/definitions/HealthcareEntityLink" + } } }, - "allOf": [ - { - "$ref": "common.json#/definitions/PreBuiltTaskParameters" + "required": [ + "text", + "category", + "offset", + "length", + "confidenceScore" + ] + }, + "HealthcareEntityLink": { + "type": "object", + "description": "Reference to an entity in known data sources.", + "properties": { + "dataSource": { + "type": "string", + "description": "Entity Catalog. Examples include: UMLS, CHV, MSH, etc." + }, + "id": { + "type": "string", + "description": "Entity id in the given source catalog." } + }, + "required": [ + "dataSource", + "id" ] }, - "PiiLROTask": { + "HealthcareLROResult": { "type": "object", - "description": "An object representing the task definition for a PII Entities Recognition task.", + "description": "Healthcare Analyze Text long tunning operation result object.", "properties": { - "parameters": { - "$ref": "#/definitions/PiiTaskParameters" + "results": { + "$ref": "#/definitions/HealthcareResult", + "description": "Results of the task." } }, + "required": [ + "results" + ], "allOf": [ { - "$ref": "#/definitions/AnalyzeTextLROTask" + "$ref": "#/definitions/AnalyzeTextLROResult" } ], - "x-ms-discriminator-value": "PiiEntityRecognition" + "x-ms-discriminator-value": "HealthcareLROResults" }, - "PiiTaskResult": { + "HealthcareLROTask": { "type": "object", + "description": "The long running task to be performed by the service on the Healthcare input documents.", "properties": { - "results": { - "$ref": "#/definitions/PiiResult" + "parameters": { + "$ref": "#/definitions/HealthcareTaskParameters", + "description": "Parameters for the Healthcare task." } }, "allOf": [ { - "$ref": "#/definitions/AnalyzeTextTaskResult" + "$ref": "#/definitions/AnalyzeTextLROTask" } ], - "required": [ - "results" - ], - "x-ms-discriminator-value": "PiiEntityRecognitionResults" + "x-ms-discriminator-value": "Healthcare" }, - "PiiResult": { + "HealthcareRelation": { "type": "object", + "description": "Every relation is an entity graph of a certain relationType, where all entities are connected and have specific roles within the relation context.", "properties": { - "documents": { + "relationType": { + "$ref": "#/definitions/relationType", + "description": "Type of relation. Examples include: `DosageOfMedication` or 'FrequencyOfMedication', etc." + }, + "entities": { "type": "array", - "description": "Response by document", + "description": "The entities in the relation.", "items": { - "$ref": "#/definitions/PIIResultWithDetectedLanguage" - } + "$ref": "#/definitions/HealthcareRelationEntity" + }, + "x-ms-identifiers": [] + }, + "confidenceScore": { + "type": "number", + "format": "double", + "description": "Confidence score between 0 and 1 of the extracted relation." } }, - "allOf": [ - { - "$ref": "common.json#/definitions/PreBuiltResult" - } - ], "required": [ - "documents" + "relationType", + "entities" ] }, - "PIIResultWithDetectedLanguage": { + "HealthcareRelationEntity": { "type": "object", - "allOf": [ - { - "$ref": "#/definitions/PiiEntitiesDocumentResult" + "description": "Entity in the relation.", + "properties": { + "ref": { + "type": "string", + "description": "Reference link object, using a JSON pointer RFC 6901 (URI Fragment Identifier Representation), pointing to the entity ." }, - { - "$ref": "#/definitions/DocumentDetectedLanguage" + "role": { + "type": "string", + "description": "Role of entity in the relationship. For example: 'CD20-positive diffuse large B-cell lymphoma' has the following entities with their roles in parenthesis: CD20 (GeneOrProtein), Positive (Expression), diffuse large B-cell lymphoma (Diagnosis)." } + }, + "required": [ + "ref", + "role" ] }, - "PiiDomain": { - "type": "string", - "description": "The PII domain used for PII Entity Recognition.", - "default": "none", - "enum": [ - "phi", - "none" - ], - "x-ms-enum": { - "name": "PiiDomain", - "modelAsString": true, - "values": [ - { - "name": "phi", - "description": "Indicates that entities in the Personal Health Information domain should be redacted.", - "value": "phi" - }, - { - "name": "none", - "description": "Indicates that no domain is specified.", - "value": "none" - } - ] - } - }, - "PiiEntitiesDocumentResult": { + "HealthcareResult": { "type": "object", + "description": "Result object for the processed Healthcare task.", "properties": { - "redactedText": { + "errors": { + "type": "array", + "description": "Errors by document id.", + "items": { + "$ref": "#/definitions/DocumentError" + } + }, + "statistics": { + "$ref": "#/definitions/RequestStatistics", + "description": "if showStats=true was specified in the request this field will contain information about the request payload." + }, + "modelVersion": { "type": "string", - "description": "Returns redacted text." + "description": "This field indicates which model is used for scoring." }, - "entities": { + "documents": { "type": "array", - "description": "Recognized entities in the document.", + "description": "List of result objects for the processed Healthcare documents.", "items": { - "$ref": "#/definitions/Entity" + "$ref": "#/definitions/HealthcareEntitiesDocumentResultWithDocumentDetectedLanguage" } } }, - "allOf": [ - { - "$ref": "#/definitions/DocumentResult" - } - ], "required": [ - "redactedText", - "entities" + "errors", + "modelVersion", + "documents" ] }, - "PiiCategories": { - "description": "(Optional) describes the PII categories to return", - "items": { - "type": "string", - "x-ms-enum": { - "name": "PiiCategory", - "modelAsString": true - }, - "enum": [ - "ABARoutingNumber", - "ARNationalIdentityNumber", - "AUBankAccountNumber", - "AUDriversLicenseNumber", - "AUMedicalAccountNumber", - "AUPassportNumber", - "AUTaxFileNumber", - "AUBusinessNumber", - "AUCompanyNumber", - "ATIdentityCard", - "ATTaxIdentificationNumber", - "ATValueAddedTaxNumber", - "AzureDocumentDBAuthKey", - "AzureIAASDatabaseConnectionAndSQLString", - "AzureIoTConnectionString", - "AzurePublishSettingPassword", - "AzureRedisCacheString", - "AzureSAS", - "AzureServiceBusString", - "AzureStorageAccountKey", - "AzureStorageAccountGeneric", - "BENationalNumber", - "BENationalNumberV2", - "BEValueAddedTaxNumber", - "BRCPFNumber", - "BRLegalEntityNumber", - "BRNationalIDRG", - "BGUniformCivilNumber", - "CABankAccountNumber", - "CADriversLicenseNumber", - "CAHealthServiceNumber", - "CAPassportNumber", - "CAPersonalHealthIdentification", - "CASocialInsuranceNumber", - "CLIdentityCardNumber", - "CNResidentIdentityCardNumber", - "CreditCardNumber", - "HRIdentityCardNumber", - "HRNationalIDNumber", - "HRPersonalIdentificationNumber", - "HRPersonalIdentificationOIBNumberV2", - "CYIdentityCard", - "CYTaxIdentificationNumber", - "CZPersonalIdentityNumber", - "CZPersonalIdentityV2", - "DKPersonalIdentificationNumber", - "DKPersonalIdentificationV2", - "DrugEnforcementAgencyNumber", - "EEPersonalIdentificationCode", - "EUDebitCardNumber", - "EUDriversLicenseNumber", - "EUGPSCoordinates", - "EUNationalIdentificationNumber", - "EUPassportNumber", - "EUSocialSecurityNumber", - "EUTaxIdentificationNumber", - "FIEuropeanHealthNumber", - "FINationalID", - "FINationalIDV2", - "FIPassportNumber", - "FRDriversLicenseNumber", - "FRHealthInsuranceNumber", - "FRNationalID", - "FRPassportNumber", - "FRSocialSecurityNumber", - "FRTaxIdentificationNumber", - "FRValueAddedTaxNumber", - "DEDriversLicenseNumber", - "DEPassportNumber", - "DEIdentityCardNumber", - "DETaxIdentificationNumber", - "DEValueAddedNumber", - "GRNationalIDCard", - "GRNationalIDV2", - "GRTaxIdentificationNumber", - "HKIdentityCardNumber", - "HUValueAddedNumber", - "HUPersonalIdentificationNumber", - "HUTaxIdentificationNumber", - "INPermanentAccount", - "INUniqueIdentificationNumber", - "IDIdentityCardNumber", - "InternationalBankingAccountNumber", - "IEPersonalPublicServiceNumber", - "IEPersonalPublicServiceNumberV2", - "ILBankAccountNumber", - "ILNationalID", - "ITDriversLicenseNumber", - "ITFiscalCode", - "ITValueAddedTaxNumber", - "JPBankAccountNumber", - "JPDriversLicenseNumber", - "JPPassportNumber", - "JPResidentRegistrationNumber", - "JPSocialInsuranceNumber", - "JPMyNumberCorporate", - "JPMyNumberPersonal", - "JPResidenceCardNumber", - "LVPersonalCode", - "LTPersonalCode", - "LUNationalIdentificationNumberNatural", - "LUNationalIdentificationNumberNonNatural", - "MYIdentityCardNumber", - "MTIdentityCardNumber", - "MTTaxIDNumber", - "NLCitizensServiceNumber", - "NLCitizensServiceNumberV2", - "NLTaxIdentificationNumber", - "NLValueAddedTaxNumber", - "NZBankAccountNumber", - "NZDriversLicenseNumber", - "NZInlandRevenueNumber", - "NZMinistryOfHealthNumber", - "NZSocialWelfareNumber", - "NOIdentityNumber", - "PHUnifiedMultiPurposeIDNumber", - "PLIdentityCard", - "PLNationalID", - "PLNationalIDV2", - "PLPassportNumber", - "PLTaxIdentificationNumber", - "PLREGONNumber", - "PTCitizenCardNumber", - "PTCitizenCardNumberV2", - "PTTaxIdentificationNumber", - "ROPersonalNumericalCode", - "RUPassportNumberDomestic", - "RUPassportNumberInternational", - "SANationalID", - "SGNationalRegistrationIdentityCardNumber", - "SKPersonalNumber", - "SITaxIdentificationNumber", - "SIUniqueMasterCitizenNumber", - "ZAIdentificationNumber", - "KRResidentRegistrationNumber", - "ESDNI", - "ESSocialSecurityNumber", - "ESTaxIdentificationNumber", - "SQLServerConnectionString", - "SENationalID", - "SENationalIDV2", - "SEPassportNumber", - "SETaxIdentificationNumber", - "SWIFTCode", - "CHSocialSecurityNumber", - "TWNationalID", - "TWPassportNumber", - "TWResidentCertificate", - "THPopulationIdentificationCode", - "TRNationalIdentificationNumber", - "UKDriversLicenseNumber", - "UKElectoralRollNumber", - "UKNationalHealthNumber", - "UKNationalInsuranceNumber", - "UKUniqueTaxpayerNumber", - "USUKPassportNumber", - "USBankAccountNumber", - "USDriversLicenseNumber", - "USIndividualTaxpayerIdentification", - "USSocialSecurityNumber", - "UAPassportNumberDomestic", - "UAPassportNumberInternational", - "Organization", - "Email", - "URL", - "Age", - "PhoneNumber", - "IPAddress", - "Date", - "Person", - "Address", - "All", - "Default" - ] - }, - "type": "array", - "uniqueItems": true - }, - "PiiCategoriesExclude": { - "description": "(Optional) describes the PII categories to return", - "items": { - "type": "string", - "x-ms-enum": { - "name": "PiiCategoriesExclude", - "modelAsString": true - }, - "enum": [ - "ABARoutingNumber", - "ARNationalIdentityNumber", - "AUBankAccountNumber", - "AUDriversLicenseNumber", - "AUMedicalAccountNumber", - "AUPassportNumber", - "AUTaxFileNumber", - "AUBusinessNumber", - "AUCompanyNumber", - "ATIdentityCard", - "ATTaxIdentificationNumber", - "ATValueAddedTaxNumber", - "AzureDocumentDBAuthKey", - "AzureIAASDatabaseConnectionAndSQLString", - "AzureIoTConnectionString", - "AzurePublishSettingPassword", - "AzureRedisCacheString", - "AzureSAS", - "AzureServiceBusString", - "AzureStorageAccountKey", - "AzureStorageAccountGeneric", - "BENationalNumber", - "BENationalNumberV2", - "BEValueAddedTaxNumber", - "BRCPFNumber", - "BRLegalEntityNumber", - "BRNationalIDRG", - "BGUniformCivilNumber", - "CABankAccountNumber", - "CADriversLicenseNumber", - "CAHealthServiceNumber", - "CAPassportNumber", - "CAPersonalHealthIdentification", - "CASocialInsuranceNumber", - "CLIdentityCardNumber", - "CNResidentIdentityCardNumber", - "CreditCardNumber", - "HRIdentityCardNumber", - "HRNationalIDNumber", - "HRPersonalIdentificationNumber", - "HRPersonalIdentificationOIBNumberV2", - "CYIdentityCard", - "CYTaxIdentificationNumber", - "CZPersonalIdentityNumber", - "CZPersonalIdentityV2", - "DKPersonalIdentificationNumber", - "DKPersonalIdentificationV2", - "DrugEnforcementAgencyNumber", - "EEPersonalIdentificationCode", - "EUDebitCardNumber", - "EUDriversLicenseNumber", - "EUGPSCoordinates", - "EUNationalIdentificationNumber", - "EUPassportNumber", - "EUSocialSecurityNumber", - "EUTaxIdentificationNumber", - "FIEuropeanHealthNumber", - "FINationalID", - "FINationalIDV2", - "FIPassportNumber", - "FRDriversLicenseNumber", - "FRHealthInsuranceNumber", - "FRNationalID", - "FRPassportNumber", - "FRSocialSecurityNumber", - "FRTaxIdentificationNumber", - "FRValueAddedTaxNumber", - "DEDriversLicenseNumber", - "DEPassportNumber", - "DEIdentityCardNumber", - "DETaxIdentificationNumber", - "DEValueAddedNumber", - "GRNationalIDCard", - "GRNationalIDV2", - "GRTaxIdentificationNumber", - "HKIdentityCardNumber", - "HUValueAddedNumber", - "HUPersonalIdentificationNumber", - "HUTaxIdentificationNumber", - "INPermanentAccount", - "INUniqueIdentificationNumber", - "IDIdentityCardNumber", - "InternationalBankingAccountNumber", - "IEPersonalPublicServiceNumber", - "IEPersonalPublicServiceNumberV2", - "ILBankAccountNumber", - "ILNationalID", - "ITDriversLicenseNumber", - "ITFiscalCode", - "ITValueAddedTaxNumber", - "JPBankAccountNumber", - "JPDriversLicenseNumber", - "JPPassportNumber", - "JPResidentRegistrationNumber", - "JPSocialInsuranceNumber", - "JPMyNumberCorporate", - "JPMyNumberPersonal", - "JPResidenceCardNumber", - "LVPersonalCode", - "LTPersonalCode", - "LUNationalIdentificationNumberNatural", - "LUNationalIdentificationNumberNonNatural", - "MYIdentityCardNumber", - "MTIdentityCardNumber", - "MTTaxIDNumber", - "NLCitizensServiceNumber", - "NLCitizensServiceNumberV2", - "NLTaxIdentificationNumber", - "NLValueAddedTaxNumber", - "NZBankAccountNumber", - "NZDriversLicenseNumber", - "NZInlandRevenueNumber", - "NZMinistryOfHealthNumber", - "NZSocialWelfareNumber", - "NOIdentityNumber", - "PHUnifiedMultiPurposeIDNumber", - "PLIdentityCard", - "PLNationalID", - "PLNationalIDV2", - "PLPassportNumber", - "PLTaxIdentificationNumber", - "PLREGONNumber", - "PTCitizenCardNumber", - "PTCitizenCardNumberV2", - "PTTaxIdentificationNumber", - "ROPersonalNumericalCode", - "RUPassportNumberDomestic", - "RUPassportNumberInternational", - "SANationalID", - "SGNationalRegistrationIdentityCardNumber", - "SKPersonalNumber", - "SITaxIdentificationNumber", - "SIUniqueMasterCitizenNumber", - "ZAIdentificationNumber", - "KRResidentRegistrationNumber", - "ESDNI", - "ESSocialSecurityNumber", - "ESTaxIdentificationNumber", - "SQLServerConnectionString", - "SENationalID", - "SENationalIDV2", - "SEPassportNumber", - "SETaxIdentificationNumber", - "SWIFTCode", - "CHSocialSecurityNumber", - "TWNationalID", - "TWPassportNumber", - "TWResidentCertificate", - "THPopulationIdentificationCode", - "TRNationalIdentificationNumber", - "UKDriversLicenseNumber", - "UKElectoralRollNumber", - "UKNationalHealthNumber", - "UKNationalInsuranceNumber", - "UKUniqueTaxpayerNumber", - "USUKPassportNumber", - "USBankAccountNumber", - "USDriversLicenseNumber", - "USIndividualTaxpayerIdentification", - "USSocialSecurityNumber", - "UAPassportNumberDomestic", - "UAPassportNumberInternational", - "Organization", - "Email", - "URL", - "Age", - "PhoneNumber", - "IPAddress", - "Date", - "Person", - "Address" - ] - }, - "type": "array", - "uniqueItems": true - }, - "ExtractiveSummarizationTaskParameters": { + "HealthcareTaskParameters": { "type": "object", - "description": "Supported parameters for an Extractive Summarization task.", + "description": "Supported parameters for a Healthcare task.", "properties": { - "sentenceCount": { - "type": "integer", - "default": 3, - "format": "int64" + "loggingOptOut": { + "type": "boolean", + "description": "logging opt out", + "default": false }, - "sortBy": { - "$ref": "#/definitions/ExtractiveSummarizationSortingCriteria" + "modelVersion": { + "type": "string", + "description": "model version", + "default": "latest" }, "stringIndexType": { - "$ref": "common.json#/definitions/StringIndexType" - }, - "query": { "type": "string", - "description": "(Optional) If provided, the query will be used to extract most relevant sentences from the document." - } - }, - "allOf": [ - { - "$ref": "common.json#/definitions/PreBuiltTaskParameters" + "description": "Specifies the method used to interpret string offsets.", + "default": "TextElements_v8", + "enum": [ + "TextElements_v8", + "UnicodeCodePoint", + "Utf16CodeUnit" + ], + "x-ms-enum": { + "name": "StringIndexType", + "modelAsString": true, + "values": [ + { + "name": "TextElements_v8", + "value": "TextElements_v8", + "description": "Returned offset and length values will correspond to TextElements (Graphemes and Grapheme clusters) confirming to the Unicode 8.0.0 standard. Use this option if your application is written in .Net Framework or .Net Core and you will be using StringInfo." + }, + { + "name": "UnicodeCodePoint", + "value": "UnicodeCodePoint", + "description": "Returned offset and length values will correspond to Unicode code points. Use this option if your application is written in a language that support Unicode, for example Python." + }, + { + "name": "Utf16CodeUnit", + "value": "Utf16CodeUnit", + "description": "Returned offset and length values will correspond to UTF-16 code units. Use this option if your application is written in a language that support Unicode, for example Java, JavaScript." + } + ] + } + }, + "fhirVersion": { + "$ref": "#/definitions/fhirVersion", + "description": "The FHIR Spec version that the result will use to format the fhirBundle. For additional information see https://www.hl7.org/fhir/overview.html." + }, + "documentType": { + "$ref": "#/definitions/healthcareDocumentType", + "description": "Document type that can be provided as input for Fhir Documents. Expect to have fhirVersion provided when used. Behavior of using None enum is the same as not using the documentType parameter." } - ] + } }, - "ExtractiveSummarizationLROTask": { + "InformationMetadata": { "type": "object", - "description": "An object representing the task definition for an Extractive Summarization task.", + "description": "Represents the Information (data) entity Metadata model.", "properties": { - "parameters": { - "$ref": "#/definitions/ExtractiveSummarizationTaskParameters" + "value": { + "type": "number", + "format": "double", + "description": "The numeric value that the extracted text denotes." + }, + "unit": { + "$ref": "#/definitions/InformationUnit", + "description": "Unit of measure for information." } }, + "required": [ + "value", + "unit" + ], "allOf": [ { - "$ref": "#/definitions/AnalyzeTextLROTask" + "$ref": "#/definitions/BaseMetadata" } ], - "x-ms-discriminator-value": "ExtractiveSummarization" + "x-ms-discriminator-value": "InformationMetadata" }, - "ExtractiveSummarizationResult": { - "type": "object", - "properties": { - "documents": { - "type": "array", - "description": "Response by document", - "items": { - "$ref": "#/definitions/ExtractedSummaryDocumentResultWithDetectedLanguage" - } - } - }, - "allOf": [ - { - "$ref": "common.json#/definitions/PreBuiltResult" - } + "InformationUnit": { + "type": "string", + "description": "The information (data) Unit of measurement.", + "enum": [ + "Unspecified", + "Bit", + "Kilobit", + "Megabit", + "Gigabit", + "Terabit", + "Petabit", + "Byte", + "Kilobyte", + "Megabyte", + "Gigabyte", + "Terabyte", + "Petabyte" ], - "required": [ - "documents" - ] + "x-ms-enum": { + "name": "InformationUnit", + "modelAsString": true, + "values": [ + { + "name": "Unspecified", + "value": "Unspecified", + "description": "Unspecified data size unit" + }, + { + "name": "Bit", + "value": "Bit", + "description": "Data size unit in bits" + }, + { + "name": "Kilobit", + "value": "Kilobit", + "description": "Data size unit in kilobits" + }, + { + "name": "Megabit", + "value": "Megabit", + "description": "Data size unit in megabits" + }, + { + "name": "Gigabit", + "value": "Gigabit", + "description": "Data size unit in gigabits" + }, + { + "name": "Terabit", + "value": "Terabit", + "description": "Data size unit in terabits" + }, + { + "name": "Petabit", + "value": "Petabit", + "description": "Data size unit in petabits" + }, + { + "name": "Byte", + "value": "Byte", + "description": "Data size unit in bytes" + }, + { + "name": "Kilobyte", + "value": "Kilobyte", + "description": "Data size unit in kilobytes" + }, + { + "name": "Megabyte", + "value": "Megabyte", + "description": "Data size unit in megabytes" + }, + { + "name": "Gigabyte", + "value": "Gigabyte", + "description": "Data size unit in gigabytes" + }, + { + "name": "Terabyte", + "value": "Terabyte", + "description": "Data size unit in terabytes" + }, + { + "name": "Petabyte", + "value": "Petabyte", + "description": "Data size unit in petabytes" + } + ] + } }, - "ExtractiveSummarizationSortingCriteria": { + "InnerErrorCode": { "type": "string", - "default": "Offset", - "description": "The sorting criteria to use for the results of Extractive Summarization.", + "description": "Human-readable error code.", "enum": [ - "Offset", - "Rank" + "InvalidRequest", + "InvalidParameterValue", + "KnowledgeBaseNotFound", + "AzureCognitiveSearchNotFound", + "AzureCognitiveSearchThrottling", + "ExtractionFailure", + "InvalidRequestBodyFormat", + "EmptyRequest", + "MissingInputDocuments", + "InvalidDocument", + "ModelVersionIncorrect", + "InvalidDocumentBatch", + "UnsupportedLanguageCode", + "InvalidCountryHint" ], "x-ms-enum": { - "name": "ExtractiveSummarizationSortingCriteria", + "name": "InnerErrorCode", "modelAsString": true, "values": [ { - "name": "Offset", - "description": "Indicates that results should be sorted in order of appearance in the text.", - "value": "Offset" + "name": "InvalidRequest", + "value": "InvalidRequest", + "description": "Invalid request error" + }, + { + "name": "InvalidParameterValue", + "value": "InvalidParameterValue", + "description": "Invalid parameter value error" + }, + { + "name": "KnowledgeBaseNotFound", + "value": "KnowledgeBaseNotFound", + "description": "Knowledge base not found error" + }, + { + "name": "AzureCognitiveSearchNotFound", + "value": "AzureCognitiveSearchNotFound", + "description": "Azure Cognitive Search not found error" + }, + { + "name": "AzureCognitiveSearchThrottling", + "value": "AzureCognitiveSearchThrottling", + "description": "Azure Cognitive Search throttling error" + }, + { + "name": "ExtractionFailure", + "value": "ExtractionFailure", + "description": "Extraction failure error" }, { - "name": "Rank", - "description": "Indicates that results should be sorted in order of importance (i.e. rank score) according to the model.", - "value": "Rank" + "name": "InvalidRequestBodyFormat", + "value": "InvalidRequestBodyFormat", + "description": "Invalid request body format error" + }, + { + "name": "EmptyRequest", + "value": "EmptyRequest", + "description": "Empty request error" + }, + { + "name": "MissingInputDocuments", + "value": "MissingInputDocuments", + "description": "Missing input documents error" + }, + { + "name": "InvalidDocument", + "value": "InvalidDocument", + "description": "Invalid document error" + }, + { + "name": "ModelVersionIncorrect", + "value": "ModelVersionIncorrect", + "description": "Model version incorrect error" + }, + { + "name": "InvalidDocumentBatch", + "value": "InvalidDocumentBatch", + "description": "Invalid document batch error" + }, + { + "name": "UnsupportedLanguageCode", + "value": "UnsupportedLanguageCode", + "description": "Unsupported language code error" + }, + { + "name": "InvalidCountryHint", + "value": "InvalidCountryHint", + "description": "Invalid country hint error" } ] } }, - "ExtractedSummaryDocumentResultWithDetectedLanguage": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/ExtractedSummaryDocumentResult" - }, - { - "$ref": "#/definitions/DocumentDetectedLanguage" - } - ] - }, - "ExtractedSummaryDocumentResult": { + "InnerErrorModel": { "type": "object", + "description": "An object containing more specific information about the error. As per Microsoft One API guidelines - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses.", "properties": { - "sentences": { - "type": "array", - "description": "A ranked list of sentences representing the extracted summary.", - "items": { - "$ref": "#/definitions/ExtractedSummarySentence" + "code": { + "$ref": "#/definitions/InnerErrorCode", + "description": "One of a server-defined set of error codes." + }, + "message": { + "type": "string", + "description": "Error message." + }, + "details": { + "type": "object", + "description": "Error details.", + "additionalProperties": { + "type": "string" } + }, + "target": { + "type": "string", + "description": "Error target." + }, + "innererror": { + "$ref": "#/definitions/InnerErrorModel", + "description": "An object containing more specific information than the current object about the error." } }, - "allOf": [ - { - "$ref": "#/definitions/DocumentResult" - } - ], "required": [ - "sentences" + "code", + "message" ] }, - "ExtractedSummarySentence": { + "KeyPhraseExtractionLROResult": { "type": "object", - "required": [ - "text", - "rankScore", - "offset", - "length" - ], + "description": "Contains the analyze text KeyPhraseExtraction LRO task.", "properties": { - "text": { - "type": "string", - "description": "The extracted sentence text." - }, - "rankScore": { - "type": "number", - "format": "double", - "description": "A double value representing the relevance of the sentence within the summary. Higher values indicate higher importance." - }, - "offset": { - "type": "integer", - "format": "int32", - "description": "The sentence offset from the start of the document, based on the value of the parameter StringIndexType." - }, - "length": { - "type": "integer", - "format": "int32", - "description": "The length of the sentence." + "results": { + "$ref": "#/definitions/KeyPhraseResult", + "description": "The list of Key phrase extraction results" } - } - }, - "KeyPhraseTaskParameters": { - "type": "object", - "description": "Supported parameters for a Key Phrase Extraction task.", + }, + "required": [ + "results" + ], "allOf": [ { - "$ref": "common.json#/definitions/PreBuiltTaskParameters" + "$ref": "#/definitions/AnalyzeTextLROResult" } - ] + ], + "x-ms-discriminator-value": "KeyPhraseExtractionLROResults" }, "KeyPhraseLROTask": { "type": "object", "description": "An object representing the task definition for a Key Phrase Extraction task.", "properties": { "parameters": { - "$ref": "#/definitions/KeyPhraseTaskParameters" + "$ref": "#/definitions/KeyPhraseTaskParameters", + "description": "Key phrase extraction task parameters." } }, "allOf": [ @@ -4038,26 +4612,25 @@ ], "x-ms-discriminator-value": "KeyPhraseExtraction" }, - "KeyPhraseTaskResult": { - "type": "object", - "properties": { - "results": { - "$ref": "#/definitions/KeyPhraseResult" - } - }, - "allOf": [ - { - "$ref": "#/definitions/AnalyzeTextTaskResult" - } - ], - "required": [ - "results" - ], - "x-ms-discriminator-value": "KeyPhraseExtractionResults" - }, "KeyPhraseResult": { "type": "object", + "description": "Contains the KeyPhraseResult.", "properties": { + "errors": { + "type": "array", + "description": "Errors by document id.", + "items": { + "$ref": "#/definitions/DocumentError" + } + }, + "statistics": { + "$ref": "#/definitions/RequestStatistics", + "description": "if showStats=true was specified in the request this field will contain information about the request payload." + }, + "modelVersion": { + "type": "string", + "description": "This field indicates which model is used for scoring." + }, "documents": { "type": "array", "description": "Response by document", @@ -4066,966 +4639,5696 @@ } } }, - "allOf": [ - { - "$ref": "common.json#/definitions/PreBuiltResult" - } - ], "required": [ + "errors", + "modelVersion", "documents" ] }, - "KeyPhrasesDocumentResultWithDetectedLanguage": { + "KeyPhraseTaskParameters": { "type": "object", - "description": "Key phrases recognized in a document with detected language", - "allOf": [ - { - "$ref": "#/definitions/KeyPhrasesDocumentResult" + "description": "Supported parameters for a Key Phrase Extraction task.", + "properties": { + "loggingOptOut": { + "type": "boolean", + "description": "logging opt out", + "default": false }, + "modelVersion": { + "type": "string", + "description": "model version", + "default": "latest" + } + } + }, + "KeyPhraseTaskResult": { + "type": "object", + "description": "Contains the analyze text KeyPhraseExtraction task result.", + "properties": { + "results": { + "$ref": "#/definitions/KeyPhraseResult", + "description": "The list of Key phrase extraction results" + } + }, + "required": [ + "results" + ], + "allOf": [ { - "$ref": "#/definitions/DocumentDetectedLanguage" + "$ref": "#/definitions/AnalyzeTextTaskResult" } - ] + ], + "x-ms-discriminator-value": "KeyPhraseExtractionResults" }, - "KeyPhrasesDocumentResult": { + "KeyPhrasesDocumentResultWithDetectedLanguage": { "type": "object", + "description": "A ranked list of sentences representing the extracted summary.", "properties": { + "id": { + "type": "string", + "description": "Unique, non-empty document identifier." + }, + "warnings": { + "type": "array", + "description": "Warnings encountered while processing document.", + "items": { + "$ref": "#/definitions/DocumentWarning" + }, + "x-ms-identifiers": [] + }, + "statistics": { + "$ref": "#/definitions/DocumentStatistics", + "description": "if showStats=true was specified in the request this field will contain information about the document payload." + }, "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" } + }, + "detectedLanguage": { + "$ref": "#/definitions/DetectedLanguage", + "description": "If 'language' is set to 'auto' for the document in the request this field will contain a 2 letter ISO 639-1 representation of the language detected for this document." } }, - "allOf": [ - { - "$ref": "#/definitions/DocumentResult" - } - ], "required": [ + "id", + "warnings", "keyPhrases" ] }, - "LanguageDetectionTaskParameters": { + "LanguageDetectionAnalysisInput": { "type": "object", - "description": "Supported parameters for a Language Detection task.", - "allOf": [ - { - "$ref": "common.json#/definitions/PreBuiltTaskParameters" + "description": "Contains the language detection document analysis input.", + "properties": { + "documents": { + "type": "array", + "description": "List of documents to be analyzed.", + "items": { + "$ref": "#/definitions/LanguageInput" + } } - ] + } }, - "LanguageDetectionTaskResult": { + "LanguageDetectionDocumentResult": { "type": "object", + "description": "Contains the language detection for a document.", "properties": { - "results": { - "$ref": "#/definitions/LanguageDetectionResult" + "id": { + "type": "string", + "description": "Unique, non-empty document identifier." + }, + "warnings": { + "type": "array", + "description": "Warnings encountered while processing document.", + "items": { + "$ref": "#/definitions/DocumentWarning" + }, + "x-ms-identifiers": [] + }, + "statistics": { + "$ref": "#/definitions/DocumentStatistics", + "description": "if showStats=true was specified in the request this field will contain information about the document payload." + }, + "detectedLanguage": { + "$ref": "#/definitions/DetectedLanguage", + "description": "Detected Language." } }, - "allOf": [ - { - "$ref": "#/definitions/AnalyzeTextTaskResult" - } - ], "required": [ - "results" - ], - "x-ms-discriminator-value": "LanguageDetectionResults" + "id", + "warnings", + "detectedLanguage" + ] }, "LanguageDetectionResult": { "type": "object", + "description": "Contains the language detection result for the request.", "properties": { + "errors": { + "type": "array", + "description": "Errors by document id.", + "items": { + "$ref": "#/definitions/DocumentError" + } + }, + "statistics": { + "$ref": "#/definitions/RequestStatistics", + "description": "if showStats=true was specified in the request this field will contain information about the request payload." + }, + "modelVersion": { + "type": "string", + "description": "This field indicates which model is used for scoring." + }, "documents": { "type": "array", - "description": "Response by document", + "description": "Enumeration of language detection results for each input document.", "items": { "$ref": "#/definitions/LanguageDetectionDocumentResult" } } }, - "allOf": [ - { - "$ref": "common.json#/definitions/PreBuiltResult" - } - ], "required": [ + "errors", + "modelVersion", "documents" ] }, - "LanguageDetectionDocumentResult": { - "type": "object", - "properties": { - "detectedLanguage": { - "description": "Detected Language.", - "$ref": "#/definitions/DetectedLanguage" - } - }, - "allOf": [ - { - "$ref": "#/definitions/DocumentResult" - } - ], - "required": [ - "detectedLanguage" - ] - }, - "DetectedLanguage": { + "LanguageDetectionTaskParameters": { "type": "object", - "required": [ - "name", - "iso6391Name", - "confidenceScore" - ], + "description": "Supported parameters for a Language Detection task.", "properties": { - "name": { - "type": "string", - "description": "Long name of a detected language (e.g. English, French)." - }, - "iso6391Name": { - "type": "string", - "description": "A two letter representation of the detected language according to the ISO 639-1 standard (e.g. en, fr)." - }, - "confidenceScore": { - "type": "number", - "format": "double", - "description": "A confidence score between 0 and 1. Scores close to 1 indicate 100% certainty that the identified language is true." - }, - "script": { - "type": "string", - "description": "Identifies the script of the input document. Maps to the ISO 15924 standard formal name.", - "enum": [ - "Arabic", - "Armenian", - "Bangla", - "UnifiedCanadianAboriginalSyllabics", - "Cyrillic", - "Devanagari", - "Ethiopic", - "Georgian", - "Greek", - "Gujarati", - "Gurmukhi", - "Hangul", - "HanSimplified", - "HanTraditional", - "Hebrew", - "Japanese", - "Khmer", - "Kannada", - "Lao", - "Latin", - "Malayalam", - "Myanmar", - "Odia", - "Sinhala", - "Tamil", - "Telugu", - "Thaana", - "Thai", - "Tibetan" - ], - "x-ms-enum": { - "name": "ScriptKind", - "modelAsString": true - } + "loggingOptOut": { + "type": "boolean", + "description": "logging opt out", + "default": false }, - "scriptCode": { + "modelVersion": { "type": "string", - "description": "Identifies the script of the input document. Maps to the ISO 15924 standard script code.", - "enum": [ - "Arab", - "Armn", - "Beng", - "Cans", - "Cyrl", - "Deva", - "Ethi", - "Geor", - "Grek", - "Gujr", - "Guru", - "Hang", - "Hans", - "Hant", - "Hebr", - "Jpan", - "Khmr", - "Knda", - "Laoo", - "Latn", - "Mlym", - "Mymr", - "Orya", - "Sinh", - "Taml", - "Telu", - "Thaa", - "Thai", - "Tibt" - ], - "x-ms-enum": { - "name": "ScriptCode", - "modelAsString": true - } + "description": "model version", + "default": "latest" } } }, - "DynamicClassificationTaskParameters": { - "type": "object", - "description": "Supported parameters for a Zero Shot Classification task.", - "properties": { - "classificationType": { - "type": "string", - "description": "Specifies either one or multiple categories per document. Defaults to multi classification which may return more than one class for each document.", - "default": "Multi", - "enum": [ - "Single", - "Multi" - ], - "x-ms-enum": { - "name": "ClassificationType", - "modelAsString": true - } - }, - "categories": { - "type": "array", - "description": "a list of categories to which input is classified to.", - "items": { - "type": "string" - } - } - }, - "allOf": [ - { - "$ref": "common.json#/definitions/PreBuiltTaskParameters" - } - ], - "required": [ - "categories" - ] - }, - "DynamicClassificationTaskResult": { + "LanguageDetectionTaskResult": { "type": "object", + "description": "Contains the language detection task result for the request.", "properties": { "results": { - "$ref": "#/definitions/DynamicClassificationResult" + "$ref": "#/definitions/LanguageDetectionResult", + "description": "Contains the language detection results." } }, - "allOf": [ - { - "$ref": "#/definitions/AnalyzeTextTaskResult" - } - ], "required": [ "results" ], - "x-ms-discriminator-value": "DynamicClassificationResults" - }, - "DynamicClassificationResult": { - "type": "object", - "properties": { - "documents": { - "type": "array", - "description": "Response by document", - "items": { - "allOf": [ - { - "$ref": "#/definitions/DynamicClassificationDocumentResult" - } - ] - } - } - }, - "allOf": [ - { - "$ref": "common.json#/definitions/PreBuiltResult" - } - ], - "required": [ - "documents" - ] - }, - "AnalyzeTextJobState": { "allOf": [ { - "$ref": "common.json#/definitions/JobState" - }, - { - "$ref": "#/definitions/TasksState" - }, - { - "$ref": "#/definitions/AnalyzeTextJobStatistics" - } - ] - }, - "Pagination": { - "properties": { - "nextLink": { - "type": "string" - } - }, - "type": "object" - }, - "AnalyzeTextJobStatistics": { - "properties": { - "statistics": { - "$ref": "common.json#/definitions/RequestStatistics" - } - }, - "type": "object" - }, - "TasksState": { - "properties": { - "tasks": { - "properties": { - "completed": { - "type": "integer", - "format": "int32" - }, - "failed": { - "type": "integer", - "format": "int32" - }, - "inProgress": { - "type": "integer", - "format": "int32" - }, - "total": { - "type": "integer", - "format": "int32" - }, - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/AnalyzeTextLROResult" - } - } - }, - "required": [ - "total", - "completed", - "failed", - "inProgress" - ], - "type": "object" + "$ref": "#/definitions/AnalyzeTextTaskResult" } - }, - "required": [ - "tasks" ], - "type": "object" + "x-ms-discriminator-value": "LanguageDetectionResults" }, - "TaskState": { + "LanguageInput": { + "type": "object", + "description": "Contains the language detection input.", "properties": { - "lastUpdateDateTime": { - "format": "date-time", - "type": "string" + "id": { + "type": "string", + "description": "A unique, non-empty document identifier." }, - "status": { + "text": { "type": "string", - "enum": [ - "notStarted", - "running", - "succeeded", - "failed", - "cancelled", - "cancelling" - ], - "x-ms-enum": { - "modelAsString": true, - "name": "State" - } + "description": "The input text to process." + }, + "countryHint": { + "type": "string", + "description": "The country hint to help with language detection of the text." } }, "required": [ - "status", - "lastUpdateDateTime" - ], - "type": "object" + "id", + "text" + ] }, - "AnalyzeTextLROResult": { + "LearnedComponent": { "type": "object", - "discriminator": "kind", + "description": "This object contains information of the learned component of the detected entity.", "properties": { - "kind": { - "$ref": "#/definitions/AnalyzeTextLROResultsKind" + "value": { + "type": "string", + "description": "The learned component of an extracted entity type." } }, "allOf": [ { - "$ref": "#/definitions/TaskState" - }, - { - "$ref": "common.json#/definitions/TaskIdentifier" + "$ref": "#/definitions/EntityComponentInformation" } ], - "required": [ - "kind" - ] + "x-ms-discriminator-value": "LearnedComponent" }, - "EntityRecognitionLROResult": { + "LengthMetadata": { "type": "object", + "description": "Represents the Length entity Metadata model.", "properties": { - "results": { - "$ref": "#/definitions/EntitiesResult" + "value": { + "type": "number", + "format": "double", + "description": "The numeric value that the extracted text denotes." + }, + "unit": { + "$ref": "#/definitions/LengthUnit", + "description": "Unit of measure for length." } }, - "allOf": [ - { - "$ref": "#/definitions/AnalyzeTextLROResult" - } - ], "required": [ - "results" + "value", + "unit" ], - "x-ms-discriminator-value": "EntityRecognitionLROResults" - }, - "CustomEntityRecognitionLROResult": { - "type": "object", - "properties": { - "results": { - "$ref": "#/definitions/CustomEntitiesResult" - } - }, "allOf": [ { - "$ref": "#/definitions/AnalyzeTextLROResult" + "$ref": "#/definitions/BaseMetadata" } ], - "required": [ - "results" - ], - "x-ms-discriminator-value": "CustomEntityRecognitionLROResults" + "x-ms-discriminator-value": "LengthMetadata" }, - "CustomSingleLabelClassificationLROResult": { - "type": "object", - "properties": { - "results": { - "$ref": "#/definitions/CustomLabelClassificationResult" - } - }, - "allOf": [ - { - "$ref": "#/definitions/AnalyzeTextLROResult" - } - ], - "required": [ - "results" + "LengthUnit": { + "type": "string", + "description": "The length unit of measurement.", + "enum": [ + "Unspecified", + "Kilometer", + "Hectometer", + "Decameter", + "Meter", + "Decimeter", + "Centimeter", + "Millimeter", + "Micrometer", + "Nanometer", + "Picometer", + "Mile", + "Yard", + "Inch", + "Foot", + "LightYear", + "Point" ], - "x-ms-discriminator-value": "CustomSingleLabelClassificationLROResults" + "x-ms-enum": { + "name": "LengthUnit", + "modelAsString": true, + "values": [ + { + "name": "Unspecified", + "value": "Unspecified", + "description": "Unspecified length unit." + }, + { + "name": "Kilometer", + "value": "Kilometer", + "description": "Length unit in kilometers." + }, + { + "name": "Hectometer", + "value": "Hectometer", + "description": "Length unit in hectometers." + }, + { + "name": "Decameter", + "value": "Decameter", + "description": "Length unit in decameters." + }, + { + "name": "Meter", + "value": "Meter", + "description": "Length unit in meters." + }, + { + "name": "Decimeter", + "value": "Decimeter", + "description": "Length unit in decimeters." + }, + { + "name": "Centimeter", + "value": "Centimeter", + "description": "Length unit in centimeters." + }, + { + "name": "Millimeter", + "value": "Millimeter", + "description": "Length unit in millimeters." + }, + { + "name": "Micrometer", + "value": "Micrometer", + "description": "Length unit in micrometers." + }, + { + "name": "Nanometer", + "value": "Nanometer", + "description": "Length unit in nanometers." + }, + { + "name": "Picometer", + "value": "Picometer", + "description": "Length unit in picometers." + }, + { + "name": "Mile", + "value": "Mile", + "description": "Length unit in miles." + }, + { + "name": "Yard", + "value": "Yard", + "description": "Length unit in yards." + }, + { + "name": "Inch", + "value": "Inch", + "description": "Length unit in inches." + }, + { + "name": "Foot", + "value": "Foot", + "description": "Length unit in feet." + }, + { + "name": "LightYear", + "value": "LightYear", + "description": "Length unit in light years." + }, + { + "name": "Point", + "value": "Point", + "description": "Length unit in points." + } + ] + } }, - "CustomMultiLabelClassificationLROResult": { + "LinkedEntity": { "type": "object", + "description": "The LinkedEntity object containing the detected entity with the associated sources/links.", "properties": { - "results": { - "$ref": "#/definitions/CustomLabelClassificationResult" + "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" + }, + "x-ms-identifiers": [] + }, + "language": { + "type": "string", + "description": "Language used in the data source." + }, + "id": { + "type": "string", + "description": "Unique identifier of the recognized entity from the data source." + }, + "url": { + "type": "string", + "description": "URL for the entity's page from the data source." + }, + "dataSource": { + "type": "string", + "description": "Data source used to extract entity linking, such as Wiki/Bing etc." + }, + "bingId": { + "type": "string", + "description": "Bing Entity Search API unique identifier of the recognized entity." } }, - "allOf": [ - { - "$ref": "#/definitions/AnalyzeTextLROResult" - } - ], "required": [ - "results" - ], - "x-ms-discriminator-value": "CustomMultiLabelClassificationLROResults" + "name", + "matches", + "language", + "url", + "dataSource" + ] }, - "EntityLinkingLROResult": { + "ListComponent": { "type": "object", + "description": "This object contains information of the list component of the detected entity.", "properties": { - "results": { - "$ref": "#/definitions/EntityLinkingResult" + "value": { + "type": "string", + "description": "The list key of an extracted entity type." } }, "allOf": [ { - "$ref": "#/definitions/AnalyzeTextLROResult" + "$ref": "#/definitions/EntityComponentInformation" } ], - "required": [ - "results" - ], - "x-ms-discriminator-value": "EntityLinkingLROResults" + "x-ms-discriminator-value": "ListComponent" }, - "PiiEntityRecognitionLROResult": { + "Match": { "type": "object", + "description": "The Match object containing the detected entity text with the offset and the length.", "properties": { - "results": { - "$ref": "#/definitions/PiiResult" + "confidenceScore": { + "type": "number", + "format": "double", + "description": "If a well known item is recognized, a decimal number denoting the confidence level between 0 and 1 will be returned." + }, + "text": { + "type": "string", + "description": "Entity text as appears in the request." + }, + "offset": { + "type": "integer", + "format": "int32", + "description": "Start position for the entity match text." + }, + "length": { + "type": "integer", + "format": "int32", + "description": "Length for the entity match text." } }, - "allOf": [ - { - "$ref": "#/definitions/AnalyzeTextLROResult" - } - ], "required": [ - "results" - ], - "x-ms-discriminator-value": "PiiEntityRecognitionLROResults" + "confidenceScore", + "text", + "offset", + "length" + ] }, - "ExtractiveSummarizationLROResult": { + "MatchLongestEntityPolicyType": { "type": "object", - "properties": { - "results": { - "$ref": "#/definitions/ExtractiveSummarizationResult" - } - }, + "description": "Represents the Match longest overlap policy. No overlapping entities as far as it is possible. 1. If there are overlapping entities, the longest one will be returned. 2. If the set of characters predicted for 2 or more entities are exactly the same, select the entity that has the higher confidence score.3. If the entity scores are identical, return all entities that are still present after applying the previous rules. 3. If there is partial overlap (as in Hello Text Analytics) follow the above steps starting from 1.", "allOf": [ { - "$ref": "#/definitions/AnalyzeTextLROResult" + "$ref": "#/definitions/BaseEntityOverlapPolicy" } ], - "required": [ - "results" + "x-ms-discriminator-value": "matchLongest" + }, + "MetadataKind": { + "type": "string", + "description": "The entity Metadata object kind.", + "enum": [ + "DateMetadata", + "DateTimeMetadata", + "TimeMetadata", + "TemporalSetMetadata", + "NumberMetadata", + "OrdinalMetadata", + "SpeedMetadata", + "WeightMetadata", + "LengthMetadata", + "VolumeMetadata", + "AreaMetadata", + "AgeMetadata", + "InformationMetadata", + "TemperatureMetadata", + "CurrencyMetadata", + "NumericRangeMetadata", + "TemporalSpanMetadata" ], - "x-ms-discriminator-value": "ExtractiveSummarizationLROResults" + "x-ms-enum": { + "name": "MetadataKind", + "modelAsString": true, + "values": [ + { + "name": "DateMetadata", + "value": "DateMetadata", + "description": "Metadata for date-related values." + }, + { + "name": "DateTimeMetadata", + "value": "DateTimeMetadata", + "description": "Metadata for date and time-related values." + }, + { + "name": "TimeMetadata", + "value": "TimeMetadata", + "description": "Metadata for time-related values." + }, + { + "name": "TemporalSetMetadata", + "value": "TemporalSetMetadata", + "description": "Metadata for set of time-related values." + }, + { + "name": "NumberMetadata", + "value": "NumberMetadata", + "description": "Metadata for numeric values." + }, + { + "name": "OrdinalMetadata", + "value": "OrdinalMetadata", + "description": "Metadata for ordinal numbers." + }, + { + "name": "SpeedMetadata", + "value": "SpeedMetadata", + "description": "Metadata for speed-related values." + }, + { + "name": "WeightMetadata", + "value": "WeightMetadata", + "description": "Metadata for weight-related values." + }, + { + "name": "LengthMetadata", + "value": "LengthMetadata", + "description": "Metadata for length-related values." + }, + { + "name": "VolumeMetadata", + "value": "VolumeMetadata", + "description": "Metadata for volume-related values." + }, + { + "name": "AreaMetadata", + "value": "AreaMetadata", + "description": "Metadata for area-related values." + }, + { + "name": "AgeMetadata", + "value": "AgeMetadata", + "description": "Metadata for age-related values." + }, + { + "name": "InformationMetadata", + "value": "InformationMetadata", + "description": "Metadata for information-related values." + }, + { + "name": "TemperatureMetadata", + "value": "TemperatureMetadata", + "description": "Metadata for temperature-related values." + }, + { + "name": "CurrencyMetadata", + "value": "CurrencyMetadata", + "description": "Metadata for currency-related values." + }, + { + "name": "NumericRangeMetadata", + "value": "NumericRangeMetadata", + "description": "Metadata for numeric range values." + }, + { + "name": "TemporalSpanMetadata", + "value": "TemporalSpanMetadata", + "description": "Metadata for temporal span values." + } + ] + } }, - "HealthcareLROResult": { + "MultiLanguageAnalysisInput": { "type": "object", + "description": "Collection of input documents to be analyzed by the service.", "properties": { - "results": { - "$ref": "#/definitions/HealthcareResult" - } - }, - "allOf": [ - { - "$ref": "#/definitions/AnalyzeTextLROResult" + "documents": { + "type": "array", + "description": "The input documents to be analyzed.", + "items": { + "$ref": "#/definitions/MultiLanguageInput" + } } - ], - "required": [ - "results" - ], - "x-ms-discriminator-value": "HealthcareLROResults" + } }, - "CustomHealthcareLROResult": { + "MultiLanguageInput": { "type": "object", + "description": "Contains an input document to be analyzed by the service.", "properties": { - "results": { - "$ref": "#/definitions/CustomHealthcareResult" + "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. (Following only applies to 2023-04-15-preview and above) For Auto Language Detection, use \\\"auto\\\". If not set, use \\\"en\\\" for English as default." } }, - "allOf": [ - { - "$ref": "#/definitions/AnalyzeTextLROResult" - } - ], "required": [ - "results" - ], - "x-ms-discriminator-value": "CustomHealthcareLROResults" + "id", + "text" + ] }, - "SentimentLROResult": { - "type": "object", - "properties": { - "results": { - "$ref": "#/definitions/SentimentResponse" - } - }, - "allOf": [ - { - "$ref": "#/definitions/AnalyzeTextLROResult" - } - ], - "required": [ - "results" + "NumberKind": { + "type": "string", + "description": "The type of the extracted number entity.", + "enum": [ + "Integer", + "Decimal", + "Power", + "Fraction", + "Percent", + "Unspecified" ], - "x-ms-discriminator-value": "SentimentAnalysisLROResults" + "x-ms-enum": { + "name": "NumberKind", + "modelAsString": true, + "values": [ + { + "name": "Integer", + "value": "Integer", + "description": "Integer number" + }, + { + "name": "Decimal", + "value": "Decimal", + "description": "Decimal number" + }, + { + "name": "Power", + "value": "Power", + "description": "Power number" + }, + { + "name": "Fraction", + "value": "Fraction", + "description": "Fraction number" + }, + { + "name": "Percent", + "value": "Percent", + "description": "Percent number" + }, + { + "name": "Unspecified", + "value": "Unspecified", + "description": "Unspecified number kind" + } + ] + } }, - "CustomSentimentAnalysisLROResult": { + "NumberMetadata": { "type": "object", + "description": "A metadata for numeric entity instances.", "properties": { - "results": { - "$ref": "#/definitions/CustomSentimentAnalysisResult" + "numberKind": { + "$ref": "#/definitions/NumberKind", + "description": "Kind of the number type." + }, + "value": { + "type": "number", + "format": "double", + "description": "A numeric representation of what the extracted text denotes." } }, - "allOf": [ - { - "$ref": "#/definitions/AnalyzeTextLROResult" - } - ], "required": [ - "results" + "numberKind", + "value" ], - "x-ms-discriminator-value": "CustomSentimentAnalysisLROResults" - }, - "KeyPhraseExtractionLROResult": { - "type": "object", - "properties": { - "results": { - "$ref": "#/definitions/KeyPhraseResult" - } - }, "allOf": [ { - "$ref": "#/definitions/AnalyzeTextLROResult" + "$ref": "#/definitions/BaseMetadata" } ], - "required": [ - "results" - ], - "x-ms-discriminator-value": "KeyPhraseExtractionLROResults" - }, - "DocumentResponse": { - "type": "object", - "properties": {} - }, - "DocumentResult": { - "type": "object", - "required": [ - "id", - "warnings" - ], - "properties": { - "id": { - "type": "string", - "description": "Unique, non-empty document identifier." - }, - "warnings": { - "type": "array", - "description": "Warnings encountered while processing document.", - "items": { - "$ref": "#/definitions/DocumentWarning" - } - }, - "statistics": { - "description": "if showStats=true was specified in the request this field will contain information about the document payload.", - "$ref": "#/definitions/DocumentStatistics" - } - } - }, - "DocumentDetectedLanguage": { - "type": "object", - "properties": { - "detectedLanguage": { - "$ref": "#/definitions/DetectedLanguage", - "description": "If 'language' is set to 'auto' for the document in the request this field will contain a 2 letter ISO 639-1 representation of the language detected for this document." - } - } + "x-ms-discriminator-value": "NumberMetadata" }, - "DocumentWarning": { + "NumericRangeMetadata": { "type": "object", - "required": [ - "code", - "message" - ], + "description": "represents the Metadata of numeric intervals.", "properties": { - "code": { - "type": "string", - "enum": [ - "LongWordsInDocument", - "DocumentTruncated" - ], - "x-ms-enum": { - "name": "WarningCodeValue", - "modelAsString": true - }, - "description": "Error code." + "rangeKind": { + "$ref": "#/definitions/RangeKind", + "description": "Kind of numeric ranges supported - like Number, Speed, etc." }, - "message": { - "type": "string", - "description": "Warning message." + "minimum": { + "type": "number", + "format": "double", + "description": "The beginning value of the interval." }, - "targetRef": { - "type": "string", - "description": "A JSON pointer reference indicating the target object." - } - } - }, - "DocumentStatistics": { - "type": "object", - "required": [ - "charactersCount", - "transactionsCount" - ], - "properties": { - "charactersCount": { - "type": "integer", - "format": "int32", - "description": "Number of text elements recognized in the document." + "maximum": { + "type": "number", + "format": "double", + "description": "The ending value of the interval." }, - "transactionsCount": { - "type": "integer", - "format": "int32", - "description": "Number of transactions for the document." + "rangeInclusivity": { + "$ref": "#/definitions/RangeInclusivity", + "description": "The inclusiveness of this range." } }, - "description": "if showStats=true was specified in the request this field will contain information about the document payload." - }, - "DocumentRequestStatistics": { - "type": "object", "required": [ - "documentsCount", - "validDocumentsCount", - "erroneousDocumentsCount" + "rangeKind", + "minimum", + "maximum" ], - "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." - } - }, "allOf": [ { - "$ref": "common.json#/definitions/RequestStatistics" + "$ref": "#/definitions/BaseMetadata" } ], - "description": "if showStats=true was specified in the request this field will contain information about the document request payload." + "x-ms-discriminator-value": "NumericRangeMetadata" }, - "MultiLanguageInput": { + "OrdinalMetadata": { "type": "object", - "description": "Contains an input document to be analyzed by the service.", - "required": [ - "id", - "text" - ], + "description": "A metadata for numeric entity instances.", "properties": { - "id": { + "offset": { "type": "string", - "description": "A unique, non-empty document identifier." + "description": "The offset with respect to the reference (e.g., offset = -1 indicates the second to last)" }, - "text": { - "type": "string", - "description": "The input text to process." + "relativeTo": { + "$ref": "#/definitions/RelativeTo", + "description": "The reference point that the ordinal number denotes." }, - "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. For Auto Language Detection, use \"auto\". If not set, use \"en\" for English as default." - } - } - }, - "LanguageInput": { - "type": "object", - "required": [ - "id", - "text" - ], - "properties": { - "id": { + "value": { "type": "string", - "description": "Unique, non-empty document identifier." - }, - "text": { - "type": "string" - }, - "countryHint": { - "type": "string" - } - } - }, - "AbstractiveSummarizationLROTask": { - "type": "object", - "description": "An object representing the task definition for an Abstractive Summarization task.", - "required": [ - "parameters" - ], - "properties": { - "parameters": { - "$ref": "#/definitions/AbstractiveSummarizationTaskParameters" + "description": "A simple arithmetic expression that the ordinal denotes." } }, - "allOf": [ - { - "$ref": "#/definitions/AnalyzeTextLROTask" - } - ], - "x-ms-discriminator-value": "AbstractiveSummarization" - }, - "CustomAbstractiveSummarizationLROTask": { - "type": "object", - "description": "An object representing the task definition for an Custom Abstractive Summarization task.", "required": [ - "parameters" + "offset", + "relativeTo", + "value" ], - "properties": { - "parameters": { - "$ref": "#/definitions/CustomAbstractiveSummarizationTaskParameters" - } - }, "allOf": [ { - "$ref": "#/definitions/AnalyzeTextLROTask" + "$ref": "#/definitions/BaseMetadata" } ], - "x-ms-discriminator-value": "CustomAbstractiveSummarization" + "x-ms-discriminator-value": "OrdinalMetadata" }, - "AbstractiveSummarizationTaskParameters": { - "type": "object", - "description": "Supported parameters for the pre-build Abstractive Summarization task.", - "properties": { - "query": { - "type": "string", - "description": "(Optional) When supplied, this option guides the summary to emphasize specific keywords or areas of interest that you specify." - } - }, - "allOf": [ - { - "$ref": "common.json#/definitions/AbstractiveSummarizationTaskParametersBase" - }, + "PiiCategoriesExclude": { + "type": "string", + "description": "(Optional) describes the PII categories to return", + "enum": [ + "ABARoutingNumber", + "ARNationalIdentityNumber", + "AUBankAccountNumber", + "AUDriversLicenseNumber", + "AUMedicalAccountNumber", + "AUPassportNumber", + "AUTaxFileNumber", + "AUBusinessNumber", + "AUCompanyNumber", + "ATIdentityCard", + "ATTaxIdentificationNumber", + "ATValueAddedTaxNumber", + "AzureDocumentDBAuthKey", + "AzureIAASDatabaseConnectionAndSQLString", + "AzureIoTConnectionString", + "AzurePublishSettingPassword", + "AzureRedisCacheString", + "AzureSAS", + "AzureServiceBusString", + "AzureStorageAccountKey", + "AzureStorageAccountGeneric", + "BENationalNumber", + "BENationalNumberV2", + "BEValueAddedTaxNumber", + "BRCPFNumber", + "BRLegalEntityNumber", + "BRNationalIDRG", + "BGUniformCivilNumber", + "CABankAccountNumber", + "CADriversLicenseNumber", + "CAHealthServiceNumber", + "CAPassportNumber", + "CAPersonalHealthIdentification", + "CASocialInsuranceNumber", + "CLIdentityCardNumber", + "CNResidentIdentityCardNumber", + "CreditCardNumber", + "HRIdentityCardNumber", + "HRNationalIDNumber", + "HRPersonalIdentificationNumber", + "HRPersonalIdentificationOIBNumberV2", + "CYIdentityCard", + "CYTaxIdentificationNumber", + "CZPersonalIdentityNumber", + "CZPersonalIdentityV2", + "DKPersonalIdentificationNumber", + "DKPersonalIdentificationV2", + "DrugEnforcementAgencyNumber", + "EEPersonalIdentificationCode", + "EUDebitCardNumber", + "EUDriversLicenseNumber", + "EUGPSCoordinates", + "EUNationalIdentificationNumber", + "EUPassportNumber", + "EUSocialSecurityNumber", + "EUTaxIdentificationNumber", + "FIEuropeanHealthNumber", + "FINationalID", + "FINationalIDV2", + "FIPassportNumber", + "FRDriversLicenseNumber", + "FRHealthInsuranceNumber", + "FRNationalID", + "FRPassportNumber", + "FRSocialSecurityNumber", + "FRTaxIdentificationNumber", + "FRValueAddedTaxNumber", + "DEDriversLicenseNumber", + "DEPassportNumber", + "DEIdentityCardNumber", + "DETaxIdentificationNumber", + "DEValueAddedNumber", + "GRNationalIDCard", + "GRNationalIDV2", + "GRTaxIdentificationNumber", + "HKIdentityCardNumber", + "HUValueAddedNumber", + "HUPersonalIdentificationNumber", + "HUTaxIdentificationNumber", + "INPermanentAccount", + "INUniqueIdentificationNumber", + "IDIdentityCardNumber", + "InternationalBankingAccountNumber", + "IEPersonalPublicServiceNumber", + "IEPersonalPublicServiceNumberV2", + "ILBankAccountNumber", + "ILNationalID", + "ITDriversLicenseNumber", + "ITFiscalCode", + "ITValueAddedTaxNumber", + "JPBankAccountNumber", + "JPDriversLicenseNumber", + "JPPassportNumber", + "JPResidentRegistrationNumber", + "JPSocialInsuranceNumber", + "JPMyNumberCorporate", + "JPMyNumberPersonal", + "JPResidenceCardNumber", + "LVPersonalCode", + "LTPersonalCode", + "LUNationalIdentificationNumberNatural", + "LUNationalIdentificationNumberNonNatural", + "MYIdentityCardNumber", + "MTIdentityCardNumber", + "MTTaxIDNumber", + "NLCitizensServiceNumber", + "NLCitizensServiceNumberV2", + "NLTaxIdentificationNumber", + "NLValueAddedTaxNumber", + "NZBankAccountNumber", + "NZDriversLicenseNumber", + "NZInlandRevenueNumber", + "NZMinistryOfHealthNumber", + "NZSocialWelfareNumber", + "NOIdentityNumber", + "PHUnifiedMultiPurposeIDNumber", + "PLIdentityCard", + "PLNationalID", + "PLNationalIDV2", + "PLPassportNumber", + "PLTaxIdentificationNumber", + "PLREGONNumber", + "PTCitizenCardNumber", + "PTCitizenCardNumberV2", + "PTTaxIdentificationNumber", + "ROPersonalNumericalCode", + "RUPassportNumberDomestic", + "RUPassportNumberInternational", + "SANationalID", + "SGNationalRegistrationIdentityCardNumber", + "SKPersonalNumber", + "SITaxIdentificationNumber", + "SIUniqueMasterCitizenNumber", + "ZAIdentificationNumber", + "KRResidentRegistrationNumber", + "ESDNI", + "ESSocialSecurityNumber", + "ESTaxIdentificationNumber", + "SQLServerConnectionString", + "SENationalID", + "SENationalIDV2", + "SEPassportNumber", + "SETaxIdentificationNumber", + "SWIFTCode", + "CHSocialSecurityNumber", + "TWNationalID", + "TWPassportNumber", + "TWResidentCertificate", + "THPopulationIdentificationCode", + "TRNationalIdentificationNumber", + "UKDriversLicenseNumber", + "UKElectoralRollNumber", + "UKNationalHealthNumber", + "UKNationalInsuranceNumber", + "UKUniqueTaxpayerNumber", + "USUKPassportNumber", + "USBankAccountNumber", + "USDriversLicenseNumber", + "USIndividualTaxpayerIdentification", + "USSocialSecurityNumber", + "UAPassportNumberDomestic", + "UAPassportNumberInternational", + "Organization", + "Email", + "URL", + "Age", + "PhoneNumber", + "IPAddress", + "Date", + "Person", + "Address" + ], + "x-ms-enum": { + "name": "PiiCategoriesExclude", + "modelAsString": true, + "values": [ + { + "name": "ABARoutingNumber", + "value": "ABARoutingNumber", + "description": "ABA Routing number" + }, + { + "name": "ARNationalIdentityNumber", + "value": "ARNationalIdentityNumber", + "description": "AR National Identity Number" + }, + { + "name": "AUBankAccountNumber", + "value": "AUBankAccountNumber", + "description": "AT Identity Card" + }, + { + "name": "AUDriversLicenseNumber", + "value": "AUDriversLicenseNumber", + "description": "AU Driver's License Number" + }, + { + "name": "AUMedicalAccountNumber", + "value": "AUMedicalAccountNumber", + "description": "AU Medical Account Number" + }, + { + "name": "AUPassportNumber", + "value": "AUPassportNumber", + "description": "AU Passport Number" + }, + { + "name": "AUTaxFileNumber", + "value": "AUTaxFileNumber", + "description": "AU Tax File Number" + }, + { + "name": "AUBusinessNumber", + "value": "AUBusinessNumber", + "description": "AU Business Number" + }, + { + "name": "AUCompanyNumber", + "value": "AUCompanyNumber", + "description": "AU Company Number" + }, + { + "name": "ATIdentityCard", + "value": "ATIdentityCard", + "description": "AT Identity Card" + }, + { + "name": "ATTaxIdentificationNumber", + "value": "ATTaxIdentificationNumber", + "description": "AT Tax Identification Number" + }, + { + "name": "ATValueAddedTaxNumber", + "value": "ATValueAddedTaxNumber", + "description": "AT Value Added Tax Number" + }, + { + "name": "AzureDocumentDBAuthKey", + "value": "AzureDocumentDBAuthKey", + "description": "Azure Document DB Auth Key" + }, + { + "name": "AzureIAASDatabaseConnectionAndSQLString", + "value": "AzureIAASDatabaseConnectionAndSQLString", + "description": "Azure IAAS Database Connection And SQL String" + }, + { + "name": "AzureIoTConnectionString", + "value": "AzureIoTConnectionString", + "description": "Azure IoT Connection String" + }, + { + "name": "AzurePublishSettingPassword", + "value": "AzurePublishSettingPassword", + "description": "Azure Publish Setting Password" + }, + { + "name": "AzureRedisCacheString", + "value": "AzureRedisCacheString", + "description": "Azure Redis Cache String" + }, + { + "name": "AzureSAS", + "value": "AzureSAS", + "description": "Azure SAS" + }, + { + "name": "AzureServiceBusString", + "value": "AzureServiceBusString", + "description": "Azure Service Bus String" + }, + { + "name": "AzureStorageAccountKey", + "value": "AzureStorageAccountKey", + "description": "Azure Storage Account Key" + }, + { + "name": "AzureStorageAccountGeneric", + "value": "AzureStorageAccountGeneric", + "description": "Azure Storage Account Generic" + }, + { + "name": "BENationalNumber", + "value": "BENationalNumber", + "description": "BE National Number" + }, + { + "name": "BENationalNumberV2", + "value": "BENationalNumberV2", + "description": "BE National Number V2" + }, + { + "name": "BEValueAddedTaxNumber", + "value": "BEValueAddedTaxNumber", + "description": "BE Value Added Tax Number" + }, + { + "name": "BRCPFNumber", + "value": "BRCPFNumber", + "description": "BR CPF Number" + }, + { + "name": "BRLegalEntityNumber", + "value": "BRLegalEntityNumber", + "description": "BR Legal Entity Number" + }, + { + "name": "BRNationalIDRG", + "value": "BRNationalIDRG", + "description": "BR National ID RG" + }, + { + "name": "BGUniformCivilNumber", + "value": "BGUniformCivilNumber", + "description": "BG Uniform Civil Number" + }, + { + "name": "CABankAccountNumber", + "value": "CABankAccountNumber", + "description": "CA Bank Account Number" + }, + { + "name": "CADriversLicenseNumber", + "value": "CADriversLicenseNumber", + "description": "CA Driver's License Number" + }, + { + "name": "CAHealthServiceNumber", + "value": "CAHealthServiceNumber", + "description": "CA Health Service Number" + }, + { + "name": "CAPassportNumber", + "value": "CAPassportNumber", + "description": "CA Passport Number" + }, + { + "name": "CAPersonalHealthIdentification", + "value": "CAPersonalHealthIdentification", + "description": "CA Personal Health Identification" + }, + { + "name": "CASocialInsuranceNumber", + "value": "CASocialInsuranceNumber", + "description": "CA Social Insurance Number" + }, + { + "name": "CLIdentityCardNumber", + "value": "CLIdentityCardNumber", + "description": "CL Identity Card Number" + }, + { + "name": "CNResidentIdentityCardNumber", + "value": "CNResidentIdentityCardNumber", + "description": "CN Resident Identity Card Number" + }, + { + "name": "CreditCardNumber", + "value": "CreditCardNumber", + "description": "Credit Card Number" + }, + { + "name": "HRIdentityCardNumber", + "value": "HRIdentityCardNumber", + "description": "HR Identity Card Number" + }, + { + "name": "HRNationalIDNumber", + "value": "HRNationalIDNumber", + "description": "HR National ID Number" + }, + { + "name": "HRPersonalIdentificationNumber", + "value": "HRPersonalIdentificationNumber", + "description": "HR Personal Identification Number" + }, + { + "name": "HRPersonalIdentificationOIBNumberV2", + "value": "HRPersonalIdentificationOIBNumberV2", + "description": "HR Personal Identification OIB Number V2" + }, + { + "name": "CYIdentityCard", + "value": "CYIdentityCard", + "description": "CY Identity Card" + }, + { + "name": "CYTaxIdentificationNumber", + "value": "CYTaxIdentificationNumber", + "description": "CY Tax Identification Number" + }, + { + "name": "CZPersonalIdentityNumber", + "value": "CZPersonalIdentityNumber", + "description": "CZ Personal Identity Number" + }, + { + "name": "CZPersonalIdentityV2", + "value": "CZPersonalIdentityV2", + "description": "CZ Personal Identity V2" + }, + { + "name": "DKPersonalIdentificationNumber", + "value": "DKPersonalIdentificationNumber", + "description": "DK Personal Identification Number" + }, + { + "name": "DKPersonalIdentificationV2", + "value": "DKPersonalIdentificationV2", + "description": "DK Personal Identification V2" + }, + { + "name": "DrugEnforcementAgencyNumber", + "value": "DrugEnforcementAgencyNumber", + "description": "Drug Enforcement Agency Number" + }, + { + "name": "EEPersonalIdentificationCode", + "value": "EEPersonalIdentificationCode", + "description": "EE Personal Identification Code" + }, + { + "name": "EUDebitCardNumber", + "value": "EUDebitCardNumber", + "description": "EU Debit Card Number" + }, + { + "name": "EUDriversLicenseNumber", + "value": "EUDriversLicenseNumber", + "description": "EU Driver's License Number" + }, + { + "name": "EUGPSCoordinates", + "value": "EUGPSCoordinates", + "description": "EU GPS Coordinates" + }, + { + "name": "EUNationalIdentificationNumber", + "value": "EUNationalIdentificationNumber", + "description": "EU National Identification Number" + }, + { + "name": "EUPassportNumber", + "value": "EUPassportNumber", + "description": "EU Passport Number" + }, + { + "name": "EUSocialSecurityNumber", + "value": "EUSocialSecurityNumber", + "description": "EU Social Security Number" + }, + { + "name": "EUTaxIdentificationNumber", + "value": "EUTaxIdentificationNumber", + "description": "EU Tax Identification Number" + }, + { + "name": "FIEuropeanHealthNumber", + "value": "FIEuropeanHealthNumber", + "description": "FI European Health Number" + }, + { + "name": "FINationalID", + "value": "FINationalID", + "description": "FI National ID" + }, + { + "name": "FINationalIDV2", + "value": "FINationalIDV2", + "description": "FI National ID V2" + }, + { + "name": "FIPassportNumber", + "value": "FIPassportNumber", + "description": "FI Passport Number" + }, + { + "name": "FRDriversLicenseNumber", + "value": "FRDriversLicenseNumber", + "description": "FR Driver's License Number" + }, + { + "name": "FRHealthInsuranceNumber", + "value": "FRHealthInsuranceNumber", + "description": "FR Health Insurance Number" + }, + { + "name": "FRNationalID", + "value": "FRNationalID", + "description": "FR National ID" + }, + { + "name": "FRPassportNumber", + "value": "FRPassportNumber", + "description": "FR Passport Number" + }, + { + "name": "FRSocialSecurityNumber", + "value": "FRSocialSecurityNumber", + "description": "FR Social Security Number" + }, + { + "name": "FRTaxIdentificationNumber", + "value": "FRTaxIdentificationNumber", + "description": "FR Tax Identification Number" + }, + { + "name": "FRValueAddedTaxNumber", + "value": "FRValueAddedTaxNumber", + "description": "FR Value Added Tax Number" + }, + { + "name": "DEDriversLicenseNumber", + "value": "DEDriversLicenseNumber", + "description": "DE Driver's License Number" + }, + { + "name": "DEPassportNumber", + "value": "DEPassportNumber", + "description": "DE Passport Number" + }, + { + "name": "DEIdentityCardNumber", + "value": "DEIdentityCardNumber", + "description": "DE Identity Card Number" + }, + { + "name": "DETaxIdentificationNumber", + "value": "DETaxIdentificationNumber", + "description": "DE Tax Identification Number" + }, + { + "name": "DEValueAddedNumber", + "value": "DEValueAddedNumber", + "description": "DE Value Added Number" + }, + { + "name": "GRNationalIDCard", + "value": "GRNationalIDCard", + "description": "GR National ID Card" + }, + { + "name": "GRNationalIDV2", + "value": "GRNationalIDV2", + "description": "GR National ID V2" + }, + { + "name": "GRTaxIdentificationNumber", + "value": "GRTaxIdentificationNumber", + "description": "GR Tax Identification Number" + }, + { + "name": "HKIdentityCardNumber", + "value": "HKIdentityCardNumber", + "description": "HK Identity Card Number" + }, + { + "name": "HUValueAddedNumber", + "value": "HUValueAddedNumber", + "description": "HU Value Added Number" + }, + { + "name": "HUPersonalIdentificationNumber", + "value": "HUPersonalIdentificationNumber", + "description": "HU Personal Identification Number" + }, + { + "name": "HUTaxIdentificationNumber", + "value": "HUTaxIdentificationNumber", + "description": "HU Tax Identification Number" + }, + { + "name": "INPermanentAccount", + "value": "INPermanentAccount", + "description": "IN Permanent Account" + }, + { + "name": "INUniqueIdentificationNumber", + "value": "INUniqueIdentificationNumber", + "description": "IN Unique Identification Number" + }, + { + "name": "IDIdentityCardNumber", + "value": "IDIdentityCardNumber", + "description": "ID Identity Card Number" + }, + { + "name": "InternationalBankingAccountNumber", + "value": "InternationalBankingAccountNumber", + "description": "International Banking Account Number" + }, + { + "name": "IEPersonalPublicServiceNumber", + "value": "IEPersonalPublicServiceNumber", + "description": "IE Personal Public Service Number" + }, + { + "name": "IEPersonalPublicServiceNumberV2", + "value": "IEPersonalPublicServiceNumberV2", + "description": "IE Personal Public Service Number V2" + }, + { + "name": "ILBankAccountNumber", + "value": "ILBankAccountNumber", + "description": "IL Bank Account Number" + }, + { + "name": "ILNationalID", + "value": "ILNationalID", + "description": "IL National ID" + }, + { + "name": "ITDriversLicenseNumber", + "value": "ITDriversLicenseNumber", + "description": "IT Driver's License Number" + }, + { + "name": "ITFiscalCode", + "value": "ITFiscalCode", + "description": "IT Fiscal Code" + }, + { + "name": "ITValueAddedTaxNumber", + "value": "ITValueAddedTaxNumber", + "description": "IT Value Added Tax Number" + }, + { + "name": "JPBankAccountNumber", + "value": "JPBankAccountNumber", + "description": "JP Bank Account Number" + }, + { + "name": "JPDriversLicenseNumber", + "value": "JPDriversLicenseNumber", + "description": "JP Driver's License Number" + }, + { + "name": "JPPassportNumber", + "value": "JPPassportNumber", + "description": "JP Passport Number" + }, + { + "name": "JPResidentRegistrationNumber", + "value": "JPResidentRegistrationNumber", + "description": "JP Resident Registration Number" + }, + { + "name": "JPSocialInsuranceNumber", + "value": "JPSocialInsuranceNumber", + "description": "JP Social Insurance Number" + }, + { + "name": "JPMyNumberCorporate", + "value": "JPMyNumberCorporate", + "description": "JP My Number Corporate" + }, + { + "name": "JPMyNumberPersonal", + "value": "JPMyNumberPersonal", + "description": "JP My Number Personal" + }, + { + "name": "JPResidenceCardNumber", + "value": "JPResidenceCardNumber", + "description": "JP Residence Card Number" + }, + { + "name": "LVPersonalCode", + "value": "LVPersonalCode", + "description": "LV Personal Code" + }, + { + "name": "LTPersonalCode", + "value": "LTPersonalCode", + "description": "LT Personal Code" + }, + { + "name": "LUNationalIdentificationNumberNatural", + "value": "LUNationalIdentificationNumberNatural", + "description": "LU National Identification Number Natural" + }, + { + "name": "LUNationalIdentificationNumberNonNatural", + "value": "LUNationalIdentificationNumberNonNatural", + "description": "LU National Identification Number Non Natural" + }, + { + "name": "MYIdentityCardNumber", + "value": "MYIdentityCardNumber", + "description": "MY Identity Card Number" + }, + { + "name": "MTIdentityCardNumber", + "value": "MTIdentityCardNumber", + "description": "MT Identity Card Number" + }, + { + "name": "MTTaxIDNumber", + "value": "MTTaxIDNumber", + "description": "MT Tax ID Number" + }, + { + "name": "NLCitizensServiceNumber", + "value": "NLCitizensServiceNumber", + "description": "NL Citizens Service Number" + }, + { + "name": "NLCitizensServiceNumberV2", + "value": "NLCitizensServiceNumberV2", + "description": "NL Citizens Service Number V2" + }, + { + "name": "NLTaxIdentificationNumber", + "value": "NLTaxIdentificationNumber", + "description": "NL Tax Identification Number" + }, + { + "name": "NLValueAddedTaxNumber", + "value": "NLValueAddedTaxNumber", + "description": "NL Value Added Tax Number" + }, + { + "name": "NZBankAccountNumber", + "value": "NZBankAccountNumber", + "description": "NZ Bank Account Number" + }, + { + "name": "NZDriversLicenseNumber", + "value": "NZDriversLicenseNumber", + "description": "NZ Driver's License Number" + }, + { + "name": "NZInlandRevenueNumber", + "value": "NZInlandRevenueNumber", + "description": "NZ Inland Revenue Number" + }, + { + "name": "NZMinistryOfHealthNumber", + "value": "NZMinistryOfHealthNumber", + "description": "NZ Ministry Of Health Number" + }, + { + "name": "NZSocialWelfareNumber", + "value": "NZSocialWelfareNumber", + "description": "NZ Social Welfare Number" + }, + { + "name": "NOIdentityNumber", + "value": "NOIdentityNumber", + "description": "NO Identity Number" + }, + { + "name": "PHUnifiedMultiPurposeIDNumber", + "value": "PHUnifiedMultiPurposeIDNumber", + "description": "PH Unified Multi Purpose ID Number" + }, + { + "name": "PLIdentityCard", + "value": "PLIdentityCard", + "description": "PL Identity Card" + }, + { + "name": "PLNationalID", + "value": "PLNationalID", + "description": "PL National ID" + }, + { + "name": "PLNationalIDV2", + "value": "PLNationalIDV2", + "description": "PL National ID V2" + }, + { + "name": "PLPassportNumber", + "value": "PLPassportNumber", + "description": "PL Passport Number" + }, + { + "name": "PLTaxIdentificationNumber", + "value": "PLTaxIdentificationNumber", + "description": "PL Tax Identification Number" + }, + { + "name": "PLREGONNumber", + "value": "PLREGONNumber", + "description": "PL REGON Number" + }, + { + "name": "PTCitizenCardNumber", + "value": "PTCitizenCardNumber", + "description": "PT Citizen Card Number" + }, + { + "name": "PTCitizenCardNumberV2", + "value": "PTCitizenCardNumberV2", + "description": "PT Citizen Card Number V2" + }, + { + "name": "PTTaxIdentificationNumber", + "value": "PTTaxIdentificationNumber", + "description": "PT Tax Identification Number" + }, + { + "name": "ROPersonalNumericalCode", + "value": "ROPersonalNumericalCode", + "description": "RO Personal Numerical Code" + }, + { + "name": "RUPassportNumberDomestic", + "value": "RUPassportNumberDomestic", + "description": "RU Passport Number Domestic" + }, + { + "name": "RUPassportNumberInternational", + "value": "RUPassportNumberInternational", + "description": "RU Passport Number International" + }, + { + "name": "SANationalID", + "value": "SANationalID", + "description": "SA National ID" + }, + { + "name": "SGNationalRegistrationIdentityCardNumber", + "value": "SGNationalRegistrationIdentityCardNumber", + "description": "SG National Registration Identity Card Number" + }, + { + "name": "SKPersonalNumber", + "value": "SKPersonalNumber", + "description": "SK Personal Number" + }, + { + "name": "SITaxIdentificationNumber", + "value": "SITaxIdentificationNumber", + "description": "SI Tax Identification Number" + }, + { + "name": "SIUniqueMasterCitizenNumber", + "value": "SIUniqueMasterCitizenNumber", + "description": "SI Unique Master Citizen Number" + }, + { + "name": "ZAIdentificationNumber", + "value": "ZAIdentificationNumber", + "description": "ZA Identification Number" + }, + { + "name": "KRResidentRegistrationNumber", + "value": "KRResidentRegistrationNumber", + "description": "KR Resident Registration Number" + }, + { + "name": "ESDNI", + "value": "ESDNI", + "description": "ES DNI" + }, + { + "name": "ESSocialSecurityNumber", + "value": "ESSocialSecurityNumber", + "description": "ES Social Security Number" + }, + { + "name": "ESTaxIdentificationNumber", + "value": "ESTaxIdentificationNumber", + "description": "ES Tax Identification Number" + }, + { + "name": "SQLServerConnectionString", + "value": "SQLServerConnectionString", + "description": "SQL Server Connection String" + }, + { + "name": "SENationalID", + "value": "SENationalID", + "description": "SE National ID" + }, + { + "name": "SENationalIDV2", + "value": "SENationalIDV2", + "description": "SE National ID V2" + }, + { + "name": "SEPassportNumber", + "value": "SEPassportNumber", + "description": "SE Passport Number" + }, + { + "name": "SETaxIdentificationNumber", + "value": "SETaxIdentificationNumber", + "description": "SE Tax Identification Number" + }, + { + "name": "SWIFTCode", + "value": "SWIFTCode", + "description": "SWIFT Code" + }, + { + "name": "CHSocialSecurityNumber", + "value": "CHSocialSecurityNumber", + "description": "CH Social Security Number" + }, + { + "name": "TWNationalID", + "value": "TWNationalID", + "description": "TW National ID" + }, + { + "name": "TWPassportNumber", + "value": "TWPassportNumber", + "description": "TW Passport Number" + }, + { + "name": "TWResidentCertificate", + "value": "TWResidentCertificate", + "description": "TW Resident Certificate" + }, + { + "name": "THPopulationIdentificationCode", + "value": "THPopulationIdentificationCode", + "description": "TH Population Identification Code" + }, + { + "name": "TRNationalIdentificationNumber", + "value": "TRNationalIdentificationNumber", + "description": "TR National Identification Number" + }, + { + "name": "UKDriversLicenseNumber", + "value": "UKDriversLicenseNumber", + "description": "UK Driver's License Number" + }, + { + "name": "UKElectoralRollNumber", + "value": "UKElectoralRollNumber", + "description": "UK Electoral Roll Number" + }, + { + "name": "UKNationalHealthNumber", + "value": "UKNationalHealthNumber", + "description": "UK National Health Number" + }, + { + "name": "UKNationalInsuranceNumber", + "value": "UKNationalInsuranceNumber", + "description": "UK National Insurance Number" + }, + { + "name": "UKUniqueTaxpayerNumber", + "value": "UKUniqueTaxpayerNumber", + "description": "UK Unique Taxpayer Number" + }, + { + "name": "USUKPassportNumber", + "value": "USUKPassportNumber", + "description": "US UK Passport Number" + }, + { + "name": "USBankAccountNumber", + "value": "USBankAccountNumber", + "description": "US Bank Account Number" + }, + { + "name": "USDriversLicenseNumber", + "value": "USDriversLicenseNumber", + "description": "US Driver's License Number" + }, + { + "name": "USIndividualTaxpayerIdentification", + "value": "USIndividualTaxpayerIdentification", + "description": "US Individual Taxpayer Identification" + }, + { + "name": "USSocialSecurityNumber", + "value": "USSocialSecurityNumber", + "description": "US Social Security Number" + }, + { + "name": "UAPassportNumberDomestic", + "value": "UAPassportNumberDomestic", + "description": "UA Passport Number Domestic" + }, + { + "name": "UAPassportNumberInternational", + "value": "UAPassportNumberInternational", + "description": "UA Passport Number International" + }, + { + "name": "Organization", + "value": "Organization", + "description": "Organization" + }, + { + "name": "Email", + "value": "Email", + "description": "Email" + }, + { + "name": "URL", + "value": "URL", + "description": "URL" + }, + { + "name": "Age", + "value": "Age", + "description": "Age" + }, + { + "name": "PhoneNumber", + "value": "PhoneNumber", + "description": "Phone Number" + }, + { + "name": "IPAddress", + "value": "IPAddress", + "description": "IP Address" + }, + { + "name": "Date", + "value": "Date", + "description": "Date" + }, + { + "name": "Person", + "value": "Person", + "description": "Person" + }, + { + "name": "Address", + "value": "Address", + "description": "Address" + } + ] + } + }, + "PiiCategory": { + "type": "string", + "description": "(Optional) describes the PII categories to return", + "enum": [ + "ABARoutingNumber", + "ARNationalIdentityNumber", + "AUBankAccountNumber", + "AUDriversLicenseNumber", + "AUMedicalAccountNumber", + "AUPassportNumber", + "AUTaxFileNumber", + "AUBusinessNumber", + "AUCompanyNumber", + "ATIdentityCard", + "ATTaxIdentificationNumber", + "ATValueAddedTaxNumber", + "AzureDocumentDBAuthKey", + "AzureIAASDatabaseConnectionAndSQLString", + "AzureIoTConnectionString", + "AzurePublishSettingPassword", + "AzureRedisCacheString", + "AzureSAS", + "AzureServiceBusString", + "AzureStorageAccountKey", + "AzureStorageAccountGeneric", + "BENationalNumber", + "BENationalNumberV2", + "BEValueAddedTaxNumber", + "BRCPFNumber", + "BRLegalEntityNumber", + "BRNationalIDRG", + "BGUniformCivilNumber", + "CABankAccountNumber", + "CADriversLicenseNumber", + "CAHealthServiceNumber", + "CAPassportNumber", + "CAPersonalHealthIdentification", + "CASocialInsuranceNumber", + "CLIdentityCardNumber", + "CNResidentIdentityCardNumber", + "CreditCardNumber", + "HRIdentityCardNumber", + "HRNationalIDNumber", + "HRPersonalIdentificationNumber", + "HRPersonalIdentificationOIBNumberV2", + "CYIdentityCard", + "CYTaxIdentificationNumber", + "CZPersonalIdentityNumber", + "CZPersonalIdentityV2", + "DKPersonalIdentificationNumber", + "DKPersonalIdentificationV2", + "DrugEnforcementAgencyNumber", + "EEPersonalIdentificationCode", + "EUDebitCardNumber", + "EUDriversLicenseNumber", + "EUGPSCoordinates", + "EUNationalIdentificationNumber", + "EUPassportNumber", + "EUSocialSecurityNumber", + "EUTaxIdentificationNumber", + "FIEuropeanHealthNumber", + "FINationalID", + "FINationalIDV2", + "FIPassportNumber", + "FRDriversLicenseNumber", + "FRHealthInsuranceNumber", + "FRNationalID", + "FRPassportNumber", + "FRSocialSecurityNumber", + "FRTaxIdentificationNumber", + "FRValueAddedTaxNumber", + "DEDriversLicenseNumber", + "DEPassportNumber", + "DEIdentityCardNumber", + "DETaxIdentificationNumber", + "DEValueAddedNumber", + "GRNationalIDCard", + "GRNationalIDV2", + "GRTaxIdentificationNumber", + "HKIdentityCardNumber", + "HUValueAddedNumber", + "HUPersonalIdentificationNumber", + "HUTaxIdentificationNumber", + "INPermanentAccount", + "INUniqueIdentificationNumber", + "IDIdentityCardNumber", + "InternationalBankingAccountNumber", + "IEPersonalPublicServiceNumber", + "IEPersonalPublicServiceNumberV2", + "ILBankAccountNumber", + "ILNationalID", + "ITDriversLicenseNumber", + "ITFiscalCode", + "ITValueAddedTaxNumber", + "JPBankAccountNumber", + "JPDriversLicenseNumber", + "JPPassportNumber", + "JPResidentRegistrationNumber", + "JPSocialInsuranceNumber", + "JPMyNumberCorporate", + "JPMyNumberPersonal", + "JPResidenceCardNumber", + "LVPersonalCode", + "LTPersonalCode", + "LUNationalIdentificationNumberNatural", + "LUNationalIdentificationNumberNonNatural", + "MYIdentityCardNumber", + "MTIdentityCardNumber", + "MTTaxIDNumber", + "NLCitizensServiceNumber", + "NLCitizensServiceNumberV2", + "NLTaxIdentificationNumber", + "NLValueAddedTaxNumber", + "NZBankAccountNumber", + "NZDriversLicenseNumber", + "NZInlandRevenueNumber", + "NZMinistryOfHealthNumber", + "NZSocialWelfareNumber", + "NOIdentityNumber", + "PHUnifiedMultiPurposeIDNumber", + "PLIdentityCard", + "PLNationalID", + "PLNationalIDV2", + "PLPassportNumber", + "PLTaxIdentificationNumber", + "PLREGONNumber", + "PTCitizenCardNumber", + "PTCitizenCardNumberV2", + "PTTaxIdentificationNumber", + "ROPersonalNumericalCode", + "RUPassportNumberDomestic", + "RUPassportNumberInternational", + "SANationalID", + "SGNationalRegistrationIdentityCardNumber", + "SKPersonalNumber", + "SITaxIdentificationNumber", + "SIUniqueMasterCitizenNumber", + "ZAIdentificationNumber", + "KRResidentRegistrationNumber", + "ESDNI", + "ESSocialSecurityNumber", + "ESTaxIdentificationNumber", + "SQLServerConnectionString", + "SENationalID", + "SENationalIDV2", + "SEPassportNumber", + "SETaxIdentificationNumber", + "SWIFTCode", + "CHSocialSecurityNumber", + "TWNationalID", + "TWPassportNumber", + "TWResidentCertificate", + "THPopulationIdentificationCode", + "TRNationalIdentificationNumber", + "UKDriversLicenseNumber", + "UKElectoralRollNumber", + "UKNationalHealthNumber", + "UKNationalInsuranceNumber", + "UKUniqueTaxpayerNumber", + "USUKPassportNumber", + "USBankAccountNumber", + "USDriversLicenseNumber", + "USIndividualTaxpayerIdentification", + "USSocialSecurityNumber", + "UAPassportNumberDomestic", + "UAPassportNumberInternational", + "Organization", + "Email", + "URL", + "Age", + "PhoneNumber", + "IPAddress", + "Date", + "Person", + "Address", + "All", + "Default" + ], + "x-ms-enum": { + "name": "PiiCategory", + "modelAsString": true, + "values": [ + { + "name": "ABARoutingNumber", + "value": "ABARoutingNumber", + "description": "ABA Routing number" + }, + { + "name": "ARNationalIdentityNumber", + "value": "ARNationalIdentityNumber", + "description": "AR National Identity Number" + }, + { + "name": "AUBankAccountNumber", + "value": "AUBankAccountNumber", + "description": "AT Identity Card" + }, + { + "name": "AUDriversLicenseNumber", + "value": "AUDriversLicenseNumber", + "description": "AU Driver's License Number" + }, + { + "name": "AUMedicalAccountNumber", + "value": "AUMedicalAccountNumber", + "description": "AU Medical Account Number" + }, + { + "name": "AUPassportNumber", + "value": "AUPassportNumber", + "description": "AU Passport Number" + }, + { + "name": "AUTaxFileNumber", + "value": "AUTaxFileNumber", + "description": "AU Tax File Number" + }, + { + "name": "AUBusinessNumber", + "value": "AUBusinessNumber", + "description": "AU Business Number" + }, + { + "name": "AUCompanyNumber", + "value": "AUCompanyNumber", + "description": "AU Company Number" + }, + { + "name": "ATIdentityCard", + "value": "ATIdentityCard", + "description": "AT Identity Card" + }, + { + "name": "ATTaxIdentificationNumber", + "value": "ATTaxIdentificationNumber", + "description": "AT Tax Identification Number" + }, + { + "name": "ATValueAddedTaxNumber", + "value": "ATValueAddedTaxNumber", + "description": "AT Value Added Tax Number" + }, + { + "name": "AzureDocumentDBAuthKey", + "value": "AzureDocumentDBAuthKey", + "description": "Azure Document DB Auth Key" + }, + { + "name": "AzureIAASDatabaseConnectionAndSQLString", + "value": "AzureIAASDatabaseConnectionAndSQLString", + "description": "Azure IAAS Database Connection And SQL String" + }, + { + "name": "AzureIoTConnectionString", + "value": "AzureIoTConnectionString", + "description": "Azure IoT Connection String" + }, + { + "name": "AzurePublishSettingPassword", + "value": "AzurePublishSettingPassword", + "description": "Azure Publish Setting Password" + }, + { + "name": "AzureRedisCacheString", + "value": "AzureRedisCacheString", + "description": "Azure Redis Cache String" + }, + { + "name": "AzureSAS", + "value": "AzureSAS", + "description": "Azure SAS" + }, + { + "name": "AzureServiceBusString", + "value": "AzureServiceBusString", + "description": "Azure Service Bus String" + }, + { + "name": "AzureStorageAccountKey", + "value": "AzureStorageAccountKey", + "description": "Azure Storage Account Key" + }, + { + "name": "AzureStorageAccountGeneric", + "value": "AzureStorageAccountGeneric", + "description": "Azure Storage Account Generic" + }, + { + "name": "BENationalNumber", + "value": "BENationalNumber", + "description": "BE National Number" + }, + { + "name": "BENationalNumberV2", + "value": "BENationalNumberV2", + "description": "BE National Number V2" + }, + { + "name": "BEValueAddedTaxNumber", + "value": "BEValueAddedTaxNumber", + "description": "BE Value Added Tax Number" + }, + { + "name": "BRCPFNumber", + "value": "BRCPFNumber", + "description": "BR CPF Number" + }, + { + "name": "BRLegalEntityNumber", + "value": "BRLegalEntityNumber", + "description": "BR Legal Entity Number" + }, + { + "name": "BRNationalIDRG", + "value": "BRNationalIDRG", + "description": "BR National ID RG" + }, + { + "name": "BGUniformCivilNumber", + "value": "BGUniformCivilNumber", + "description": "BG Uniform Civil Number" + }, + { + "name": "CABankAccountNumber", + "value": "CABankAccountNumber", + "description": "CA Bank Account Number" + }, + { + "name": "CADriversLicenseNumber", + "value": "CADriversLicenseNumber", + "description": "CA Driver's License Number" + }, + { + "name": "CAHealthServiceNumber", + "value": "CAHealthServiceNumber", + "description": "CA Health Service Number" + }, + { + "name": "CAPassportNumber", + "value": "CAPassportNumber", + "description": "CA Passport Number" + }, + { + "name": "CAPersonalHealthIdentification", + "value": "CAPersonalHealthIdentification", + "description": "CA Personal Health Identification" + }, + { + "name": "CASocialInsuranceNumber", + "value": "CASocialInsuranceNumber", + "description": "CA Social Insurance Number" + }, + { + "name": "CLIdentityCardNumber", + "value": "CLIdentityCardNumber", + "description": "CL Identity Card Number" + }, + { + "name": "CNResidentIdentityCardNumber", + "value": "CNResidentIdentityCardNumber", + "description": "CN Resident Identity Card Number" + }, + { + "name": "CreditCardNumber", + "value": "CreditCardNumber", + "description": "Credit Card Number" + }, + { + "name": "HRIdentityCardNumber", + "value": "HRIdentityCardNumber", + "description": "HR Identity Card Number" + }, + { + "name": "HRNationalIDNumber", + "value": "HRNationalIDNumber", + "description": "HR National ID Number" + }, + { + "name": "HRPersonalIdentificationNumber", + "value": "HRPersonalIdentificationNumber", + "description": "HR Personal Identification Number" + }, + { + "name": "HRPersonalIdentificationOIBNumberV2", + "value": "HRPersonalIdentificationOIBNumberV2", + "description": "HR Personal Identification OIB Number V2" + }, + { + "name": "CYIdentityCard", + "value": "CYIdentityCard", + "description": "CY Identity Card" + }, + { + "name": "CYTaxIdentificationNumber", + "value": "CYTaxIdentificationNumber", + "description": "CY Tax Identification Number" + }, + { + "name": "CZPersonalIdentityNumber", + "value": "CZPersonalIdentityNumber", + "description": "CZ Personal Identity Number" + }, + { + "name": "CZPersonalIdentityV2", + "value": "CZPersonalIdentityV2", + "description": "CZ Personal Identity V2" + }, + { + "name": "DKPersonalIdentificationNumber", + "value": "DKPersonalIdentificationNumber", + "description": "DK Personal Identification Number" + }, + { + "name": "DKPersonalIdentificationV2", + "value": "DKPersonalIdentificationV2", + "description": "DK Personal Identification V2" + }, + { + "name": "DrugEnforcementAgencyNumber", + "value": "DrugEnforcementAgencyNumber", + "description": "Drug Enforcement Agency Number" + }, + { + "name": "EEPersonalIdentificationCode", + "value": "EEPersonalIdentificationCode", + "description": "EE Personal Identification Code" + }, + { + "name": "EUDebitCardNumber", + "value": "EUDebitCardNumber", + "description": "EU Debit Card Number" + }, + { + "name": "EUDriversLicenseNumber", + "value": "EUDriversLicenseNumber", + "description": "EU Driver's License Number" + }, + { + "name": "EUGPSCoordinates", + "value": "EUGPSCoordinates", + "description": "EU GPS Coordinates" + }, + { + "name": "EUNationalIdentificationNumber", + "value": "EUNationalIdentificationNumber", + "description": "EU National Identification Number" + }, + { + "name": "EUPassportNumber", + "value": "EUPassportNumber", + "description": "EU Passport Number" + }, + { + "name": "EUSocialSecurityNumber", + "value": "EUSocialSecurityNumber", + "description": "EU Social Security Number" + }, + { + "name": "EUTaxIdentificationNumber", + "value": "EUTaxIdentificationNumber", + "description": "EU Tax Identification Number" + }, + { + "name": "FIEuropeanHealthNumber", + "value": "FIEuropeanHealthNumber", + "description": "FI European Health Number" + }, + { + "name": "FINationalID", + "value": "FINationalID", + "description": "FI National ID" + }, + { + "name": "FINationalIDV2", + "value": "FINationalIDV2", + "description": "FI National ID V2" + }, + { + "name": "FIPassportNumber", + "value": "FIPassportNumber", + "description": "FI Passport Number" + }, + { + "name": "FRDriversLicenseNumber", + "value": "FRDriversLicenseNumber", + "description": "FR Driver's License Number" + }, + { + "name": "FRHealthInsuranceNumber", + "value": "FRHealthInsuranceNumber", + "description": "FR Health Insurance Number" + }, + { + "name": "FRNationalID", + "value": "FRNationalID", + "description": "FR National ID" + }, + { + "name": "FRPassportNumber", + "value": "FRPassportNumber", + "description": "FR Passport Number" + }, + { + "name": "FRSocialSecurityNumber", + "value": "FRSocialSecurityNumber", + "description": "FR Social Security Number" + }, + { + "name": "FRTaxIdentificationNumber", + "value": "FRTaxIdentificationNumber", + "description": "FR Tax Identification Number" + }, + { + "name": "FRValueAddedTaxNumber", + "value": "FRValueAddedTaxNumber", + "description": "FR Value Added Tax Number" + }, + { + "name": "DEDriversLicenseNumber", + "value": "DEDriversLicenseNumber", + "description": "DE Driver's License Number" + }, + { + "name": "DEPassportNumber", + "value": "DEPassportNumber", + "description": "DE Passport Number" + }, + { + "name": "DEIdentityCardNumber", + "value": "DEIdentityCardNumber", + "description": "DE Identity Card Number" + }, + { + "name": "DETaxIdentificationNumber", + "value": "DETaxIdentificationNumber", + "description": "DE Tax Identification Number" + }, + { + "name": "DEValueAddedNumber", + "value": "DEValueAddedNumber", + "description": "DE Value Added Number" + }, + { + "name": "GRNationalIDCard", + "value": "GRNationalIDCard", + "description": "GR National ID Card" + }, + { + "name": "GRNationalIDV2", + "value": "GRNationalIDV2", + "description": "GR National ID V2" + }, + { + "name": "GRTaxIdentificationNumber", + "value": "GRTaxIdentificationNumber", + "description": "GR Tax Identification Number" + }, + { + "name": "HKIdentityCardNumber", + "value": "HKIdentityCardNumber", + "description": "HK Identity Card Number" + }, + { + "name": "HUValueAddedNumber", + "value": "HUValueAddedNumber", + "description": "HU Value Added Number" + }, + { + "name": "HUPersonalIdentificationNumber", + "value": "HUPersonalIdentificationNumber", + "description": "HU Personal Identification Number" + }, + { + "name": "HUTaxIdentificationNumber", + "value": "HUTaxIdentificationNumber", + "description": "HU Tax Identification Number" + }, + { + "name": "INPermanentAccount", + "value": "INPermanentAccount", + "description": "IN Permanent Account" + }, + { + "name": "INUniqueIdentificationNumber", + "value": "INUniqueIdentificationNumber", + "description": "IN Unique Identification Number" + }, + { + "name": "IDIdentityCardNumber", + "value": "IDIdentityCardNumber", + "description": "ID Identity Card Number" + }, + { + "name": "InternationalBankingAccountNumber", + "value": "InternationalBankingAccountNumber", + "description": "International Banking Account Number" + }, + { + "name": "IEPersonalPublicServiceNumber", + "value": "IEPersonalPublicServiceNumber", + "description": "IE Personal Public Service Number" + }, + { + "name": "IEPersonalPublicServiceNumberV2", + "value": "IEPersonalPublicServiceNumberV2", + "description": "IE Personal Public Service Number V2" + }, + { + "name": "ILBankAccountNumber", + "value": "ILBankAccountNumber", + "description": "IL Bank Account Number" + }, + { + "name": "ILNationalID", + "value": "ILNationalID", + "description": "IL National ID" + }, + { + "name": "ITDriversLicenseNumber", + "value": "ITDriversLicenseNumber", + "description": "IT Driver's License Number" + }, + { + "name": "ITFiscalCode", + "value": "ITFiscalCode", + "description": "IT Fiscal Code" + }, + { + "name": "ITValueAddedTaxNumber", + "value": "ITValueAddedTaxNumber", + "description": "IT Value Added Tax Number" + }, + { + "name": "JPBankAccountNumber", + "value": "JPBankAccountNumber", + "description": "JP Bank Account Number" + }, + { + "name": "JPDriversLicenseNumber", + "value": "JPDriversLicenseNumber", + "description": "JP Driver's License Number" + }, + { + "name": "JPPassportNumber", + "value": "JPPassportNumber", + "description": "JP Passport Number" + }, + { + "name": "JPResidentRegistrationNumber", + "value": "JPResidentRegistrationNumber", + "description": "JP Resident Registration Number" + }, + { + "name": "JPSocialInsuranceNumber", + "value": "JPSocialInsuranceNumber", + "description": "JP Social Insurance Number" + }, + { + "name": "JPMyNumberCorporate", + "value": "JPMyNumberCorporate", + "description": "JP My Number Corporate" + }, + { + "name": "JPMyNumberPersonal", + "value": "JPMyNumberPersonal", + "description": "JP My Number Personal" + }, + { + "name": "JPResidenceCardNumber", + "value": "JPResidenceCardNumber", + "description": "JP Residence Card Number" + }, + { + "name": "LVPersonalCode", + "value": "LVPersonalCode", + "description": "LV Personal Code" + }, + { + "name": "LTPersonalCode", + "value": "LTPersonalCode", + "description": "LT Personal Code" + }, + { + "name": "LUNationalIdentificationNumberNatural", + "value": "LUNationalIdentificationNumberNatural", + "description": "LU National Identification Number Natural" + }, + { + "name": "LUNationalIdentificationNumberNonNatural", + "value": "LUNationalIdentificationNumberNonNatural", + "description": "LU National Identification Number Non Natural" + }, + { + "name": "MYIdentityCardNumber", + "value": "MYIdentityCardNumber", + "description": "MY Identity Card Number" + }, + { + "name": "MTIdentityCardNumber", + "value": "MTIdentityCardNumber", + "description": "MT Identity Card Number" + }, + { + "name": "MTTaxIDNumber", + "value": "MTTaxIDNumber", + "description": "MT Tax ID Number" + }, + { + "name": "NLCitizensServiceNumber", + "value": "NLCitizensServiceNumber", + "description": "NL Citizens Service Number" + }, + { + "name": "NLCitizensServiceNumberV2", + "value": "NLCitizensServiceNumberV2", + "description": "NL Citizens Service Number V2" + }, + { + "name": "NLTaxIdentificationNumber", + "value": "NLTaxIdentificationNumber", + "description": "NL Tax Identification Number" + }, + { + "name": "NLValueAddedTaxNumber", + "value": "NLValueAddedTaxNumber", + "description": "NL Value Added Tax Number" + }, + { + "name": "NZBankAccountNumber", + "value": "NZBankAccountNumber", + "description": "NZ Bank Account Number" + }, + { + "name": "NZDriversLicenseNumber", + "value": "NZDriversLicenseNumber", + "description": "NZ Driver's License Number" + }, + { + "name": "NZInlandRevenueNumber", + "value": "NZInlandRevenueNumber", + "description": "NZ Inland Revenue Number" + }, + { + "name": "NZMinistryOfHealthNumber", + "value": "NZMinistryOfHealthNumber", + "description": "NZ Ministry Of Health Number" + }, + { + "name": "NZSocialWelfareNumber", + "value": "NZSocialWelfareNumber", + "description": "NZ Social Welfare Number" + }, + { + "name": "NOIdentityNumber", + "value": "NOIdentityNumber", + "description": "NO Identity Number" + }, + { + "name": "PHUnifiedMultiPurposeIDNumber", + "value": "PHUnifiedMultiPurposeIDNumber", + "description": "PH Unified Multi Purpose ID Number" + }, + { + "name": "PLIdentityCard", + "value": "PLIdentityCard", + "description": "PL Identity Card" + }, + { + "name": "PLNationalID", + "value": "PLNationalID", + "description": "PL National ID" + }, + { + "name": "PLNationalIDV2", + "value": "PLNationalIDV2", + "description": "PL National ID V2" + }, + { + "name": "PLPassportNumber", + "value": "PLPassportNumber", + "description": "PL Passport Number" + }, + { + "name": "PLTaxIdentificationNumber", + "value": "PLTaxIdentificationNumber", + "description": "PL Tax Identification Number" + }, + { + "name": "PLREGONNumber", + "value": "PLREGONNumber", + "description": "PL REGON Number" + }, + { + "name": "PTCitizenCardNumber", + "value": "PTCitizenCardNumber", + "description": "PT Citizen Card Number" + }, + { + "name": "PTCitizenCardNumberV2", + "value": "PTCitizenCardNumberV2", + "description": "PT Citizen Card Number V2" + }, + { + "name": "PTTaxIdentificationNumber", + "value": "PTTaxIdentificationNumber", + "description": "PT Tax Identification Number" + }, + { + "name": "ROPersonalNumericalCode", + "value": "ROPersonalNumericalCode", + "description": "RO Personal Numerical Code" + }, + { + "name": "RUPassportNumberDomestic", + "value": "RUPassportNumberDomestic", + "description": "RU Passport Number Domestic" + }, + { + "name": "RUPassportNumberInternational", + "value": "RUPassportNumberInternational", + "description": "RU Passport Number International" + }, + { + "name": "SANationalID", + "value": "SANationalID", + "description": "SA National ID" + }, + { + "name": "SGNationalRegistrationIdentityCardNumber", + "value": "SGNationalRegistrationIdentityCardNumber", + "description": "SG National Registration Identity Card Number" + }, + { + "name": "SKPersonalNumber", + "value": "SKPersonalNumber", + "description": "SK Personal Number" + }, + { + "name": "SITaxIdentificationNumber", + "value": "SITaxIdentificationNumber", + "description": "SI Tax Identification Number" + }, + { + "name": "SIUniqueMasterCitizenNumber", + "value": "SIUniqueMasterCitizenNumber", + "description": "SI Unique Master Citizen Number" + }, + { + "name": "ZAIdentificationNumber", + "value": "ZAIdentificationNumber", + "description": "ZA Identification Number" + }, + { + "name": "KRResidentRegistrationNumber", + "value": "KRResidentRegistrationNumber", + "description": "KR Resident Registration Number" + }, + { + "name": "ESDNI", + "value": "ESDNI", + "description": "ES DNI" + }, + { + "name": "ESSocialSecurityNumber", + "value": "ESSocialSecurityNumber", + "description": "ES Social Security Number" + }, + { + "name": "ESTaxIdentificationNumber", + "value": "ESTaxIdentificationNumber", + "description": "ES Tax Identification Number" + }, + { + "name": "SQLServerConnectionString", + "value": "SQLServerConnectionString", + "description": "SQL Server Connection String" + }, + { + "name": "SENationalID", + "value": "SENationalID", + "description": "SE National ID" + }, + { + "name": "SENationalIDV2", + "value": "SENationalIDV2", + "description": "SE National ID V2" + }, + { + "name": "SEPassportNumber", + "value": "SEPassportNumber", + "description": "SE Passport Number" + }, + { + "name": "SETaxIdentificationNumber", + "value": "SETaxIdentificationNumber", + "description": "SE Tax Identification Number" + }, + { + "name": "SWIFTCode", + "value": "SWIFTCode", + "description": "SWIFT Code" + }, + { + "name": "CHSocialSecurityNumber", + "value": "CHSocialSecurityNumber", + "description": "CH Social Security Number" + }, + { + "name": "TWNationalID", + "value": "TWNationalID", + "description": "TW National ID" + }, + { + "name": "TWPassportNumber", + "value": "TWPassportNumber", + "description": "TW Passport Number" + }, + { + "name": "TWResidentCertificate", + "value": "TWResidentCertificate", + "description": "TW Resident Certificate" + }, + { + "name": "THPopulationIdentificationCode", + "value": "THPopulationIdentificationCode", + "description": "TH Population Identification Code" + }, + { + "name": "TRNationalIdentificationNumber", + "value": "TRNationalIdentificationNumber", + "description": "TR National Identification Number" + }, + { + "name": "UKDriversLicenseNumber", + "value": "UKDriversLicenseNumber", + "description": "UK Driver's License Number" + }, + { + "name": "UKElectoralRollNumber", + "value": "UKElectoralRollNumber", + "description": "UK Electoral Roll Number" + }, + { + "name": "UKNationalHealthNumber", + "value": "UKNationalHealthNumber", + "description": "UK National Health Number" + }, + { + "name": "UKNationalInsuranceNumber", + "value": "UKNationalInsuranceNumber", + "description": "UK National Insurance Number" + }, + { + "name": "UKUniqueTaxpayerNumber", + "value": "UKUniqueTaxpayerNumber", + "description": "UK Unique Taxpayer Number" + }, + { + "name": "USUKPassportNumber", + "value": "USUKPassportNumber", + "description": "US UK Passport Number" + }, + { + "name": "USBankAccountNumber", + "value": "USBankAccountNumber", + "description": "US Bank Account Number" + }, + { + "name": "USDriversLicenseNumber", + "value": "USDriversLicenseNumber", + "description": "US Driver's License Number" + }, + { + "name": "USIndividualTaxpayerIdentification", + "value": "USIndividualTaxpayerIdentification", + "description": "US Individual Taxpayer Identification" + }, + { + "name": "USSocialSecurityNumber", + "value": "USSocialSecurityNumber", + "description": "US Social Security Number" + }, + { + "name": "UAPassportNumberDomestic", + "value": "UAPassportNumberDomestic", + "description": "UA Passport Number Domestic" + }, + { + "name": "UAPassportNumberInternational", + "value": "UAPassportNumberInternational", + "description": "UA Passport Number International" + }, + { + "name": "Organization", + "value": "Organization", + "description": "Organization" + }, + { + "name": "Email", + "value": "Email", + "description": "Email" + }, + { + "name": "URL", + "value": "URL", + "description": "URL" + }, + { + "name": "Age", + "value": "Age", + "description": "Age" + }, + { + "name": "PhoneNumber", + "value": "PhoneNumber", + "description": "Phone Number" + }, + { + "name": "IPAddress", + "value": "IPAddress", + "description": "IP Address" + }, + { + "name": "Date", + "value": "Date", + "description": "Date" + }, + { + "name": "Person", + "value": "Person", + "description": "Person" + }, + { + "name": "Address", + "value": "Address", + "description": "Address" + }, + { + "name": "All", + "value": "All", + "description": "All PII categories." + }, + { + "name": "Default", + "value": "Default", + "description": "Default PII categories for the language." + } + ] + } + }, + "PiiEntityRecognitionLROResult": { + "type": "object", + "description": "Contains the PII LRO results.", + "properties": { + "results": { + "$ref": "#/definitions/PiiResult", + "description": "The list of pii results" + } + }, + "required": [ + "results" + ], + "allOf": [ + { + "$ref": "#/definitions/AnalyzeTextLROResult" + } + ], + "x-ms-discriminator-value": "PiiEntityRecognitionLROResults" + }, + "PiiLROTask": { + "type": "object", + "description": "Contains the analyze text PIIEntityRecognition LRO task.", + "properties": { + "parameters": { + "$ref": "#/definitions/PiiTaskParameters", + "description": "Pii task parameters." + } + }, + "allOf": [ + { + "$ref": "#/definitions/AnalyzeTextLROTask" + } + ], + "x-ms-discriminator-value": "PiiEntityRecognition" + }, + "PiiResult": { + "type": "object", + "description": "Contains the PiiResult.", + "properties": { + "errors": { + "type": "array", + "description": "Errors by document id.", + "items": { + "$ref": "#/definitions/DocumentError" + } + }, + "statistics": { + "$ref": "#/definitions/RequestStatistics", + "description": "if showStats=true was specified in the request this field will contain information about the request payload." + }, + "modelVersion": { + "type": "string", + "description": "This field indicates which model is used for scoring." + }, + "documents": { + "type": "array", + "description": "Response by document", + "items": { + "$ref": "#/definitions/PiiResultWithDetectedLanguage" + } + } + }, + "required": [ + "errors", + "modelVersion", + "documents" + ] + }, + "PiiResultWithDetectedLanguage": { + "type": "object", + "description": "Contains the PII results with detected language.", + "properties": { + "id": { + "type": "string", + "description": "Unique, non-empty document identifier." + }, + "warnings": { + "type": "array", + "description": "Warnings encountered while processing document.", + "items": { + "$ref": "#/definitions/DocumentWarning" + }, + "x-ms-identifiers": [] + }, + "statistics": { + "$ref": "#/definitions/DocumentStatistics", + "description": "if showStats=true was specified in the request this field will contain information about the document payload." + }, + "redactedText": { + "type": "string", + "description": "Returns redacted text." + }, + "entities": { + "type": "array", + "description": "Recognized entities in the document.", + "items": { + "$ref": "#/definitions/Entity" + }, + "x-ms-identifiers": [] + }, + "detectedLanguage": { + "$ref": "#/definitions/DetectedLanguage", + "description": "If 'language' is set to 'auto' for the document in the request this field will contain a 2 letter ISO 639-1 representation of the language detected for this document." + } + }, + "required": [ + "id", + "warnings", + "redactedText", + "entities" + ] + }, + "PiiTaskParameters": { + "type": "object", + "description": "Supported parameters for a PII Entities Recognition task.", + "properties": { + "loggingOptOut": { + "type": "boolean", + "description": "logging opt out", + "default": false + }, + "modelVersion": { + "type": "string", + "description": "model version", + "default": "latest" + }, + "domain": { + "type": "string", + "description": "Domain for PII task", + "default": "none", + "enum": [ + "phi", + "none" + ], + "x-ms-enum": { + "name": "PiiDomain", + "modelAsString": true, + "values": [ + { + "name": "phi", + "value": "phi", + "description": "Indicates that entities in the Personal Health Information domain should be redacted." + }, + { + "name": "none", + "value": "none", + "description": "Indicates that no domain is specified." + } + ] + } + }, + "piiCategories": { + "type": "array", + "description": "Enumeration of PII categories to be returned in the response.", + "items": { + "$ref": "#/definitions/PiiCategory" + } + }, + "stringIndexType": { + "type": "string", + "description": "StringIndexType to be used for analysis.", + "default": "TextElements_v8", + "enum": [ + "TextElements_v8", + "UnicodeCodePoint", + "Utf16CodeUnit" + ], + "x-ms-enum": { + "name": "StringIndexType", + "modelAsString": true, + "values": [ + { + "name": "TextElements_v8", + "value": "TextElements_v8", + "description": "Returned offset and length values will correspond to TextElements (Graphemes and Grapheme clusters) confirming to the Unicode 8.0.0 standard. Use this option if your application is written in .Net Framework or .Net Core and you will be using StringInfo." + }, + { + "name": "UnicodeCodePoint", + "value": "UnicodeCodePoint", + "description": "Returned offset and length values will correspond to Unicode code points. Use this option if your application is written in a language that support Unicode, for example Python." + }, + { + "name": "Utf16CodeUnit", + "value": "Utf16CodeUnit", + "description": "Returned offset and length values will correspond to UTF-16 code units. Use this option if your application is written in a language that support Unicode, for example Java, JavaScript." + } + ] + } + }, + "excludePiiCategories": { + "type": "array", + "description": "Enumeration of PII categories to be excluded in the response.", + "items": { + "$ref": "#/definitions/PiiCategoriesExclude" + } + }, + "redactionCharacter": { + "type": "string", + "description": "Character to be used for redaction. Default in '*'.", + "default": "*", + "enum": [ + "!", + "#", + "$", + "%", + "&", + "*", + "+", + "-", + "=", + "?", + "@", + "^", + "_", + "~" + ], + "x-ms-enum": { + "name": "redactionCharacter", + "modelAsString": true, + "values": [ + { + "name": "exclamationPoint", + "value": "!", + "description": "Exclamation point character" + }, + { + "name": "numberSign", + "value": "#", + "description": "Number sign character" + }, + { + "name": "dollar", + "value": "$", + "description": "Dollar sign character" + }, + { + "name": "perCent", + "value": "%", + "description": "Percent sign character" + }, + { + "name": "ampersand", + "value": "&", + "description": "Ampersand character" + }, + { + "name": "asterisk", + "value": "*", + "description": "Asterisk character" + }, + { + "name": "plus", + "value": "+", + "description": "Plus sign character" + }, + { + "name": "minus", + "value": "-", + "description": "Minus sign character" + }, + { + "name": "equals", + "value": "=", + "description": "Equals sign character" + }, + { + "name": "questionMark", + "value": "?", + "description": "Question mark character" + }, + { + "name": "atSign", + "value": "@", + "description": "At sign character" + }, + { + "name": "caret", + "value": "^", + "description": "Caret character" + }, + { + "name": "underscore", + "value": "_", + "description": "Underscore character" + }, + { + "name": "tilde", + "value": "~", + "description": "Tilde character" + } + ] + } + } + } + }, + "PiiTaskResult": { + "type": "object", + "description": "Contains the analyze text PIIEntityRecognition LRO task.", + "properties": { + "results": { + "$ref": "#/definitions/PiiResult", + "description": "The list of pii results" + } + }, + "required": [ + "results" + ], + "allOf": [ + { + "$ref": "#/definitions/AnalyzeTextTaskResult" + } + ], + "x-ms-discriminator-value": "PiiEntityRecognitionResults" + }, + "PrebuiltComponent": { + "type": "object", + "description": "This object contains information of the prebuilt component of the detected entity.", + "properties": { + "value": { + "type": "string", + "description": "The prebuilt component of an extracted entity type." + } + }, + "allOf": [ + { + "$ref": "#/definitions/EntityComponentInformation" + } + ], + "x-ms-discriminator-value": "PrebuiltComponent" + }, + "RangeInclusivity": { + "type": "string", + "description": "The range inclusiveness of this property property.", + "enum": [ + "NoneInclusive", + "LeftInclusive", + "RightInclusive", + "LeftRightInclusive" + ], + "x-ms-enum": { + "name": "RangeInclusivity", + "modelAsString": true, + "values": [ + { + "name": "NoneInclusive", + "value": "NoneInclusive", + "description": "No inclusivity" + }, + { + "name": "LeftInclusive", + "value": "LeftInclusive", + "description": "Left side inclusive" + }, + { + "name": "RightInclusive", + "value": "RightInclusive", + "description": "Right side inclusive" + }, + { + "name": "LeftRightInclusive", + "value": "LeftRightInclusive", + "description": "Both sides inclusive" + } + ] + } + }, + "RangeKind": { + "type": "string", + "description": "The kind of the number range entity.", + "enum": [ + "Number", + "Speed", + "Weight", + "Length", + "Volume", + "Area", + "Age", + "Information", + "Temperature", + "Currency" + ], + "x-ms-enum": { + "name": "RangeKind", + "modelAsString": true, + "values": [ + { + "name": "Number", + "value": "Number", + "description": "Number range" + }, + { + "name": "Speed", + "value": "Speed", + "description": "Speed range" + }, + { + "name": "Weight", + "value": "Weight", + "description": "Weight range" + }, + { + "name": "Length", + "value": "Length", + "description": "Length range" + }, + { + "name": "Volume", + "value": "Volume", + "description": "Volume range" + }, + { + "name": "Area", + "value": "Area", + "description": "Area range" + }, + { + "name": "Age", + "value": "Age", + "description": "Age range" + }, + { + "name": "Information", + "value": "Information", + "description": "Information range" + }, + { + "name": "Temperature", + "value": "Temperature", + "description": "Temperature range" + }, + { + "name": "Currency", + "value": "Currency", + "description": "Currency range" + } + ] + } + }, + "RelativeTo": { + "type": "string", + "description": "The reference point that the ordinal number denotes.", + "enum": [ + "Current", + "End", + "Start" + ], + "x-ms-enum": { + "name": "RelativeTo", + "modelAsString": true, + "values": [ + { + "name": "Current", + "value": "Current", + "description": "Current state or position" + }, + { + "name": "End", + "value": "End", + "description": "End state or position" + }, + { + "name": "Start", + "value": "Start", + "description": "Start state or position" + } + ] + } + }, + "RequestStatistics": { + "type": "object", + "description": "if showStats=true was specified in the request this field will contain information about the request payload.", + "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." + } + }, + "required": [ + "documentsCount", + "validDocumentsCount", + "erroneousDocumentsCount", + "transactionsCount" + ] + }, + "ScriptCode": { + "type": "string", + "description": "Identifies the script of the input document. Maps to the ISO 15924 standard script code.", + "enum": [ + "Arab", + "Armn", + "Beng", + "Cans", + "Cyrl", + "Deva", + "Ethi", + "Geor", + "Grek", + "Gujr", + "Guru", + "Hang", + "Hans", + "Hant", + "Hebr", + "Jpan", + "Khmr", + "Knda", + "Laoo", + "Latn", + "Mlym", + "Mymr", + "Orya", + "Sinh", + "Taml", + "Telu", + "Thaa", + "Thai", + "Tibt" + ], + "x-ms-enum": { + "name": "ScriptCode", + "modelAsString": true, + "values": [ + { + "name": "Arab", + "value": "Arab", + "description": "Script code for the Arabic script." + }, + { + "name": "Armn", + "value": "Armn", + "description": "Script code for the Armenian script." + }, + { + "name": "Beng", + "value": "Beng", + "description": "Script code for the Bangla script." + }, + { + "name": "Cans", + "value": "Cans", + "description": "Script code for the UnifiedCanadianAboriginalSyllabics script." + }, + { + "name": "Cyrl", + "value": "Cyrl", + "description": "Script code for the Cyrillic script." + }, + { + "name": "Deva", + "value": "Deva", + "description": "Script code for the Devanagari script." + }, + { + "name": "Ethi", + "value": "Ethi", + "description": "Script code for the Ethiopic script." + }, + { + "name": "Geor", + "value": "Geor", + "description": "Script code for the Georgian script." + }, + { + "name": "Grek", + "value": "Grek", + "description": "Script code for the Greek script." + }, + { + "name": "Gujr", + "value": "Gujr", + "description": "Script code for the Gujarati script." + }, + { + "name": "Guru", + "value": "Guru", + "description": "Script code for the Gurmukhi script." + }, + { + "name": "Hang", + "value": "Hang", + "description": "Script code for the Hangul script." + }, + { + "name": "Hans", + "value": "Hans", + "description": "Script code for the HanSimplified script." + }, + { + "name": "Hant", + "value": "Hant", + "description": "Script code for the HanTraditional script." + }, + { + "name": "Hebr", + "value": "Hebr", + "description": "Script code for the Hebrew script." + }, + { + "name": "Jpan", + "value": "Jpan", + "description": "Script code for the Japanese script." + }, + { + "name": "Khmr", + "value": "Khmr", + "description": "Script code for the Khmer script." + }, + { + "name": "Knda", + "value": "Knda", + "description": "Script code for the Kannada script." + }, + { + "name": "Laoo", + "value": "Laoo", + "description": "Script code for the Lao script." + }, + { + "name": "Latn", + "value": "Latn", + "description": "Script code for the Latin script." + }, + { + "name": "Mlym", + "value": "Mlym", + "description": "Script code for the Malayalam script." + }, + { + "name": "Mymr", + "value": "Mymr", + "description": "Script code for the Myanmar script." + }, + { + "name": "Orya", + "value": "Orya", + "description": "Script code for the Odia script." + }, + { + "name": "Sinh", + "value": "Sinh", + "description": "Script code for the Sinhala script." + }, + { + "name": "Taml", + "value": "Taml", + "description": "Script code for the Tamil script." + }, + { + "name": "Telu", + "value": "Telu", + "description": "Script code for the Telugu script." + }, + { + "name": "Thaa", + "value": "Thaa", + "description": "Script code for the Thaana script." + }, + { + "name": "Thai", + "value": "Thai", + "description": "Script code for the Thai script." + }, + { + "name": "Tibt", + "value": "Tibt", + "description": "Script code for the Tibetan script." + } + ] + } + }, + "ScriptKind": { + "type": "string", + "description": "Identifies the script of the input document. Maps to the ISO 15924 standard formal name.", + "enum": [ + "Arabic", + "Armenian", + "Bangla", + "UnifiedCanadianAboriginalSyllabics", + "Cyrillic", + "Devanagari", + "Ethiopic", + "Georgian", + "Greek", + "Gujarati", + "Gurmukhi", + "Hangul", + "HanSimplified", + "HanTraditional", + "Hebrew", + "Japanese", + "Khmer", + "Kannada", + "Lao", + "Latin", + "Malayalam", + "Myanmar", + "Odia", + "Sinhala", + "Tamil", + "Telugu", + "Thaana", + "Thai", + "Tibetan" + ], + "x-ms-enum": { + "name": "ScriptKind", + "modelAsString": true, + "values": [ + { + "name": "Arabic", + "value": "Arabic", + "description": "Script name for the Arabic script." + }, + { + "name": "Armenian", + "value": "Armenian", + "description": "Script name for the Armenian script." + }, + { + "name": "Bangla", + "value": "Bangla", + "description": "Script name for the Bangla script." + }, + { + "name": "UnifiedCanadianAboriginalSyllabics", + "value": "UnifiedCanadianAboriginalSyllabics", + "description": "Script name for the UnifiedCanadianAboriginalSyllabics script." + }, + { + "name": "Cyrillic", + "value": "Cyrillic", + "description": "Script name for the Cyrillic script." + }, + { + "name": "Devanagari", + "value": "Devanagari", + "description": "Script name for the Devanagari script." + }, + { + "name": "Ethiopic", + "value": "Ethiopic", + "description": "Script name for the Ethiopic script." + }, + { + "name": "Georgian", + "value": "Georgian", + "description": "Script name for the Georgian script." + }, + { + "name": "Greek", + "value": "Greek", + "description": "Script name for the Greek script." + }, + { + "name": "Gujarati", + "value": "Gujarati", + "description": "Script name for the Gujarati script." + }, + { + "name": "Gurmukhi", + "value": "Gurmukhi", + "description": "Script name for the Gurmukhi script." + }, + { + "name": "Hangul", + "value": "Hangul", + "description": "Script name for the Hangul script." + }, + { + "name": "HanSimplified", + "value": "HanSimplified", + "description": "Script name for the HanSimplified script." + }, + { + "name": "HanTraditional", + "value": "HanTraditional", + "description": "Script name for the HanTraditional script." + }, + { + "name": "Hebrew", + "value": "Hebrew", + "description": "Script name for the Hebrew script." + }, + { + "name": "Japanese", + "value": "Japanese", + "description": "Script name for the Japanese script." + }, + { + "name": "Khmer", + "value": "Khmer", + "description": "Script name for the Khmer script." + }, + { + "name": "Kannada", + "value": "Kannada", + "description": "Script name for the Kannada script." + }, + { + "name": "Lao", + "value": "Lao", + "description": "Script name for the Lao script." + }, + { + "name": "Latin", + "value": "Latin", + "description": "Script name for the Latin script." + }, + { + "name": "Malayalam", + "value": "Malayalam", + "description": "Script name for the Malayalam script." + }, + { + "name": "Myanmar", + "value": "Myanmar", + "description": "Script name for the Myanmar script." + }, + { + "name": "Odia", + "value": "Odia", + "description": "Script name for the Odia script." + }, + { + "name": "Sinhala", + "value": "Sinhala", + "description": "Script name for the Sinhala script." + }, + { + "name": "Tamil", + "value": "Tamil", + "description": "Script name for the Tamil script." + }, + { + "name": "Telugu", + "value": "Telugu", + "description": "Script name for the Telugu script." + }, + { + "name": "Thaana", + "value": "Thaana", + "description": "Script name for the Thaana script." + }, + { + "name": "Thai", + "value": "Thai", + "description": "Script name for the Thai script." + }, + { + "name": "Tibetan", + "value": "Tibetan", + "description": "Script name for the Tibetan script." + } + ] + } + }, + "SentenceAssessment": { + "type": "object", + "description": "Represents a sentence assessment and the assessments or target objects related to it.", + "properties": { + "sentiment": { + "$ref": "#/definitions/TokenSentimentValue", + "description": "The sentiment of the sentence." + }, + "confidenceScores": { + "$ref": "#/definitions/TargetConfidenceScoreLabel", + "description": "Represents the confidence scores across all sentiment classes: positive and negative." + }, + "offset": { + "type": "integer", + "format": "int32", + "description": "The target offset from the start of the sentence." + }, + "length": { + "type": "integer", + "format": "int32", + "description": "The length of the target." + }, + "text": { + "type": "string", + "description": "The target text detected." + }, + "isNegated": { + "type": "boolean", + "description": "The indicator representing if the assessment is negated." + } + }, + "required": [ + "sentiment", + "confidenceScores", + "offset", + "length", + "text", + "isNegated" + ] + }, + "SentenceSentiment": { + "type": "object", + "description": "A document's sentence sentiment.", + "properties": { + "text": { + "type": "string", + "description": "The sentence text." + }, + "sentiment": { + "$ref": "#/definitions/SentenceSentimentValue", + "description": "The predicted Sentiment for the sentence." + }, + "confidenceScores": { + "$ref": "#/definitions/SentimentConfidenceScores", + "description": "The sentiment confidence score between 0 and 1 for the sentence for all classes." + }, + "offset": { + "type": "integer", + "format": "int32", + "description": "The target offset from the start of the sentence." + }, + "length": { + "type": "integer", + "format": "int32", + "description": "The length of the target." + }, + "targets": { + "type": "array", + "description": "The array of sentence targets for the sentence.", + "items": { + "$ref": "#/definitions/SentenceTarget" + }, + "x-ms-identifiers": [] + }, + "assessments": { + "type": "array", + "description": "The array of assessments for the sentence.", + "items": { + "$ref": "#/definitions/SentenceAssessment" + }, + "x-ms-identifiers": [] + } + }, + "required": [ + "text", + "sentiment", + "confidenceScores", + "offset", + "length" + ] + }, + "SentenceSentimentValue": { + "type": "string", + "description": "The predicted Sentiment for the sentence.", + "enum": [ + "positive", + "neutral", + "negative" + ], + "x-ms-enum": { + "name": "SentenceSentimentValue", + "modelAsString": false, + "values": [ + { + "name": "positive", + "value": "positive", + "description": "Positive sentiment" + }, + { + "name": "neutral", + "value": "neutral", + "description": "Neutral sentiment" + }, + { + "name": "negative", + "value": "negative", + "description": "Negative sentiment" + } + ] + } + }, + "SentenceTarget": { + "type": "object", + "description": "Represents a sentence target and the assessments or target objects related to it.", + "properties": { + "sentiment": { + "$ref": "#/definitions/TokenSentimentValue", + "description": "The sentiment of the sentence." + }, + "confidenceScores": { + "$ref": "#/definitions/TargetConfidenceScoreLabel", + "description": "Represents the confidence scores across all sentiment classes: positive and negative." + }, + "offset": { + "type": "integer", + "format": "int32", + "description": "The target offset from the start of the sentence." + }, + "length": { + "type": "integer", + "format": "int32", + "description": "The length of the target." + }, + "text": { + "type": "string", + "description": "The target text detected." + }, + "relations": { + "type": "array", + "description": "The array of either assessment or target objects which is related to the target.", + "items": { + "$ref": "#/definitions/TargetRelation" + }, + "x-ms-identifiers": [] + } + }, + "required": [ + "sentiment", + "confidenceScores", + "offset", + "length", + "text", + "relations" + ] + }, + "SentimentAnalysisLROTask": { + "type": "object", + "description": "An object representing the task definition for a Sentiment Analysis task.", + "properties": { + "parameters": { + "$ref": "#/definitions/SentimentAnalysisTaskParameters", + "description": "Parameters for the Sentiment Analysis task." + } + }, + "allOf": [ + { + "$ref": "#/definitions/AnalyzeTextLROTask" + } + ], + "x-ms-discriminator-value": "SentimentAnalysis" + }, + "SentimentAnalysisTaskParameters": { + "type": "object", + "description": "Supported parameters for a Sentiment Analysis task.", + "properties": { + "loggingOptOut": { + "type": "boolean", + "description": "logging opt out", + "default": false + }, + "modelVersion": { + "type": "string", + "description": "model version", + "default": "latest" + }, + "opinionMining": { + "type": "boolean", + "description": "Whether to use opinion mining in the request or not.", + "default": false + }, + "stringIndexType": { + "type": "string", + "description": "Specifies the method used to interpret string offsets.", + "default": "TextElements_v8", + "enum": [ + "TextElements_v8", + "UnicodeCodePoint", + "Utf16CodeUnit" + ], + "x-ms-enum": { + "name": "StringIndexType", + "modelAsString": true, + "values": [ + { + "name": "TextElements_v8", + "value": "TextElements_v8", + "description": "Returned offset and length values will correspond to TextElements (Graphemes and Grapheme clusters) confirming to the Unicode 8.0.0 standard. Use this option if your application is written in .Net Framework or .Net Core and you will be using StringInfo." + }, + { + "name": "UnicodeCodePoint", + "value": "UnicodeCodePoint", + "description": "Returned offset and length values will correspond to Unicode code points. Use this option if your application is written in a language that support Unicode, for example Python." + }, + { + "name": "Utf16CodeUnit", + "value": "Utf16CodeUnit", + "description": "Returned offset and length values will correspond to UTF-16 code units. Use this option if your application is written in a language that support Unicode, for example Java, JavaScript." + } + ] + } + } + } + }, + "SentimentConfidenceScores": { + "type": "object", + "description": "Represents the confidence scores between 0 and 1 across all sentiment classes: positive, neutral, negative.", + "properties": { + "positive": { + "type": "number", + "format": "double", + "description": "Confidence score for positive sentiment" + }, + "neutral": { + "type": "number", + "format": "double", + "description": "Confidence score for neutral sentiment" + }, + "negative": { + "type": "number", + "format": "double", + "description": "Confidence score for negative sentiment" + } + }, + "required": [ + "positive", + "neutral", + "negative" + ] + }, + "SentimentDocumentResultWithDetectedLanguage": { + "type": "object", + "description": "Sentiment analysis per document.", + "properties": { + "id": { + "type": "string", + "description": "Unique, non-empty document identifier." + }, + "warnings": { + "type": "array", + "description": "Warnings encountered while processing document.", + "items": { + "$ref": "#/definitions/DocumentWarning" + }, + "x-ms-identifiers": [] + }, + "statistics": { + "$ref": "#/definitions/DocumentStatistics", + "description": "if showStats=true was specified in the request this field will contain information about the document payload." + }, + "sentiment": { + "$ref": "#/definitions/DocumentSentimentValue", + "description": "Predicted sentiment for document (Negative, Neutral, Positive, or Mixed)." + }, + "confidenceScores": { + "$ref": "#/definitions/SentimentConfidenceScores", + "description": "The sentiment confidence score between 0 and 1 for the sentence for all classes." + }, + "sentences": { + "type": "array", + "description": "The document's sentences sentiment.", + "items": { + "$ref": "#/definitions/SentenceSentiment" + }, + "x-ms-identifiers": [] + }, + "detectedLanguage": { + "$ref": "#/definitions/DetectedLanguage", + "description": "If 'language' is set to 'auto' for the document in the request this field will contain a 2 letter ISO 639-1 representation of the language detected for this document." + } + }, + "required": [ + "id", + "warnings", + "sentiment", + "confidenceScores", + "sentences" + ] + }, + "SentimentLROResult": { + "type": "object", + "description": "Contains the Sentiment Analysis LRO results.", + "properties": { + "results": { + "$ref": "#/definitions/SentimentResponse", + "description": "The sentiment analysis results" + } + }, + "required": [ + "results" + ], + "allOf": [ + { + "$ref": "#/definitions/AnalyzeTextLROResult" + } + ], + "x-ms-discriminator-value": "SentimentAnalysisLROResults" + }, + "SentimentResponse": { + "type": "object", + "description": "Sentiment analysis results for the input documents.", + "properties": { + "errors": { + "type": "array", + "description": "Errors by document id.", + "items": { + "$ref": "#/definitions/DocumentError" + } + }, + "statistics": { + "$ref": "#/definitions/RequestStatistics", + "description": "if showStats=true was specified in the request this field will contain information about the request payload." + }, + "modelVersion": { + "type": "string", + "description": "This field indicates which model is used for scoring." + }, + "documents": { + "type": "array", + "description": "The sentiment analysis results for each document in the input.", + "items": { + "$ref": "#/definitions/SentimentDocumentResultWithDetectedLanguage" + } + } + }, + "required": [ + "errors", + "modelVersion", + "documents" + ] + }, + "SentimentTaskResult": { + "type": "object", + "description": "Contains the analyze text SentimentAnalysis LRO task result.", + "properties": { + "results": { + "$ref": "#/definitions/SentimentResponse", + "description": "The sentiment analysis results" + } + }, + "required": [ + "results" + ], + "allOf": [ + { + "$ref": "#/definitions/AnalyzeTextTaskResult" + } + ], + "x-ms-discriminator-value": "SentimentAnalysisResults" + }, + "SpeedMetadata": { + "type": "object", + "description": "Represents the Speed entity Metadata model.", + "properties": { + "value": { + "type": "number", + "format": "double", + "description": "The numeric value that the extracted text denotes." + }, + "unit": { + "$ref": "#/definitions/SpeedUnit", + "description": "Unit of measure for speed." + } + }, + "required": [ + "value", + "unit" + ], + "allOf": [ { - "$ref": "common.json#/definitions/PreBuiltTaskParameters" + "$ref": "#/definitions/BaseMetadata" + } + ], + "x-ms-discriminator-value": "SpeedMetadata" + }, + "SpeedUnit": { + "type": "string", + "description": "The speed Unit of measurement", + "enum": [ + "Unspecified", + "MetersPerSecond", + "KilometersPerHour", + "KilometersPerMinute", + "KilometersPerSecond", + "MilesPerHour", + "Knots", + "FeetPerSecond", + "FeetPerMinute", + "YardsPerMinute", + "YardsPerSecond", + "MetersPerMillisecond", + "CentimetersPerMillisecond", + "KilometersPerMillisecond" + ], + "x-ms-enum": { + "name": "SpeedUnit", + "modelAsString": true, + "values": [ + { + "name": "Unspecified", + "value": "Unspecified", + "description": "Unspecified speed unit." + }, + { + "name": "MetersPerSecond", + "value": "MetersPerSecond", + "description": "Speed unit in meters per second." + }, + { + "name": "KilometersPerHour", + "value": "KilometersPerHour", + "description": "Speed unit in kilometers per hour." + }, + { + "name": "KilometersPerMinute", + "value": "KilometersPerMinute", + "description": "Speed unit in kilometers per minute." + }, + { + "name": "KilometersPerSecond", + "value": "KilometersPerSecond", + "description": "Speed unit in kilometers per second." + }, + { + "name": "MilesPerHour", + "value": "MilesPerHour", + "description": "Speed unit in miles per hour." + }, + { + "name": "Knots", + "value": "Knots", + "description": "Speed unit in knots." + }, + { + "name": "FeetPerSecond", + "value": "FeetPerSecond", + "description": "Speed unit in feet per second." + }, + { + "name": "FeetPerMinute", + "value": "FeetPerMinute", + "description": "Speed unit in feet per minute." + }, + { + "name": "YardsPerMinute", + "value": "YardsPerMinute", + "description": "Speed unit in yards per minute." + }, + { + "name": "YardsPerSecond", + "value": "YardsPerSecond", + "description": "Speed unit in yards per second." + }, + { + "name": "MetersPerMillisecond", + "value": "MetersPerMillisecond", + "description": "Speed unit in meters per millisecond." + }, + { + "name": "CentimetersPerMillisecond", + "value": "CentimetersPerMillisecond", + "description": "Speed unit in centimeters per millisecond." + }, + { + "name": "KilometersPerMillisecond", + "value": "KilometersPerMillisecond", + "description": "Speed unit in Kilometers per millisecond." + } + ] + } + }, + "State": { + "type": "string", + "description": "The status of the task at the mentioned last update time.", + "enum": [ + "notStarted", + "running", + "succeeded", + "partiallyCompleted", + "failed", + "cancelled", + "cancelling" + ], + "x-ms-enum": { + "name": "State", + "modelAsString": true, + "values": [ + { + "name": "notStarted", + "value": "notStarted", + "description": "Not started status" + }, + { + "name": "running", + "value": "running", + "description": "Running status" + }, + { + "name": "succeeded", + "value": "succeeded", + "description": "Succeeded status" + }, + { + "name": "partiallyCompleted", + "value": "partiallyCompleted", + "description": "Partially completed status" + }, + { + "name": "failed", + "value": "failed", + "description": "Failed status" + }, + { + "name": "cancelled", + "value": "cancelled", + "description": "Cancelled status" + }, + { + "name": "cancelling", + "value": "cancelling", + "description": "Cancelling status" + } + ] + } + }, + "SummaryContext": { + "type": "object", + "description": "The context of the summary.", + "properties": { + "offset": { + "type": "integer", + "format": "int32", + "description": "Start position for the context. Use of different 'stringIndexType' values can affect the offset returned." + }, + "length": { + "type": "integer", + "format": "int32", + "description": "The length of the context. Use of different 'stringIndexType' values can affect the length returned." + } + }, + "required": [ + "offset", + "length" + ] + }, + "SummaryLengthBucket": { + "type": "string", + "description": "Enum that defines the length of the output summaries.", + "enum": [ + "short", + "medium", + "long" + ], + "x-ms-enum": { + "name": "SummaryLengthBucket", + "modelAsString": true, + "values": [ + { + "name": "short", + "value": "short", + "description": "Instructs model to generate shorter length summaries." + }, + { + "name": "medium", + "value": "medium", + "description": "Instructs model to generate medium length summaries." + }, + { + "name": "long", + "value": "long", + "description": "Instructs model to generate longer length summaries." + } + ] + } + }, + "TargetConfidenceScoreLabel": { + "type": "object", + "description": "Represents the confidence scores across all sentiment classes: positive and negative.", + "properties": { + "positive": { + "type": "number", + "format": "double", + "description": "Confidence score for positive sentiment" + }, + "negative": { + "type": "number", + "format": "double", + "description": "Confidence score for negative sentiment" + } + }, + "required": [ + "positive", + "negative" + ] + }, + "TargetRelation": { + "type": "object", + "description": "Represents the relation between assessments and/or targets.", + "properties": { + "ref": { + "type": "string", + "description": "The JSON pointer indicating the linked object." + }, + "relationType": { + "$ref": "#/definitions/TargetRelationType", + "description": "The type related to the target." } + }, + "required": [ + "ref", + "relationType" ] }, - "CustomAbstractiveSummarizationTaskParameters": { + "TargetRelationType": { + "type": "string", + "description": "The type related to the target.", + "enum": [ + "assessment", + "target" + ], + "x-ms-enum": { + "name": "TargetRelationType", + "modelAsString": false, + "values": [ + { + "name": "assessment", + "value": "assessment" + }, + { + "name": "target", + "value": "target" + } + ] + } + }, + "Tasks": { "type": "object", - "description": "Supported parameters for the Custom Abstractive Summarization task.", + "description": "Container for the tasks status for the LRO job.", + "properties": { + "completed": { + "type": "integer", + "format": "int32", + "description": "Count of completed tasks." + }, + "failed": { + "type": "integer", + "format": "int32", + "description": "Count of failed tasks." + }, + "inProgress": { + "type": "integer", + "format": "int32", + "description": "Count of inprogress tasks." + }, + "total": { + "type": "integer", + "format": "int32", + "description": "Count of total tasks." + }, + "items": { + "type": "array", + "description": "Enumerable of Analyze text job results.", + "items": { + "$ref": "#/definitions/AnalyzeTextLROResult" + }, + "x-ms-identifiers": [] + } + }, + "required": [ + "completed", + "failed", + "inProgress", + "total" + ] + }, + "TemperatureMetadata": { + "type": "object", + "description": "Represents the Information entity Metadata model.", + "properties": { + "value": { + "type": "number", + "format": "double", + "description": "The numeric value that the extracted text denotes." + }, + "unit": { + "$ref": "#/definitions/TemperatureUnit", + "description": "Unit of measure for temperature." + } + }, + "required": [ + "value", + "unit" + ], "allOf": [ { - "$ref": "common.json#/definitions/AbstractiveSummarizationTaskParametersBase" - }, + "$ref": "#/definitions/BaseMetadata" + } + ], + "x-ms-discriminator-value": "TemperatureMetadata" + }, + "TemperatureUnit": { + "type": "string", + "description": "The temperature Unit of measurement.", + "enum": [ + "Unspecified", + "Fahrenheit", + "Kelvin", + "Rankine", + "Celsius" + ], + "x-ms-enum": { + "name": "TemperatureUnit", + "modelAsString": true, + "values": [ + { + "name": "Unspecified", + "value": "Unspecified", + "description": "Unspecified temperature unit" + }, + { + "name": "Fahrenheit", + "value": "Fahrenheit", + "description": "Temperature unit in Fahrenheit" + }, + { + "name": "Kelvin", + "value": "Kelvin", + "description": "Temperature unit in Kelvin" + }, + { + "name": "Rankine", + "value": "Rankine", + "description": "Temperature unit in Rankine" + }, + { + "name": "Celsius", + "value": "Celsius", + "description": "Temperature unit in Celsius" + } + ] + } + }, + "TemporalModifier": { + "type": "string", + "description": "An optional modifier of a date/time instance.", + "enum": [ + "AfterApprox", + "Before", + "BeforeStart", + "Approx", + "ReferenceUndefined", + "SinceEnd", + "AfterMid", + "Start", + "After", + "BeforeEnd", + "Until", + "End", + "Less", + "Since", + "AfterStart", + "BeforeApprox", + "Mid", + "More" + ], + "x-ms-enum": { + "name": "TemporalModifier", + "modelAsString": true, + "values": [ + { + "name": "AfterApprox", + "value": "AfterApprox", + "description": "After an approximate time" + }, + { + "name": "Before", + "value": "Before", + "description": "Before a specific time" + }, + { + "name": "BeforeStart", + "value": "BeforeStart", + "description": "Before the start of a time period" + }, + { + "name": "Approx", + "value": "Approx", + "description": "Approximately at a specific time" + }, + { + "name": "ReferenceUndefined", + "value": "ReferenceUndefined", + "description": "Reference to an undefined time" + }, + { + "name": "SinceEnd", + "value": "SinceEnd", + "description": "Since the end of a time period" + }, + { + "name": "AfterMid", + "value": "AfterMid", + "description": "After the middle of a time period" + }, + { + "name": "Start", + "value": "Start", + "description": "At the start of a time period" + }, + { + "name": "After", + "value": "After", + "description": "After a specific time" + }, + { + "name": "BeforeEnd", + "value": "BeforeEnd", + "description": "Before the end of a time period" + }, + { + "name": "Until", + "value": "Until", + "description": "Until a specific time" + }, + { + "name": "End", + "value": "End", + "description": "At the end of a time period" + }, + { + "name": "Less", + "value": "Less", + "description": "Less than a specific time" + }, + { + "name": "Since", + "value": "Since", + "description": "Since a specific time" + }, + { + "name": "AfterStart", + "value": "AfterStart", + "description": "After the start of a time period" + }, + { + "name": "BeforeApprox", + "value": "BeforeApprox", + "description": "Before an approximate time" + }, + { + "name": "Mid", + "value": "Mid", + "description": "In the middle of a time period" + }, + { + "name": "More", + "value": "More", + "description": "More than a specific time" + } + ] + } + }, + "TemporalSetMetadata": { + "type": "object", + "description": "A Metadata for temporal set entity instances.", + "properties": { + "dateValues": { + "type": "array", + "description": "List of date values.", + "items": { + "$ref": "#/definitions/DateValue" + }, + "x-ms-identifiers": [] + } + }, + "allOf": [ { - "$ref": "common.json#/definitions/CustomTaskParameters" + "$ref": "#/definitions/BaseMetadata" } - ] + ], + "x-ms-discriminator-value": "TemporalSetMetadata" + }, + "TemporalSpanMetadata": { + "type": "object", + "description": "represents the Metadata of a date and/or time span.", + "properties": { + "spanValues": { + "type": "array", + "description": "List of temporal spans detected.", + "items": { + "$ref": "#/definitions/TemporalSpanValues" + }, + "x-ms-identifiers": [] + } + }, + "allOf": [ + { + "$ref": "#/definitions/BaseMetadata" + } + ], + "x-ms-discriminator-value": "TemporalSpanMetadata" + }, + "TemporalSpanValues": { + "type": "object", + "description": "Temporal span object.", + "properties": { + "begin": { + "type": "string", + "description": "Start value for the span." + }, + "end": { + "type": "string", + "description": "End value for the span." + }, + "duration": { + "type": "string", + "description": "An optional duration value formatted based on the ISO 8601 (https://en.wikipedia.org/wiki/ISO_8601#Durations)" + }, + "modifier": { + "$ref": "#/definitions/TemporalModifier", + "description": "Modifier for datetime to indicate point of reference like before, after etc." + }, + "timex": { + "type": "string", + "description": "An optional triplet containing the beginning, the end, and the duration all stated as ISO 8601 formatted strings." + } + } + }, + "Temporality": { + "type": "string", + "description": "Describes temporal information regarding the entity.", + "enum": [ + "current", + "past", + "future" + ], + "x-ms-enum": { + "name": "Temporality", + "modelAsString": false, + "values": [ + { + "name": "current", + "value": "current", + "description": "Current temporality" + }, + { + "name": "past", + "value": "past", + "description": "Past temporality" + }, + { + "name": "future", + "value": "future", + "description": "Future temporality" + } + ] + } }, - "AbstractiveSummarizationLROResult": { + "TimeMetadata": { "type": "object", - "description": "An object representing the results for an Abstractive Summarization task.", + "description": "A Metadata for time entity instances.", "properties": { - "results": { - "$ref": "#/definitions/AbstractiveSummarizationResult" + "dateValues": { + "type": "array", + "description": "List of date values.", + "items": { + "$ref": "#/definitions/DateValue" + }, + "x-ms-identifiers": [] } }, "allOf": [ { - "$ref": "#/definitions/AnalyzeTextLROResult" + "$ref": "#/definitions/BaseMetadata" } ], - "required": [ - "results" + "x-ms-discriminator-value": "TimeMetadata" + }, + "TokenSentimentValue": { + "type": "string", + "description": "The predicted Sentiment for the sentence.", + "enum": [ + "positive", + "mixed", + "negative" ], - "x-ms-discriminator-value": "AbstractiveSummarizationLROResults" + "x-ms-enum": { + "name": "TokenSentimentValue", + "modelAsString": false, + "values": [ + { + "name": "positive", + "value": "positive", + "description": "Positive sentiment" + }, + { + "name": "mixed", + "value": "mixed", + "description": "Mixed sentiment" + }, + { + "name": "negative", + "value": "negative", + "description": "Negative sentiment" + } + ] + } }, - "CustomAbstractiveSummarizationLROResult": { + "VolumeMetadata": { "type": "object", - "description": "An object representing the results for an Custom Abstractive Summarization task.", + "description": "Represents the Volume entity Metadata model.", "properties": { - "results": { - "$ref": "#/definitions/CustomAbstractiveSummarizationResult" + "value": { + "type": "number", + "format": "double", + "description": "The numeric value that the extracted text denotes." + }, + "unit": { + "$ref": "#/definitions/VolumeUnit", + "description": "Unit of measure for volume." } }, + "required": [ + "value", + "unit" + ], "allOf": [ { - "$ref": "#/definitions/AnalyzeTextLROResult" + "$ref": "#/definitions/BaseMetadata" } ], - "required": [ - "results" + "x-ms-discriminator-value": "VolumeMetadata" + }, + "VolumeUnit": { + "type": "string", + "description": "The Volume Unit of measurement", + "enum": [ + "Unspecified", + "CubicMeter", + "CubicCentimeter", + "CubicMillimeter", + "Hectoliter", + "Decaliter", + "Liter", + "Centiliter", + "Milliliter", + "CubicYard", + "CubicInch", + "CubicFoot", + "CubicMile", + "FluidOunce", + "Teaspoon", + "Tablespoon", + "Pint", + "Quart", + "Cup", + "Gill", + "Pinch", + "FluidDram", + "Barrel", + "Minim", + "Cord", + "Peck", + "Bushel", + "Hogshead" ], - "x-ms-discriminator-value": "CustomAbstractiveSummarizationLROResults" + "x-ms-enum": { + "name": "VolumeUnit", + "modelAsString": true, + "values": [ + { + "name": "Unspecified", + "value": "Unspecified", + "description": "Unspecified volume unit." + }, + { + "name": "CubicMeter", + "value": "CubicMeter", + "description": "Volume unit in cubic meters." + }, + { + "name": "CubicCentimeter", + "value": "CubicCentimeter", + "description": "Volume unit in cubic centimeters." + }, + { + "name": "CubicMillimeter", + "value": "CubicMillimeter", + "description": "Volume unit in cubic millimeters." + }, + { + "name": "Hectoliter", + "value": "Hectoliter", + "description": "Volume unit in hectoliters." + }, + { + "name": "Decaliter", + "value": "Decaliter", + "description": "Volume unit in decaliters." + }, + { + "name": "Liter", + "value": "Liter", + "description": "Volume unit in liters." + }, + { + "name": "Centiliter", + "value": "Centiliter", + "description": "Volume unit in centiliters." + }, + { + "name": "Milliliter", + "value": "Milliliter", + "description": "Volume unit in milliliters." + }, + { + "name": "CubicYard", + "value": "CubicYard", + "description": "Volume unit in cubic yards." + }, + { + "name": "CubicInch", + "value": "CubicInch", + "description": "Volume unit in cubic inches." + }, + { + "name": "CubicFoot", + "value": "CubicFoot", + "description": "Volume unit in cubic feet." + }, + { + "name": "CubicMile", + "value": "CubicMile", + "description": "Volume unit in cubic miles." + }, + { + "name": "FluidOunce", + "value": "FluidOunce", + "description": "Volume unit in fluid ounces." + }, + { + "name": "Teaspoon", + "value": "Teaspoon", + "description": "Volume unit in teaspoons." + }, + { + "name": "Tablespoon", + "value": "Tablespoon", + "description": "Volume unit in tablespoons." + }, + { + "name": "Pint", + "value": "Pint", + "description": "Volume unit in pints." + }, + { + "name": "Quart", + "value": "Quart", + "description": "Volume unit in quarts." + }, + { + "name": "Cup", + "value": "Cup", + "description": "Volume unit in cups." + }, + { + "name": "Gill", + "value": "Gill", + "description": "Volume unit in gills." + }, + { + "name": "Pinch", + "value": "Pinch", + "description": "Volume unit in pinches." + }, + { + "name": "FluidDram", + "value": "FluidDram", + "description": "Volume unit in fluid drams." + }, + { + "name": "Barrel", + "value": "Barrel", + "description": "Volume unit in barrels." + }, + { + "name": "Minim", + "value": "Minim", + "description": "Volume unit in minims." + }, + { + "name": "Cord", + "value": "Cord", + "description": "Volume unit in cords." + }, + { + "name": "Peck", + "value": "Peck", + "description": "Volume unit in pecks." + }, + { + "name": "Bushel", + "value": "Bushel", + "description": "Volume unit in bushels." + }, + { + "name": "Hogshead", + "value": "Hogshead", + "description": "Volume unit in hogsheads." + } + ] + } + }, + "WarningCodeValue": { + "type": "string", + "description": "Defines the list of the warning codes.", + "enum": [ + "LongWordsInDocument", + "DocumentTruncated" + ], + "x-ms-enum": { + "name": "WarningCodeValue", + "modelAsString": true, + "values": [ + { + "name": "LongWordsInDocument", + "value": "LongWordsInDocument", + "description": "Long words in document warning" + }, + { + "name": "DocumentTruncated", + "value": "DocumentTruncated", + "description": "Document truncated warning" + } + ] + } }, - "AbstractiveSummarizationResultBase": { + "WeightMetadata": { "type": "object", - "description": "An object representing the summarization results of each document.", + "description": "Represents the Weight ) entity Metadata model.", "properties": { - "documents": { - "type": "array", - "description": "Response by document", - "items": { - "$ref": "#/definitions/AbstractiveSummaryDocumentResultWithDetectedLanguage" - } + "value": { + "type": "number", + "format": "double", + "description": "The numeric value that the extracted text denotes." + }, + "unit": { + "$ref": "#/definitions/WeightUnit", + "description": "Unit of measure for weight." } }, "required": [ - "documents" - ] - }, - "AbstractiveSummaryDocumentResultWithDetectedLanguage": { - "type": "object", - "description": "An object representing the summarization result of a single document with detected language.", + "value", + "unit" + ], "allOf": [ { - "$ref": "#/definitions/AbstractiveSummaryDocumentResult" - }, - { - "$ref": "#/definitions/DocumentDetectedLanguage" + "$ref": "#/definitions/BaseMetadata" } - ] + ], + "x-ms-discriminator-value": "WeightMetadata" }, - "AbstractiveSummarizationResult": { - "type": "object", - "description": "An object representing the pre-build summarization results of each document.", - "allOf": [ - { - "$ref": "#/definitions/AbstractiveSummarizationResultBase" - }, - { - "$ref": "common.json#/definitions/PreBuiltResult" - } + "WeightUnit": { + "type": "string", + "description": "The weight Unit of measurement.", + "enum": [ + "Unspecified", + "Kilogram", + "Gram", + "Milligram", + "Gallon", + "MetricTon", + "Ton", + "Pound", + "Ounce", + "Grain", + "PennyWeight", + "LongTonBritish", + "ShortTonUS", + "ShortHundredWeightUS", + "Stone", + "Dram" + ], + "x-ms-enum": { + "name": "WeightUnit", + "modelAsString": true, + "values": [ + { + "name": "Unspecified", + "value": "Unspecified", + "description": "Unspecified weight unit" + }, + { + "name": "Kilogram", + "value": "Kilogram", + "description": "Weight unit in kilograms" + }, + { + "name": "Gram", + "value": "Gram", + "description": "Weight unit in grams" + }, + { + "name": "Milligram", + "value": "Milligram", + "description": "Weight unit in milligrams" + }, + { + "name": "Gallon", + "value": "Gallon", + "description": "Volume unit in gallons" + }, + { + "name": "MetricTon", + "value": "MetricTon", + "description": "Weight unit in metric tons" + }, + { + "name": "Ton", + "value": "Ton", + "description": "Weight unit in tons" + }, + { + "name": "Pound", + "value": "Pound", + "description": "Weight unit in pounds" + }, + { + "name": "Ounce", + "value": "Ounce", + "description": "Weight unit in ounces" + }, + { + "name": "Grain", + "value": "Grain", + "description": "Weight unit in grains" + }, + { + "name": "PennyWeight", + "value": "PennyWeight", + "description": "Weight unit in pennyweights" + }, + { + "name": "LongTonBritish", + "value": "LongTonBritish", + "description": "Weight unit in long tons (British)" + }, + { + "name": "ShortTonUS", + "value": "ShortTonUS", + "description": "Weight unit in short tons (US)" + }, + { + "name": "ShortHundredWeightUS", + "value": "ShortHundredWeightUS", + "description": "Weight unit in short hundredweights (US)" + }, + { + "name": "Stone", + "value": "Stone", + "description": "Weight unit in stones" + }, + { + "name": "Dram", + "value": "Dram", + "description": "Weight unit in drams" + } + ] + } + }, + "entityComponentKind": { + "type": "string", + "description": "Kind of entity components supported.", + "enum": [ + "PrebuiltComponent", + "LearnedComponent", + "ListComponent" ], - "required": [ - "documents" - ] + "x-ms-enum": { + "name": "entityComponentKind", + "modelAsString": true, + "values": [ + { + "name": "PrebuiltComponent", + "value": "PrebuiltComponent", + "description": "Prebuilt component" + }, + { + "name": "LearnedComponent", + "value": "LearnedComponent", + "description": "Learned component" + }, + { + "name": "ListComponent", + "value": "ListComponent", + "description": "List component" + } + ] + } }, - "CustomAbstractiveSummarizationResult": { - "type": "object", - "description": "An object representing the custom summarization results of each document.", - "allOf": [ - { - "$ref": "#/definitions/AbstractiveSummarizationResultBase" - }, - { - "$ref": "common.json#/definitions/CustomResult" - } + "fhirVersion": { + "type": "string", + "description": "The FHIR Spec version.", + "enum": [ + "4.0.1" ], - "required": [ - "documents" - ] + "x-ms-enum": { + "name": "fhirVersion", + "modelAsString": true, + "values": [ + { + "name": "4.0.1", + "value": "4.0.1", + "description": "Version 4.0.1" + } + ] + } }, - "AbstractiveSummaryDocumentResult": { - "type": "object", - "description": "An object representing the summarization result of a single document.", - "properties": { - "summaries": { - "type": "array", - "description": "A list of abstractive summaries.", - "items": { - "$ref": "#/definitions/AbstractiveSummary" + "healthcareDocumentType": { + "type": "string", + "description": "Document type.", + "enum": [ + "None", + "ClinicalTrial", + "DischargeSummary", + "ProgressNote", + "HistoryAndPhysical", + "Consult", + "Imaging", + "Pathology", + "ProcedureNote" + ], + "x-ms-enum": { + "name": "healthcareDocumentType", + "modelAsString": true, + "values": [ + { + "name": "None", + "value": "None", + "description": "None document type" + }, + { + "name": "ClinicalTrial", + "value": "ClinicalTrial", + "description": "Clinical trial document type" + }, + { + "name": "DischargeSummary", + "value": "DischargeSummary", + "description": "Discharge summary document type" + }, + { + "name": "ProgressNote", + "value": "ProgressNote", + "description": "Progress note document type" + }, + { + "name": "HistoryAndPhysical", + "value": "HistoryAndPhysical", + "description": "History and physical document type" + }, + { + "name": "Consult", + "value": "Consult", + "description": "Consult document type" + }, + { + "name": "Imaging", + "value": "Imaging", + "description": "Imaging document type" + }, + { + "name": "Pathology", + "value": "Pathology", + "description": "Pathology document type" + }, + { + "name": "ProcedureNote", + "value": "ProcedureNote", + "description": "Procedure note document type" } - } - }, - "allOf": [ - { - "$ref": "#/definitions/DocumentResult" - } + ] + } + }, + "healthcareEntityCategory": { + "type": "string", + "description": "Healthcare Entity Category.", + "enum": [ + "BodyStructure", + "Age", + "Gender", + "ExaminationName", + "Date", + "Direction", + "Frequency", + "MeasurementValue", + "MeasurementUnit", + "RelationalOperator", + "Time", + "GeneOrProtein", + "Variant", + "AdministrativeEvent", + "CareEnvironment", + "HealthcareProfession", + "Diagnosis", + "SymptomOrSign", + "ConditionQualifier", + "MedicationClass", + "MedicationName", + "Dosage", + "MedicationForm", + "MedicationRoute", + "FamilyRelation", + "TreatmentName", + "Ethnicity", + "Course", + "Expression", + "MutationType", + "ConditionScale", + "Allergen", + "Employment", + "LivingStatus", + "SubstanceUse", + "SubstanceUseAmount" ], - "required": [ - "summaries" - ] + "x-ms-enum": { + "name": "healthcareEntityCategory", + "modelAsString": true, + "values": [ + { + "name": "BodyStructure", + "value": "BodyStructure", + "description": "Body structure" + }, + { + "name": "Age", + "value": "Age", + "description": "Age" + }, + { + "name": "Gender", + "value": "Gender", + "description": "Gender" + }, + { + "name": "ExaminationName", + "value": "ExaminationName", + "description": "Examination name" + }, + { + "name": "Date", + "value": "Date", + "description": "Date" + }, + { + "name": "Direction", + "value": "Direction", + "description": "Direction" + }, + { + "name": "Frequency", + "value": "Frequency", + "description": "Frequency" + }, + { + "name": "MeasurementValue", + "value": "MeasurementValue", + "description": "Measurement value" + }, + { + "name": "MeasurementUnit", + "value": "MeasurementUnit", + "description": "Measurement unit" + }, + { + "name": "RelationalOperator", + "value": "RelationalOperator", + "description": "Relational operator" + }, + { + "name": "Time", + "value": "Time", + "description": "Time" + }, + { + "name": "GeneOrProtein", + "value": "GeneOrProtein", + "description": "Gene or protein" + }, + { + "name": "Variant", + "value": "Variant", + "description": "Variant" + }, + { + "name": "AdministrativeEvent", + "value": "AdministrativeEvent", + "description": "Administrative event" + }, + { + "name": "CareEnvironment", + "value": "CareEnvironment", + "description": "Care environment" + }, + { + "name": "HealthcareProfession", + "value": "HealthcareProfession", + "description": "Healthcare profession" + }, + { + "name": "Diagnosis", + "value": "Diagnosis", + "description": "Diagnosis" + }, + { + "name": "SymptomOrSign", + "value": "SymptomOrSign", + "description": "Symptom or sign" + }, + { + "name": "ConditionQualifier", + "value": "ConditionQualifier", + "description": "Condition qualifier" + }, + { + "name": "MedicationClass", + "value": "MedicationClass", + "description": "Medication class" + }, + { + "name": "MedicationName", + "value": "MedicationName", + "description": "Medication name" + }, + { + "name": "Dosage", + "value": "Dosage", + "description": "Dosage" + }, + { + "name": "MedicationForm", + "value": "MedicationForm", + "description": "Medication form" + }, + { + "name": "MedicationRoute", + "value": "MedicationRoute", + "description": "Medication route" + }, + { + "name": "FamilyRelation", + "value": "FamilyRelation", + "description": "Family relation" + }, + { + "name": "TreatmentName", + "value": "TreatmentName", + "description": "Treatment name" + }, + { + "name": "Ethnicity", + "value": "Ethnicity", + "description": "Ethnicity" + }, + { + "name": "Course", + "value": "Course", + "description": "Course" + }, + { + "name": "Expression", + "value": "Expression", + "description": "Expression" + }, + { + "name": "MutationType", + "value": "MutationType", + "description": "Mutation type" + }, + { + "name": "ConditionScale", + "value": "ConditionScale", + "description": "Condition scale" + }, + { + "name": "Allergen", + "value": "Allergen", + "description": "Allergen" + }, + { + "name": "Employment", + "value": "Employment", + "description": "Employment" + }, + { + "name": "LivingStatus", + "value": "LivingStatus", + "description": "Living status" + }, + { + "name": "SubstanceUse", + "value": "SubstanceUse", + "description": "Substance use" + }, + { + "name": "SubstanceUseAmount", + "value": "SubstanceUseAmount", + "description": "Substance use amount" + } + ] + } }, - "AbstractiveSummary": { - "type": "object", - "description": "An object representing a single summary with context for given document.", - "properties": { - "text": { - "type": "string", - "description": "The text of the summary." - }, - "contexts": { - "type": "array", - "description": "The context list of the summary.", - "items": { - "$ref": "common.json#/definitions/SummaryContext" + "relationType": { + "type": "string", + "description": "Type of relation. Examples include: `DosageOfMedication` or 'FrequencyOfMedication', etc.", + "enum": [ + "Abbreviation", + "DirectionOfBodyStructure", + "DirectionOfCondition", + "DirectionOfExamination", + "DirectionOfTreatment", + "DosageOfMedication", + "FormOfMedication", + "FrequencyOfMedication", + "FrequencyOfTreatment", + "QualifierOfCondition", + "RelationOfExamination", + "RouteOfMedication", + "TimeOfCondition", + "TimeOfEvent", + "TimeOfExamination", + "TimeOfMedication", + "TimeOfTreatment", + "UnitOfCondition", + "UnitOfExamination", + "ValueOfCondition", + "ValueOfExamination", + "BodySiteOfCondition", + "BodySiteOfTreatment", + "CourseOfCondition", + "CourseOfExamination", + "CourseOfMedication", + "CourseOfTreatment", + "ExaminationFindsCondition", + "ExpressionOfGene", + "ExpressionOfVariant", + "FrequencyOfCondition", + "MutationTypeOfGene", + "MutationTypeOfVariant", + "ScaleOfCondition", + "VariantOfGene" + ], + "x-ms-enum": { + "name": "relationType", + "modelAsString": true, + "values": [ + { + "name": "Abbreviation", + "value": "Abbreviation", + "description": "Abbreviation" + }, + { + "name": "DirectionOfBodyStructure", + "value": "DirectionOfBodyStructure", + "description": "Direction of body structure" + }, + { + "name": "DirectionOfCondition", + "value": "DirectionOfCondition", + "description": "Direction of condition" + }, + { + "name": "DirectionOfExamination", + "value": "DirectionOfExamination", + "description": "Direction of examination" + }, + { + "name": "DirectionOfTreatment", + "value": "DirectionOfTreatment", + "description": "Direction of treatment" + }, + { + "name": "DosageOfMedication", + "value": "DosageOfMedication", + "description": "Dosage of medication" + }, + { + "name": "FormOfMedication", + "value": "FormOfMedication", + "description": "Form of medication" + }, + { + "name": "FrequencyOfMedication", + "value": "FrequencyOfMedication", + "description": "Frequency of medication" + }, + { + "name": "FrequencyOfTreatment", + "value": "FrequencyOfTreatment", + "description": "Frequency of treatment" + }, + { + "name": "QualifierOfCondition", + "value": "QualifierOfCondition", + "description": "Qualifier of condition" + }, + { + "name": "RelationOfExamination", + "value": "RelationOfExamination", + "description": "Relation of examination" + }, + { + "name": "RouteOfMedication", + "value": "RouteOfMedication", + "description": "Route of medication" + }, + { + "name": "TimeOfCondition", + "value": "TimeOfCondition", + "description": "Time of condition" + }, + { + "name": "TimeOfEvent", + "value": "TimeOfEvent", + "description": "Time of event" + }, + { + "name": "TimeOfExamination", + "value": "TimeOfExamination", + "description": "Time of examination" + }, + { + "name": "TimeOfMedication", + "value": "TimeOfMedication", + "description": "Time of medication" + }, + { + "name": "TimeOfTreatment", + "value": "TimeOfTreatment", + "description": "Time of treatment" + }, + { + "name": "UnitOfCondition", + "value": "UnitOfCondition", + "description": "Unit of condition" + }, + { + "name": "UnitOfExamination", + "value": "UnitOfExamination", + "description": "Unit of examination" + }, + { + "name": "ValueOfCondition", + "value": "ValueOfCondition", + "description": "Value of condition" + }, + { + "name": "ValueOfExamination", + "value": "ValueOfExamination", + "description": "Value of examination" + }, + { + "name": "BodySiteOfCondition", + "value": "BodySiteOfCondition", + "description": "Body site of condition" + }, + { + "name": "BodySiteOfTreatment", + "value": "BodySiteOfTreatment", + "description": "Body site of treatment" + }, + { + "name": "CourseOfCondition", + "value": "CourseOfCondition", + "description": "Course of condition" + }, + { + "name": "CourseOfExamination", + "value": "CourseOfExamination", + "description": "Course of examination" + }, + { + "name": "CourseOfMedication", + "value": "CourseOfMedication", + "description": "Course of medication" + }, + { + "name": "CourseOfTreatment", + "value": "CourseOfTreatment", + "description": "Course of treatment" + }, + { + "name": "ExaminationFindsCondition", + "value": "ExaminationFindsCondition", + "description": "Examination finds condition" + }, + { + "name": "ExpressionOfGene", + "value": "ExpressionOfGene", + "description": "Expression of gene" + }, + { + "name": "ExpressionOfVariant", + "value": "ExpressionOfVariant", + "description": "Expression of variant" + }, + { + "name": "FrequencyOfCondition", + "value": "FrequencyOfCondition", + "description": "Frequency of condition" + }, + { + "name": "MutationTypeOfGene", + "value": "MutationTypeOfGene", + "description": "Mutation type of gene" + }, + { + "name": "MutationTypeOfVariant", + "value": "MutationTypeOfVariant", + "description": "Mutation type of variant" + }, + { + "name": "ScaleOfCondition", + "value": "ScaleOfCondition", + "description": "Scale of condition" + }, + { + "name": "VariantOfGene", + "value": "VariantOfGene", + "description": "Variant of gene" } - } - }, - "required": [ - "text" - ] + ] + } + } + }, + "parameters": { + "Azure.Core.Foundations.ApiVersionParameter": { + "name": "api-version", + "in": "query", + "description": "The API version to use for this operation.", + "required": true, + "type": "string", + "minLength": 1, + "x-ms-parameter-location": "method", + "x-ms-client-name": "apiVersion" } } } diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulAbstractiveSummarizationTaskResult.json b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulAbstractiveSummarizationTaskResult.json new file mode 100644 index 000000000000..a274bc80839b --- /dev/null +++ b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulAbstractiveSummarizationTaskResult.json @@ -0,0 +1,58 @@ +{ + "operationId": "AnalyzeTextJobStatus", + "title": "SuccessfulAbstractiveSummarizationTaskResult", + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "api-version": "2023-11-15-preview", + "Endpoint": "{Endpoint}", + "jobId": "c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "createdDateTime": "2020-10-01T15:00:45Z", + "displayName": "Document Abstractive Summarization Task Example", + "expirationDateTime": "2020-10-03T15:01:03Z", + "jobId": "c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18", + "lastUpdatedDateTime": "2020-10-01T15:01:03Z", + "status": "succeeded", + "tasks": { + "completed": 1, + "failed": 0, + "inProgress": 0, + "total": 1, + "items": [ + { + "kind": "AbstractiveSummarizationLROResults", + "taskName": "Document Abstractive Summarization Task 1", + "lastUpdateDateTime": "2020-10-01T15:01:03Z", + "status": "succeeded", + "results": { + "documents": [ + { + "summaries": [ + { + "text": "Microsoft have been on a quest to advance AI beyond existing techniques.", + "contexts": [ + { + "offset": 0, + "length": 1629 + } + ] + } + ], + "id": "1", + "warnings": [] + } + ], + "errors": [], + "modelVersion": "latest" + } + } + ] + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulAbstractiveSummarizationTaskSubmit.json b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulAbstractiveSummarizationTaskSubmit.json new file mode 100644 index 000000000000..6293731cb3cc --- /dev/null +++ b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulAbstractiveSummarizationTaskSubmit.json @@ -0,0 +1,38 @@ +{ + "operationId": "AnalyzeTextSubmitJob", + "title": "SuccessfulAbstractiveSummarizationTaskSubmit", + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "api-version": "2023-11-15-preview", + "Endpoint": "{Endpoint}", + "jobId": "{Job ID}", + "body": { + "displayName": "Document Abstractive Summarization Task Example", + "analysisInput": { + "documents": [ + { + "id": "1", + "language": "en", + "text": "At Microsoft, we have been on a quest to advance AI beyond existing techniques, by taking a more holistic, human-centric approach to learning and understanding. As Chief Technology Officer of Azure AI Cognitive Services, I have been working with a team of amazing scientists and engineers to turn this quest into a reality. In my role, I enjoy a unique perspective in viewing the relationship among three attributes of human cognition: monolingual text (X), audio or visual sensory signals, (Y) and multilingual (Z). At the intersection of all three, there is magic—what we call XYZ-code as illustrated in Figure 1—a joint representation to create more powerful AI that can speak, hear, see, and understand humans better. We believe XYZ-code will enable us to fulfill our long-term vision: cross-domain transfer learning, spanning modalities and languages. The goal is to have pre-trained models that can jointly learn representations to support a broad range of downstream AI tasks, much in the way humans do today. Over the past five years, we have achieved human performance on benchmarks in conversational speech recognition, machine translation, conversational question answering, machine reading comprehension, and image captioning. These five breakthroughs provided us with strong signals toward our more ambitious aspiration to produce a leap in AI capabilities, achieving multi-sensory and multilingual learning that is closer in line with how humans learn and understand. I believe the joint XYZ-code is a foundational component of this aspiration, if grounded with external knowledge sources in the downstream AI tasks." + } + ] + }, + "tasks": [ + { + "kind": "AbstractiveSummarization", + "taskName": "Document Abstractive Summarization Task 1", + "parameters": { + "sentenceCount": 1 + } + } + ] + } + }, + "responses": { + "202": { + "headers": { + "Operation-Location": "{endpoint}/language/analyze-text/jobs/{jobId}?api-version=2023-11-15-preview" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulAnalyzeConversations.json b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulAnalyzeConversations.json new file mode 100644 index 000000000000..b7c349c9c4ae --- /dev/null +++ b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulAnalyzeConversations.json @@ -0,0 +1,63 @@ +{ + "operationId": "AnalyzeConversations", + "title": "SuccessfulAnalyzeConversations", + "parameters": { + "Endpoint": "{Endpoint}", + "Ocp-Apim-Subscription-Key": "{API key}", + "Content-Type": "application/json", + "api-version": "2023-11-15-preview", + "body": { + "kind": "Conversation", + "analysisInput": { + "conversationItem": { + "id": "1", + "participantId": "1", + "text": "play In the air tonight from Phil Collins" + } + }, + "parameters": { + "projectName": "{project-name}", + "deploymentName": "{deployment-name}", + "stringIndexType": "TextElement_V8" + } + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "kind": "ConversationResult", + "result": { + "query": "play In the air tonight from Phil Collins", + "prediction": { + "topIntent": "PlayMusic", + "projectKind": "Conversation", + "intents": [ + { + "category": "PlayMusic", + "confidenceScore": 1 + }, + { + "category": "SearchCreativeWork", + "confidenceScore": 0 + }, + { + "category": "AddToPlaylist", + "confidenceScore": 0 + } + ], + "entities": [ + { + "category": "Media.Artist", + "text": "Phil Collins", + "offset": 29, + "length": 12, + "confidenceScore": 1 + } + ] + } + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulAnalyzeConversationsArbitration.json b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulAnalyzeConversationsArbitration.json new file mode 100644 index 000000000000..63886997c41e --- /dev/null +++ b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulAnalyzeConversationsArbitration.json @@ -0,0 +1,76 @@ +{ + "operationId": "AnalyzeConversations", + "title": "SuccessfulAnalyzeConversationsArbitration", + "parameters": { + "Endpoint": "{Endpoint}", + "Ocp-Apim-Subscription-Key": "{API key}", + "Content-Type": "application/json", + "api-version": "2023-11-15-preview", + "body": { + "kind": "Conversation", + "analysisInput": { + "conversationItem": { + "participantId": "1", + "id": "1", + "modality": "text", + "language": "en-GB", + "text": "How do I integrate QnA Maker and LUIS?" + } + }, + "parameters": { + "projectName": "{project-name}", + "deploymentName": "{deployment-name}", + "verbose": true, + "isLoggingEnabled": false, + "stringIndexType": "TextElement_V8" + } + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "kind": "ConversationResult", + "result": { + "query": "trains from London", + "prediction": { + "topIntent": "Rail", + "projectKind": "Orchestration", + "intents": { + "Rail": { + "confidenceScore": 1, + "targetProjectKind": "Conversation", + "result": { + "query": "trains from London", + "prediction": { + "topIntent": "Timetable", + "projectKind": "Conversation", + "intents": [ + { + "category": "Timetable", + "confidenceScore": 0.99968535 + }, + { + "category": "Locomotive", + "confidenceScore": 0.000314623 + } + ], + "entities": [] + } + } + }, + "Tree": { + "confidenceScore": 0.2641529, + "targetProjectKind": "QuestionAnswering" + }, + "None": { + "confidenceScore": 0, + "targetProjectKind": "NonLinked" + } + } + } + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulAnalyzeConversationsArbitrationDirectTarget.json b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulAnalyzeConversationsArbitrationDirectTarget.json new file mode 100644 index 000000000000..b7c39ef12d28 --- /dev/null +++ b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulAnalyzeConversationsArbitrationDirectTarget.json @@ -0,0 +1,77 @@ +{ + "operationId": "AnalyzeConversations", + "title": "SuccessfulAnalyzeConversationsArbitrationDirectTarget", + "parameters": { + "Endpoint": "{Endpoint}", + "Ocp-Apim-Subscription-Key": "{API key}", + "Content-Type": "application/json", + "api-version": "2023-11-15-preview", + "body": { + "kind": "Conversation", + "analysisInput": { + "conversationItem": { + "text": "Ports and connectors", + "participantId": "1", + "id": "1" + } + }, + "parameters": { + "projectName": "prj1", + "deploymentName": "dep1", + "directTarget": "qnaProject", + "targetProjectParameters": { + "qnaProject": { + "targetProjectKind": "QuestionAnswering", + "callingOptions": { + "context": { + "previousUserQuery": "Meet Surface Pro 4", + "previousQnaId": 4 + }, + "top": 1, + "question": "App Service overview" + } + } + } + } + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "kind": "ConversationResult", + "result": { + "query": "Ports and connectors", + "prediction": { + "projectKind": "Orchestration", + "topIntent": "qnaTargetApp", + "intents": { + "qnaTargetApp": { + "targetProjectKind": "QuestionAnswering", + "confidenceScore": 1, + "result": { + "answers": [ + { + "questions": [ + "App Service overview" + ], + "answer": "The compute resources you use are determined by the *App Service plan* that you run your apps on.", + "confidenceScore": 0.7384000000000001, + "id": 1, + "source": "https://docs.microsoft.com/en-us/azure/app-service/overview", + "metadata": {}, + "dialog": { + "isContextOnly": false, + "prompts": [] + } + } + ] + } + } + } + } + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulAnalyzeConversationsJobsCancelRequest.json b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulAnalyzeConversationsJobsCancelRequest.json new file mode 100644 index 000000000000..8a06b3663db0 --- /dev/null +++ b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulAnalyzeConversationsJobsCancelRequest.json @@ -0,0 +1,17 @@ +{ + "operationId": "AnalyzeConversationsCancelJob", + "title": "SuccessfulAnalyzeConversationsJobsCancelRequest", + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "api-version": "2023-11-15-preview", + "Endpoint": "{Endpoint}", + "jobId": "c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18" + }, + "responses": { + "202": { + "headers": { + "Operation-Location": "{Endpoint}/language/analyze-conversations/jobs/{jobId}?api-version=2023-11-15-preview" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulAnalyzeTextJobsCancelRequest.json b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulAnalyzeTextJobsCancelRequest.json new file mode 100644 index 000000000000..a021218768dd --- /dev/null +++ b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulAnalyzeTextJobsCancelRequest.json @@ -0,0 +1,17 @@ +{ + "operationId": "AnalyzeTextCancelJob", + "title": "SuccessfulAnalyzeTextJobsCancelRequest", + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "api-version": "2023-11-15-preview", + "Endpoint": "{Endpoint}", + "jobId": "c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18" + }, + "responses": { + "202": { + "headers": { + "Operation-Location": "{Endpoint}/language/analyze-text/jobs/{jobId}?api-version=2023-11-15-preview" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulAnalyzeTextJobsMultipleTaskStatusRequest.json b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulAnalyzeTextJobsMultipleTaskStatusRequest.json new file mode 100644 index 000000000000..3a36218c7529 --- /dev/null +++ b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulAnalyzeTextJobsMultipleTaskStatusRequest.json @@ -0,0 +1,180 @@ +{ + "operationId": "AnalyzeTextJobStatus", + "title": "SuccessfulAnalyzeTextJobsMultipleTaskStatusRequest", + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "api-version": "2023-11-15-preview", + "Endpoint": "{Endpoint}", + "jobId": "c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "createdDateTime": "2020-10-01T15:00:45Z", + "displayName": "Extracting Location & US Region", + "expirationDateTime": "2020-10-03T15:01:03Z", + "jobId": "c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18", + "lastUpdatedDateTime": "2020-10-01T15:01:03Z", + "status": "succeeded", + "tasks": { + "completed": 2, + "failed": 0, + "inProgress": 0, + "total": 2, + "items": [ + { + "kind": "EntityRecognitionLROResults", + "taskName": "Recognize Entities", + "lastUpdateDateTime": "2020-10-01T15:01:03Z", + "status": "succeeded", + "results": { + "documents": [ + { + "entities": [ + { + "category": "Event", + "type": "Event", + "confidenceScore": 0.61, + "length": 4, + "offset": 18, + "text": "trip", + "tags": [ + { + "name": "Event", + "confidenceScore": 0.61 + } + ] + }, + { + "category": "Location", + "type": "GPE", + "confidenceScore": 0.82, + "length": 7, + "offset": 26, + "tags": [ + { + "name": "Location", + "confidenceScore": 0.82 + }, + { + "name": "GPE", + "confidenceScore": 0.82 + } + ], + "text": "Seattle" + }, + { + "category": "Temporal", + "type": "DateRange", + "confidenceScore": 0.8, + "length": 9, + "offset": 34, + "text": "last week", + "tags": [ + { + "name": "DateRange", + "confidenceScore": 0.8 + }, + { + "name": "Temporal", + "confidenceScore": 0.8 + } + ] + } + ], + "id": "1", + "warnings": [] + }, + { + "entities": [ + { + "category": "Location", + "type": "GPE", + "confidenceScore": 0.52, + "length": 3, + "offset": 14, + "text": "NYC", + "tags": [ + { + "name": "Location", + "confidenceScore": 0.82 + }, + { + "name": "GPE", + "confidenceScore": 0.82 + } + ] + }, + { + "category": "Temporal", + "type": "Date", + "confidenceScore": 0.8, + "length": 8, + "offset": 18, + "text": "tomorrow", + "tags": [ + { + "name": "Date", + "confidenceScore": 0.8 + }, + { + "name": "Temporal", + "confidenceScore": 0.8 + } + ] + } + ], + "id": "2", + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2020-04-01" + } + }, + { + "kind": "CustomEntityRecognitionLROResults", + "taskName": "Recognize US Regions", + "lastUpdateDateTime": "2020-10-01T15:01:03Z", + "status": "succeeded", + "results": { + "documents": [ + { + "entities": [ + { + "category": "USRegion", + "confidenceScore": 0.85, + "length": 17, + "offset": 45, + "text": "Pacific Northwest" + } + ], + "id": "1", + "warnings": [] + }, + { + "entities": [ + { + "category": "USRegion", + "confidenceScore": 0.88, + "length": 10, + "offset": 63, + "text": "East Coast" + } + ], + "id": "2", + "warnings": [] + } + ], + "errors": [], + "projectName": "MyProject", + "deploymentName": "MyDeployment" + } + } + ] + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulAnalyzeTextJobsMultipleTaskSubmitRequest.json b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulAnalyzeTextJobsMultipleTaskSubmitRequest.json new file mode 100644 index 000000000000..f6bd18ae4735 --- /dev/null +++ b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulAnalyzeTextJobsMultipleTaskSubmitRequest.json @@ -0,0 +1,51 @@ +{ + "operationId": "AnalyzeTextSubmitJob", + "title": "SuccessfulAnalyzeTextJobsMultipleTaskSubmitRequest", + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "api-version": "2023-11-15-preview", + "Endpoint": "{Endpoint}", + "jobId": "{Job ID}", + "body": { + "displayName": "Extracting Location & US Region", + "analysisInput": { + "documents": [ + { + "id": "1", + "language": "en", + "text": "I had a wonderful trip to Seattle last week." + }, + { + "id": "2", + "language": "en", + "text": "I'm flying to NYC tomorrow. See you there." + } + ] + }, + "tasks": [ + { + "kind": "EntityRecognition", + "taskName": "Recognize Entities", + "parameters": { + "modelVersion": "latest" + } + }, + { + "kind": "CustomEntityRecognition", + "taskName": "Recognize US Regions", + "parameters": { + "projectName": "MyProject", + "deploymentName": "MyDeployment" + } + } + ] + } + }, + "responses": { + "202": { + "headers": { + "Operation-Location": "{endpoint}/language/analyze-text/jobs/{jobId}?api-version=2023-11-15-preview" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulConversationPIIExclusionSubmit.json b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulConversationPIIExclusionSubmit.json new file mode 100644 index 000000000000..6855d85571fd --- /dev/null +++ b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulConversationPIIExclusionSubmit.json @@ -0,0 +1,76 @@ +{ + "operationId": "AnalyzeConversationsSubmitJob", + "title": "SuccessfulConversationPIIExclusionSubmit", + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "api-version": "2023-11-15-preview", + "Endpoint": "{Endpoint}", + "jobId": "{Job ID}", + "body": { + "displayName": "Redacting PII data from transcribed audio", + "analysisInput": { + "conversations": [ + { + "id": "1", + "language": "en", + "modality": "transcript", + "domain": "generic", + "conversationItems": [ + { + "participantId": "1", + "id": "1", + "text": "Good morning John Doe.", + "itn": "good morning john doe", + "maskedItn": "good morning john doe", + "lexical": "good morning john doe", + "wordLevelTimings": [ + { + "word": "good", + "offset": 390000, + "duration": 2700000 + }, + { + "word": "morning", + "offset": 4500000, + "duration": 920000 + }, + { + "word": "john", + "offset": 590000, + "duration": 2700000 + }, + { + "word": "doe", + "offset": 6300000, + "duration": 920000 + } + ] + } + ] + } + ] + }, + "tasks": [ + { + "taskName": "Conversation PII", + "kind": "ConversationalPIITask", + "parameters": { + "modelVersion": "latest", + "excludePiiCategories": [ + "Person" + ], + "redactionSource": "lexical", + "redactAudioTiming": true + } + } + ] + } + }, + "responses": { + "202": { + "headers": { + "Operation-Location": "{Endpoint}/language/analyze-conversation/jobs/{jobId}?api-version=2023-11-15-preview" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulConversationPIIExclusionTaskStatusRequest.json b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulConversationPIIExclusionTaskStatusRequest.json new file mode 100644 index 000000000000..9bb019ec6772 --- /dev/null +++ b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulConversationPIIExclusionTaskStatusRequest.json @@ -0,0 +1,68 @@ +{ + "operationId": "AnalyzeConversationsJobStatus", + "title": "SuccessfulConversationPIIExclusionTaskStatusRequest", + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "api-version": "2023-11-15-preview", + "Endpoint": "{Endpoint}", + "jobId": "c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "createdDateTime": "2020-10-01T15:00:45Z", + "displayName": "Redacting PII from transcribed audio", + "expirationDateTime": "2020-10-03T15:01:03Z", + "jobId": "c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18", + "lastUpdatedDateTime": "2022-01-25T15:01:03Z", + "status": "succeeded", + "tasks": { + "completed": 1, + "failed": 0, + "inProgress": 0, + "total": 1, + "items": [ + { + "kind": "ConversationalPIIResults", + "taskName": "Conversation PII", + "lastUpdateDateTime": "2022-01-25T15:01:03Z", + "status": "succeeded", + "results": { + "conversations": [ + { + "id": "1", + "conversationItems": [ + { + "id": "1", + "redactedContent": { + "text": "Good morning *************.", + "itn": "good morning *************", + "maskedItn": "good morning *************", + "lexical": "good morning *************", + "audioTimings": [ + { + "offset": 590000, + "duration": 920000 + } + ] + }, + "entities": [] + } + ], + "warnings": [], + "statistics": { + "transactionsCount": 1 + } + } + ], + "errors": [], + "modelVersion": "2022-05-15-preview" + } + } + ] + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulConversationPIIRedactionCharSubmit.json b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulConversationPIIRedactionCharSubmit.json new file mode 100644 index 000000000000..377aef55f9e3 --- /dev/null +++ b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulConversationPIIRedactionCharSubmit.json @@ -0,0 +1,77 @@ +{ + "operationId": "AnalyzeConversationsSubmitJob", + "title": "SuccessfulConversationPIIRedactionCharSubmit", + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "api-version": "2023-11-15-preview", + "Endpoint": "{Endpoint}", + "jobId": "{Job ID}", + "body": { + "displayName": "Redacting PII data from transcribed audio", + "analysisInput": { + "conversations": [ + { + "id": "1", + "language": "en", + "modality": "transcript", + "domain": "generic", + "conversationItems": [ + { + "participantId": "1", + "id": "1", + "text": "Good morning John Doe.", + "itn": "good morning john doe", + "maskedItn": "good morning john doe", + "lexical": "good morning john doe", + "wordLevelTimings": [ + { + "word": "good", + "offset": 390000, + "duration": 2700000 + }, + { + "word": "morning", + "offset": 4500000, + "duration": 920000 + }, + { + "word": "john", + "offset": 590000, + "duration": 2700000 + }, + { + "word": "doe", + "offset": 6300000, + "duration": 920000 + } + ] + } + ] + } + ] + }, + "tasks": [ + { + "taskName": "Conversation PII", + "kind": "ConversationalPIITask", + "parameters": { + "modelVersion": "latest", + "piiCategories": [ + "All" + ], + "redactionCharacter": "-", + "redactionSource": "lexical", + "redactAudioTiming": true + } + } + ] + } + }, + "responses": { + "202": { + "headers": { + "Operation-Location": "{Endpoint}/language/analyze-conversation/jobs/{jobId}?api-version=2023-11-15-preview" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulConversationPIIRedactionCharTaskStatusRequest.json b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulConversationPIIRedactionCharTaskStatusRequest.json new file mode 100644 index 000000000000..208290d2b267 --- /dev/null +++ b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulConversationPIIRedactionCharTaskStatusRequest.json @@ -0,0 +1,76 @@ +{ + "operationId": "AnalyzeConversationsJobStatus", + "title": "SuccessfulConversationPIIRedactionCharTaskStatusRequest", + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "api-version": "2023-11-15-preview", + "Endpoint": "{Endpoint}", + "jobId": "c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "createdDateTime": "2020-10-01T15:00:45Z", + "displayName": "Redacting PII from transcribed audio", + "expirationDateTime": "2020-10-03T15:01:03Z", + "jobId": "c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18", + "lastUpdatedDateTime": "2022-01-25T15:01:03Z", + "status": "succeeded", + "tasks": { + "completed": 1, + "failed": 0, + "inProgress": 0, + "total": 1, + "items": [ + { + "kind": "ConversationalPIIResults", + "taskName": "Conversation PII", + "lastUpdateDateTime": "2022-01-25T15:01:03Z", + "status": "succeeded", + "results": { + "conversations": [ + { + "id": "1", + "conversationItems": [ + { + "id": "1", + "redactedContent": { + "text": "Good morning -------------.", + "itn": "good morning -------------", + "maskedItn": "good morning -------------", + "lexical": "good morning -------------", + "audioTimings": [ + { + "offset": 590000, + "duration": 920000 + } + ] + }, + "entities": [ + { + "category": "Person", + "confidenceScore": 0.91, + "length": 8, + "offset": 13, + "text": "john doe" + } + ] + } + ], + "warnings": [], + "statistics": { + "transactionsCount": 1 + } + } + ], + "errors": [], + "modelVersion": "2022-05-15-preview" + } + } + ] + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/conversations/SuccessfulConversationPIIRedactionCharSubmit.json b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulConversationPIISubmit.json similarity index 95% rename from specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/conversations/SuccessfulConversationPIIRedactionCharSubmit.json rename to specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulConversationPIISubmit.json index 79ffee910b59..d94e207ea7c9 100644 --- a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/conversations/SuccessfulConversationPIIRedactionCharSubmit.json +++ b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulConversationPIISubmit.json @@ -1,4 +1,6 @@ { + "operationId": "AnalyzeConversationsSubmitJob", + "title": "SuccessfulConversationPIISubmit", "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", "api-version": "2023-11-15-preview", @@ -57,7 +59,6 @@ "piiCategories": [ "All" ], - "redactionCharacter": "-", "redactionSource": "lexical", "redactAudioTiming": true } diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulConversationPIITaskStatusRequest.json b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulConversationPIITaskStatusRequest.json new file mode 100644 index 000000000000..f6ee2c914a85 --- /dev/null +++ b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulConversationPIITaskStatusRequest.json @@ -0,0 +1,76 @@ +{ + "operationId": "AnalyzeConversationsJobStatus", + "title": "SuccessfulConversationPIITaskStatusRequest", + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "api-version": "2023-11-15-preview", + "Endpoint": "{Endpoint}", + "jobId": "c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "createdDateTime": "2020-10-01T15:00:45Z", + "displayName": "Redacting PII from transcribed audio", + "expirationDateTime": "2020-10-03T15:01:03Z", + "jobId": "c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18", + "lastUpdatedDateTime": "2022-01-25T15:01:03Z", + "status": "succeeded", + "tasks": { + "completed": 1, + "failed": 0, + "inProgress": 0, + "total": 1, + "items": [ + { + "kind": "ConversationalPIIResults", + "taskName": "Conversation PII", + "lastUpdateDateTime": "2022-01-25T15:01:03Z", + "status": "succeeded", + "results": { + "conversations": [ + { + "id": "1", + "conversationItems": [ + { + "id": "1", + "redactedContent": { + "text": "Good morning *************.", + "itn": "good morning *************", + "maskedItn": "good morning *************", + "lexical": "good morning *************", + "audioTimings": [ + { + "offset": 590000, + "duration": 920000 + } + ] + }, + "entities": [ + { + "category": "Person", + "confidenceScore": 0.91, + "length": 8, + "offset": 13, + "text": "john doe" + } + ] + } + ], + "warnings": [], + "statistics": { + "transactionsCount": 1 + } + } + ], + "errors": [], + "modelVersion": "2022-05-15-preview" + } + } + ] + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulConversationSentimentSubmit.json b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulConversationSentimentSubmit.json new file mode 100644 index 000000000000..cd06fcaf794c --- /dev/null +++ b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulConversationSentimentSubmit.json @@ -0,0 +1,49 @@ +{ + "operationId": "AnalyzeConversationsSubmitJob", + "title": "SuccessfulConversationSentimentSubmit", + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "api-version": "2023-11-15-preview", + "Endpoint": "{Endpoint}", + "jobId": "{Job ID}", + "body": { + "displayName": "Sentiment Analysis from a call center conversation", + "analysisInput": { + "conversations": [ + { + "id": "1", + "language": "en", + "modality": "transcript", + "conversationItems": [ + { + "participantId": "1", + "id": "1", + "text": "I like the service. I do not like the food", + "lexical": "i like the service i do not like the food", + "itn": "", + "maskedItn": "" + } + ] + } + ] + }, + "tasks": [ + { + "taskName": "Conversation Sentiment Analysis", + "kind": "ConversationalSentimentTask", + "parameters": { + "modelVersion": "latest", + "predictionSource": "text" + } + } + ] + } + }, + "responses": { + "202": { + "headers": { + "Operation-Location": "{Endpoint}/language/analyze-conversation/jobs/{jobId}?api-version=2023-11-15-preview" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulConversationSentimentTaskStatusRequest.json b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulConversationSentimentTaskStatusRequest.json new file mode 100644 index 000000000000..72221e7c7a24 --- /dev/null +++ b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulConversationSentimentTaskStatusRequest.json @@ -0,0 +1,62 @@ +{ + "operationId": "AnalyzeConversationsJobStatus", + "title": "SuccessfulConversationSentimentTaskStatusRequest", + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "api-version": "2023-11-15-preview", + "Endpoint": "{Endpoint}", + "jobId": "c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "createdDateTime": "2022-04-01T15:00:45Z", + "displayName": "Sentiment Analysis from a call center conversation", + "expirationDateTime": "2022-04-01T15:00:45Z", + "jobId": "c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18", + "lastUpdatedDateTime": "2022-04-01T15:00:45Z", + "status": "succeeded", + "tasks": { + "completed": 1, + "failed": 0, + "inProgress": 0, + "total": 1, + "items": [ + { + "kind": "ConversationalSentimentResults", + "taskName": "Conversation Sentiment", + "lastUpdateDateTime": "2022-04-01T15:00:45Z", + "status": "succeeded", + "results": { + "conversations": [ + { + "id": "1", + "conversationItems": [ + { + "id": "1", + "participantId": "agent_1", + "sentiment": "mixed", + "confidenceScores": { + "positive": 0.5, + "neutral": 0.01, + "negative": 0.49 + } + } + ], + "warnings": [], + "statistics": { + "transactionsCount": 1 + } + } + ], + "errors": [], + "modelVersion": "2023-11-15-preview" + } + } + ] + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulConversationSummarizationTaskResult.json b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulConversationSummarizationTaskResult.json new file mode 100644 index 000000000000..73d39d18dd18 --- /dev/null +++ b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulConversationSummarizationTaskResult.json @@ -0,0 +1,77 @@ +{ + "operationId": "AnalyzeConversationsJobStatus", + "title": "SuccessfulConversationSummarizationTaskResult", + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "api-version": "2023-11-15-preview", + "Endpoint": "{Endpoint}", + "jobId": "3e9e8518-492f-47f9-abd1-9a7468231086" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "displayName": "Conversation Summarization Example", + "createdDateTime": "2022-04-01T15:00:45Z", + "expirationDateTime": "2022-04-02T15:00:45Z", + "jobId": "3e9e8518-492f-47f9-abd1-9a7468231086", + "lastUpdatedDateTime": "2022-04-01T15:00:49Z", + "status": "succeeded", + "tasks": { + "completed": 1, + "failed": 0, + "inProgress": 0, + "total": 1, + "items": [ + { + "kind": "ConversationalSummarizationResults", + "lastUpdateDateTime": "2022-04-01T15:00:49Z", + "taskName": "Conversation Summarization Task 1", + "status": "succeeded", + "results": { + "conversations": [ + { + "id": "1", + "summaries": [ + { + "aspect": "chapterTitle", + "text": "Bug Triage", + "contexts": [ + { + "conversationItemId": "2", + "offset": 4, + "length": 39 + } + ] + }, + { + "aspect": "narrative", + "text": "Speaker 3 believes there are 3 remaining bugs.", + "contexts": [ + { + "conversationItemId": "2", + "offset": 4, + "length": 39 + }, + { + "conversationItemId": "3", + "offset": 0, + "length": 7 + } + ] + } + ], + "warnings": [] + } + ], + "errors": [], + "modelVersion": "latest" + } + } + ] + }, + "nextLink": "/language/analyze-conversation/jobs/3e9e8518-492f-47f9-abd1-9a7468231086?$skip=10&$top=10" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulConversationSummarizationTaskStatusRequest.json b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulConversationSummarizationTaskStatusRequest.json new file mode 100644 index 000000000000..7be32fe638d1 --- /dev/null +++ b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulConversationSummarizationTaskStatusRequest.json @@ -0,0 +1,61 @@ +{ + "operationId": "AnalyzeConversationsJobStatus", + "title": "SuccessfulConversationSummarizationTaskStatusRequest", + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "api-version": "2023-11-15-preview", + "Endpoint": "{Endpoint}", + "jobId": "c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "displayName": "Analyze chat", + "createdDateTime": "2022-04-01T15:00:45Z", + "expirationDateTime": "2022-04-02T15:00:45Z", + "jobId": "3e9e8518-492f-47f9-abd1-9a7468231086", + "lastUpdatedDateTime": "2022-04-01T15:00:49Z", + "status": "succeeded", + "tasks": { + "completed": 1, + "failed": 0, + "inProgress": 0, + "total": 1, + "items": [ + { + "kind": "ConversationalSummarizationResults", + "lastUpdateDateTime": "2022-04-01T15:00:49Z", + "taskName": "analyze 1", + "status": "succeeded", + "results": { + "conversations": [ + { + "id": "20220101meeting", + "summaries": [ + { + "aspect": "issue", + "text": "Customer wants to cancel his subscription. Customer doesn't know how" + }, + { + "aspect": "resolution", + "text": "pii Auto-Fortify. \npii Gamertag.\npii E-mail.\nCanceled customer's subscription" + } + ], + "warnings": [], + "statistics": { + "transactionsCount": 1 + } + } + ], + "errors": [], + "modelVersion": "latest" + } + } + ] + }, + "nextLink": "/language/analyze-conversation/jobs/3e9e8518-492f-47f9-abd1-9a7468231086?$skip=10&$top=10" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulConversationSummarizationTaskSubmit.json b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulConversationSummarizationTaskSubmit.json new file mode 100644 index 000000000000..fb8d74f4917b --- /dev/null +++ b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulConversationSummarizationTaskSubmit.json @@ -0,0 +1,79 @@ +{ + "operationId": "AnalyzeConversationsSubmitJob", + "title": "SuccessfulConversationSummarizationTaskSubmit", + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "api-version": "2023-11-15-preview", + "Endpoint": "{Endpoint}", + "jobId": "{Job ID}", + "body": { + "displayName": "Conversation Summarization Example", + "analysisInput": { + "conversations": [ + { + "id": "1", + "language": "en", + "modality": "transcript", + "conversationItems": [ + { + "participantId": "speaker 1", + "id": "1", + "text": "Let's get started.", + "lexical": "", + "itn": "", + "maskedItn": "", + "conversationItemLevelTiming": { + "offset": 0, + "duration": 20000000 + } + }, + { + "participantId": "speaker 2", + "id": "2", + "text": "OK. How many remaining bugs do we have now?", + "lexical": "", + "itn": "", + "maskedItn": "", + "conversationItemLevelTiming": { + "offset": 20000000, + "duration": 50000000 + } + }, + { + "participantId": "speaker 3", + "id": "3", + "text": "Only 3.", + "lexical": "", + "itn": "", + "maskedItn": "", + "conversationItemLevelTiming": { + "offset": 50000000, + "duration": 60000000 + } + } + ] + } + ] + }, + "tasks": [ + { + "taskName": "Conversation Summarization Task 1", + "kind": "ConversationalSummarizationTask", + "parameters": { + "summaryAspects": [ + "chapterTitle", + "narrative" + ] + } + } + ] + } + }, + "responses": { + "202": { + "headers": { + "Operation-Location": "{Endpoint}/language/analyze-conversation/jobs/{jobId}?api-version=2023-11-15-preview" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulConversationSummarySubmit.json b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulConversationSummarySubmit.json new file mode 100644 index 000000000000..1d06f87a2bed --- /dev/null +++ b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulConversationSummarySubmit.json @@ -0,0 +1,63 @@ +{ + "operationId": "AnalyzeConversationsSubmitJob", + "title": "SuccessfulConversationSummarySubmit", + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "api-version": "2023-11-15-preview", + "Endpoint": "{Endpoint}", + "jobId": "{Job ID}", + "body": { + "displayName": "Analyze conversations from Contoso meeting", + "analysisInput": { + "conversations": [ + { + "id": "20220101meeting", + "language": "en", + "modality": "text", + "domain": "generic", + "conversationItems": [ + { + "participantId": "user", + "role": "customer", + "id": "1", + "text": "Hi!" + }, + { + "participantId": "agent", + "role": "agent", + "id": "2", + "text": "Hello, how can I help you?" + }, + { + "participantId": "user", + "role": "customer", + "id": "3", + "text": "I am having trouble issuing a return of a game on my xbox: call of duty" + } + ] + } + ] + }, + "tasks": [ + { + "taskName": "analyze 1", + "kind": "ConversationalSummarizationTask", + "parameters": { + "modelVersion": "latest", + "summaryAspects": [ + "issue", + "resolution" + ] + } + } + ] + } + }, + "responses": { + "202": { + "headers": { + "Operation-Location": "{Endpoint}/language/analyze-conversation/jobs/{jobId}?api-version=2023-11-15-preview" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulCustomAbstractiveSummarizationTaskResult.json b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulCustomAbstractiveSummarizationTaskResult.json new file mode 100644 index 000000000000..0d5cd7d359e3 --- /dev/null +++ b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulCustomAbstractiveSummarizationTaskResult.json @@ -0,0 +1,59 @@ +{ + "operationId": "AnalyzeTextJobStatus", + "title": "SuccessfulCustomAbstractiveSummarizationTaskResult", + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "api-version": "2023-11-15-preview", + "Endpoint": "{Endpoint}", + "jobId": "c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "createdDateTime": "2020-10-01T15:00:45Z", + "displayName": "Document Custom Abstractive Summarization Task Example", + "expirationDateTime": "2020-10-03T15:01:03Z", + "jobId": "c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18", + "lastUpdatedDateTime": "2020-10-01T15:01:03Z", + "status": "succeeded", + "tasks": { + "completed": 1, + "failed": 0, + "inProgress": 0, + "total": 1, + "items": [ + { + "kind": "CustomAbstractiveSummarizationLROResults", + "taskName": "Custom Document Abstractive Summarization Task 1", + "lastUpdateDateTime": "2020-10-01T15:01:03Z", + "status": "succeeded", + "results": { + "documents": [ + { + "summaries": [ + { + "text": "Microsoft have been on a quest to advance AI beyond existing techniques.", + "contexts": [ + { + "offset": 0, + "length": 1629 + } + ] + } + ], + "id": "1", + "warnings": [] + } + ], + "errors": [], + "projectName": "my_project", + "deploymentName": "my_deployment" + } + } + ] + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulCustomAbstractiveSummarizationTaskSubmit.json b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulCustomAbstractiveSummarizationTaskSubmit.json new file mode 100644 index 000000000000..a0bd2f5721cd --- /dev/null +++ b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulCustomAbstractiveSummarizationTaskSubmit.json @@ -0,0 +1,39 @@ +{ + "operationId": "AnalyzeTextSubmitJob", + "title": "SuccessfulCustomAbstractiveSummarizationTaskSubmit", + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "api-version": "2023-11-15-preview", + "Endpoint": "{Endpoint}", + "jobId": "{Job ID}", + "body": { + "displayName": "Document Custom Abstractive Summarization Task Example", + "analysisInput": { + "documents": [ + { + "id": "1", + "language": "en", + "text": "At Microsoft, we have been on a quest to advance AI beyond existing techniques, by taking a more holistic, human-centric approach to learning and understanding. As Chief Technology Officer of Azure AI Cognitive Services, I have been working with a team of amazing scientists and engineers to turn this quest into a reality. In my role, I enjoy a unique perspective in viewing the relationship among three attributes of human cognition: monolingual text (X), audio or visual sensory signals, (Y) and multilingual (Z). At the intersection of all three, there is magic—what we call XYZ-code as illustrated in Figure 1—a joint representation to create more powerful AI that can speak, hear, see, and understand humans better. We believe XYZ-code will enable us to fulfill our long-term vision: cross-domain transfer learning, spanning modalities and languages. The goal is to have pre-trained models that can jointly learn representations to support a broad range of downstream AI tasks, much in the way humans do today. Over the past five years, we have achieved human performance on benchmarks in conversational speech recognition, machine translation, conversational question answering, machine reading comprehension, and image captioning. These five breakthroughs provided us with strong signals toward our more ambitious aspiration to produce a leap in AI capabilities, achieving multi-sensory and multilingual learning that is closer in line with how humans learn and understand. I believe the joint XYZ-code is a foundational component of this aspiration, if grounded with external knowledge sources in the downstream AI tasks." + } + ] + }, + "tasks": [ + { + "kind": "CustomAbstractiveSummarization", + "taskName": "Custom Document Abstractive Summarization Task 1", + "parameters": { + "projectName": "my_project", + "deploymentName": "my_deployment" + } + } + ] + } + }, + "responses": { + "202": { + "headers": { + "Operation-Location": "{endpoint}/language/analyze-text/jobs/{jobId}?api-version=2023-11-15-preview" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulCustomConversationSummarizationTaskResult.json b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulCustomConversationSummarizationTaskResult.json new file mode 100644 index 000000000000..5ce4948fe18d --- /dev/null +++ b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulCustomConversationSummarizationTaskResult.json @@ -0,0 +1,66 @@ +{ + "operationId": "AnalyzeConversationsJobStatus", + "title": "SuccessfulCustomConversationSummarizationTaskResult", + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "api-version": "2023-11-15-preview", + "Endpoint": "{Endpoint}", + "jobId": "3e9e8518-492f-47f9-abd1-9a7468231086" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "displayName": "Custom Conversation Summarization Example", + "createdDateTime": "2022-04-01T15:00:45Z", + "expirationDateTime": "2022-04-02T15:00:45Z", + "jobId": "3e9e8518-492f-47f9-abd1-9a7468231086", + "lastUpdatedDateTime": "2022-04-01T15:00:49Z", + "status": "succeeded", + "tasks": { + "completed": 1, + "failed": 0, + "inProgress": 0, + "total": 1, + "items": [ + { + "kind": "CustomConversationalSummarizationResults", + "lastUpdateDateTime": "2022-04-01T15:00:49Z", + "taskName": "Custom Conversation Summarization Task 1", + "status": "succeeded", + "results": { + "conversations": [ + { + "id": "1", + "summaries": [ + { + "aspect": "narrative", + "text": "Speaker 3 believes there are 3 remaining bugs.", + "contexts": [ + { + "conversationItemId": "2", + "offset": 4, + "length": 39 + }, + { + "conversationItemId": "3", + "offset": 0, + "length": 7 + } + ] + } + ], + "warnings": [] + } + ], + "errors": [], + "projectName": "my_project", + "deploymentName": "my_deployment" + } + } + ] + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulCustomConversationSummarizationTaskSubmit.json b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulCustomConversationSummarizationTaskSubmit.json new file mode 100644 index 000000000000..d68630c0ab7e --- /dev/null +++ b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulCustomConversationSummarizationTaskSubmit.json @@ -0,0 +1,80 @@ +{ + "operationId": "AnalyzeConversationsSubmitJob", + "title": "SuccessfulCustomConversationSummarizationTaskSubmit", + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "api-version": "2023-11-15-preview", + "Endpoint": "{Endpoint}", + "jobId": "{Job ID}", + "body": { + "displayName": "Custom Conversation Summarization Example", + "analysisInput": { + "conversations": [ + { + "id": "1", + "language": "en", + "modality": "transcript", + "conversationItems": [ + { + "participantId": "speaker 1", + "id": "1", + "text": "Let's get started.", + "lexical": "", + "itn": "", + "maskedItn": "", + "conversationItemLevelTiming": { + "offset": 0, + "duration": 20000000 + } + }, + { + "participantId": "speaker 2", + "id": "2", + "text": "OK. How many remaining bugs do we have now?", + "lexical": "", + "itn": "", + "maskedItn": "", + "conversationItemLevelTiming": { + "offset": 20000000, + "duration": 50000000 + } + }, + { + "participantId": "speaker 3", + "id": "3", + "text": "Only 3.", + "lexical": "", + "itn": "", + "maskedItn": "", + "conversationItemLevelTiming": { + "offset": 50000000, + "duration": 60000000 + } + } + ] + } + ] + }, + "tasks": [ + { + "taskName": "Custom Conversation Summarization Task 1", + "kind": "CustomConversationalSummarizationTask", + "parameters": { + "summaryAspects": [ + "narrative" + ], + "projectName": "my_project", + "deploymentName": "my_deployment" + } + } + ] + } + }, + "responses": { + "202": { + "headers": { + "Operation-Location": "{Endpoint}/language/analyze-conversation/jobs/{jobId}?api-version=2023-11-15-preview" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulCustomHealthcarePostRequest.json b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulCustomHealthcarePostRequest.json new file mode 100644 index 000000000000..2e74dfe4a218 --- /dev/null +++ b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulCustomHealthcarePostRequest.json @@ -0,0 +1,36 @@ +{ + "operationId": "AnalyzeTextSubmitJob", + "title": "SuccessfulCustomHealthcarePostRequest", + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "api-version": "2023-11-15-preview", + "Endpoint": "{Endpoint}", + "body": { + "analysisInput": { + "documents": [ + { + "text": "Prescribed 100mg ibuprofen, taken twice daily.", + "id": "1", + "language": "en" + } + ] + }, + "tasks": [ + { + "kind": "CustomHealthcare", + "parameters": { + "projectName": "{PROJECT-NAME}", + "deploymentName": "{DEPLOYMENT-NAME}" + } + } + ] + } + }, + "responses": { + "202": { + "headers": { + "Operation-Location": "{Endpoint}/language/analyze-text/jobs/{jobId}?api-version=2023-04-01" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulCustomHealthcareTaskStatusRequest.json b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulCustomHealthcareTaskStatusRequest.json new file mode 100644 index 000000000000..5aad4f328e53 --- /dev/null +++ b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulCustomHealthcareTaskStatusRequest.json @@ -0,0 +1,253 @@ +{ + "operationId": "AnalyzeTextJobStatus", + "title": "SuccessfulCustomHealthcareTaskStatusRequest", + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "api-version": "2023-11-15-preview", + "Endpoint": "{Endpoint}", + "jobId": "1780194a-e9c1-4298-b0d4-fdc59ba818a0" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "createdDateTime": "2022-07-20T18:43:35Z", + "displayName": "Extracting Custom Health Entities", + "expirationDateTime": "2022-07-21T18:43:35Z", + "jobId": "1780194a-e9c1-4298-b0d4-fdc59ba818a0", + "lastUpdatedDateTime": "2022-07-20T18:43:36Z", + "status": "succeeded", + "tasks": { + "completed": 1, + "failed": 0, + "inProgress": 0, + "total": 1, + "items": [ + { + "kind": "CustomHealthcareLROResults", + "lastUpdateDateTime": "2022-07-20T18:43:36.7159045Z", + "status": "succeeded", + "results": { + "documents": [ + { + "id": "1", + "entities": [ + { + "offset": 11, + "length": 5, + "text": "100mg", + "category": "Dosage", + "confidenceScore": 0.98, + "entityComponentInformation": [ + { + "entityComponentKind": "PrebuiltComponent", + "value": "Dosage.Prebuilt" + }, + { + "entityComponentKind": "ListComponent", + "value": "ListKey" + } + ] + }, + { + "offset": 17, + "length": 9, + "text": "ibuprofen", + "category": "MedicationName", + "confidenceScore": 1, + "name": "ibuprofen", + "entityComponentInformation": [ + { + "entityComponentKind": "ListComponent", + "value": "ListKey" + } + ] + }, + { + "offset": 34, + "length": 11, + "text": "twice daily", + "category": "Frequency", + "confidenceScore": 1, + "entityComponentInformation": [ + { + "entityComponentKind": "LearnedComponent", + "value": "Frequency.Learned" + } + ] + }, + { + "offset": 17, + "length": 9, + "text": "ibuprofen", + "category": "MedicationName", + "confidenceScore": 1, + "name": "ibuprofen", + "links": [ + { + "dataSource": "UMLS", + "id": "C0020740" + }, + { + "dataSource": "AOD", + "id": "0000019879" + }, + { + "dataSource": "ATC", + "id": "M01AE01" + }, + { + "dataSource": "CCPSS", + "id": "0046165" + }, + { + "dataSource": "CHV", + "id": "0000006519" + }, + { + "dataSource": "CSP", + "id": "2270-2077" + }, + { + "dataSource": "DRUGBANK", + "id": "DB01050" + }, + { + "dataSource": "GS", + "id": "1611" + }, + { + "dataSource": "LCH_NW", + "id": "sh97005926" + }, + { + "dataSource": "LNC", + "id": "LP16165-0" + }, + { + "dataSource": "MEDCIN", + "id": "40458" + }, + { + "dataSource": "MMSL", + "id": "d00015" + }, + { + "dataSource": "MSH", + "id": "D007052" + }, + { + "dataSource": "MTHSPL", + "id": "WK2XYI10QM" + }, + { + "dataSource": "NCI", + "id": "C561" + }, + { + "dataSource": "NCI_CTRP", + "id": "C561" + }, + { + "dataSource": "NCI_DCP", + "id": "00803" + }, + { + "dataSource": "NCI_DTP", + "id": "NSC0256857" + }, + { + "dataSource": "NCI_FDA", + "id": "WK2XYI10QM" + }, + { + "dataSource": "NCI_NCI-GLOSS", + "id": "CDR0000613511" + }, + { + "dataSource": "NDDF", + "id": "002377" + }, + { + "dataSource": "PDQ", + "id": "CDR0000040475" + }, + { + "dataSource": "RCD", + "id": "x02MO" + }, + { + "dataSource": "RXNORM", + "id": "5640" + }, + { + "dataSource": "SNM", + "id": "E-7772" + }, + { + "dataSource": "SNMI", + "id": "C-603C0" + }, + { + "dataSource": "SNOMEDCT_US", + "id": "387207008" + }, + { + "dataSource": "USP", + "id": "m39860" + }, + { + "dataSource": "USPMG", + "id": "MTHU000060" + }, + { + "dataSource": "VANDF", + "id": "4017840" + } + ] + } + ], + "relations": [ + { + "confidenceScore": 1, + "relationType": "DosageOfMedication", + "entities": [ + { + "ref": "#/results/documents/0/entities/0", + "role": "Dosage" + }, + { + "ref": "#/results/documents/0/entities/1", + "role": "Medication" + } + ] + }, + { + "confidenceScore": 1, + "relationType": "FrequencyOfMedication", + "entities": [ + { + "ref": "#/results/documents/0/entities/1", + "role": "Medication" + }, + { + "ref": "#/results/documents/0/entities/2", + "role": "Frequency" + } + ] + } + ], + "warnings": [] + } + ], + "errors": [], + "projectName": "{PROJECT-NAME}", + "deploymentName": "{DEPLOYMENT-NAME}" + } + } + ] + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulCustomSentimentAnalysisTaskStatusRequest.json b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulCustomSentimentAnalysisTaskStatusRequest.json new file mode 100644 index 000000000000..ba54c1a8da56 --- /dev/null +++ b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulCustomSentimentAnalysisTaskStatusRequest.json @@ -0,0 +1,77 @@ +{ + "operationId": "AnalyzeTextJobStatus", + "title": "SuccessfulCustomSentimentAnalysisTaskStatusRequest", + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "api-version": "2023-11-15-preview", + "Endpoint": "{Endpoint}", + "jobId": "29fe5bb0-83ae-4f86-85d6-775534dcd2d4" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "createdDateTime": "2023-02-05T20:45:15Z", + "displayName": "Custom Sentiment Analysis Job", + "expirationDateTime": "2023-02-06T20:45:15Z", + "jobId": "29fe5bb0-83ae-4f86-85d6-775534dcd2d4", + "lastUpdatedDateTime": "2023-02-05T20:46:05Z", + "status": "succeeded", + "tasks": { + "completed": 1, + "failed": 0, + "inProgress": 0, + "total": 1, + "items": [ + { + "kind": "CustomSentimentAnalysisLROResults", + "lastUpdateDateTime": "2023-02-05T20:46:05Z", + "status": "succeeded", + "results": { + "documents": [ + { + "id": "1", + "sentiment": "mixed", + "confidenceScores": { + "positive": 0.5, + "neutral": 0.0, + "negative": 0.5 + }, + "sentences": [ + { + "sentiment": "positive", + "confidenceScores": { + "positive": 1.0, + "neutral": 0.0, + "negative": 0.0 + }, + "offset": 0, + "length": 19, + "text": "The food is great. " + }, + { + "sentiment": "negative", + "confidenceScores": { + "positive": 0.0, + "neutral": 0.0, + "negative": 1.0 + }, + "offset": 19, + "length": 23, + "text": "But the service is bad." + } + ], + "warnings": [] + } + ], + "errors": [], + "projectName": "{PROJECT-NAME}", + "deploymentName": "{DEPLOYMENT-NAME}" + } + } + ] + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulCustomSentimentAnalysisTaskSubmit.json b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulCustomSentimentAnalysisTaskSubmit.json new file mode 100644 index 000000000000..97ac2e0bb333 --- /dev/null +++ b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulCustomSentimentAnalysisTaskSubmit.json @@ -0,0 +1,36 @@ +{ + "operationId": "AnalyzeTextSubmitJob", + "title": "SuccessfulCustomSentimentAnalysisTaskSubmit", + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "api-version": "2023-11-15-preview", + "Endpoint": "{Endpoint}", + "body": { + "analysisInput": { + "documents": [ + { + "text": "The food is great. But the service is bad.", + "id": "1", + "language": "en" + } + ] + }, + "tasks": [ + { + "kind": "CustomSentimentAnalysis", + "parameters": { + "projectName": "{PROJECT-NAME}", + "deploymentName": "{DEPLOYMENT-NAME}" + } + } + ] + } + }, + "responses": { + "202": { + "headers": { + "Operation-Location": "{Endpoint}/language/analyze-text/jobs/{jobId}?api-version=2023-11-15-preview" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulDynamicClassificationRequest.json b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulDynamicClassificationRequest.json new file mode 100644 index 000000000000..663e1e4802fd --- /dev/null +++ b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulDynamicClassificationRequest.json @@ -0,0 +1,94 @@ +{ + "operationId": "AnalyzeText", + "title": "SuccessfulDynamicClassificationRequest", + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "api-version": "2023-11-15-preview", + "Endpoint": "{Endpoint}", + "body": { + "kind": "DynamicClassification", + "parameters": { + "categories": [ + "Health", + "Politics", + "Music", + "Sports" + ], + "classificationType": "Multi", + "modelVersion": "latest" + }, + "analysisInput": { + "documents": [ + { + "id": "1", + "language": "en", + "text": "The WHO is issuing a warning about Monkey Pox." + }, + { + "id": "2", + "language": "en", + "text": "Mo Salah plays in Liverpool FC in England." + } + ] + } + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "kind": "DynamicClassificationResults", + "results": { + "documents": [ + { + "id": "1", + "classifications": [ + { + "category": "Health", + "confidenceScore": 0.9 + }, + { + "category": "Politics", + "confidenceScore": 0.8 + }, + { + "category": "Music", + "confidenceScore": 0.7 + }, + { + "category": "Sports", + "confidenceScore": 0.6 + } + ], + "warnings": [] + }, + { + "id": "2", + "classifications": [ + { + "category": "Health", + "confidenceScore": 0.9 + }, + { + "category": "Politics", + "confidenceScore": 0.8 + }, + { + "category": "Music", + "confidenceScore": 0.7 + }, + { + "category": "Sports", + "confidenceScore": 0.6 + } + ], + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2023-11-15-preview" + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulEntityLinkingRequest.json b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulEntityLinkingRequest.json new file mode 100644 index 000000000000..84ec86e75e19 --- /dev/null +++ b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulEntityLinkingRequest.json @@ -0,0 +1,130 @@ +{ + "operationId": "AnalyzeText", + "title": "SuccessfulEntityLinkingRequest", + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "api-version": "2023-11-15-preview", + "Endpoint": "{Endpoint}", + "body": { + "kind": "EntityLinking", + "parameters": { + "modelVersion": "latest" + }, + "analysisInput": { + "documents": [ + { + "id": "1", + "language": "en", + "text": "Microsoft was founded by Bill Gates and Paul Allen." + }, + { + "id": "2", + "language": "en", + "text": "Pike place market is my favorite Seattle attraction." + } + ] + } + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "kind": "EntityLinkingResults", + "results": { + "documents": [ + { + "entities": [ + { + "dataSource": "Wikipedia", + "id": "Bill Gates", + "language": "en", + "matches": [ + { + "confidenceScore": 0.52, + "length": 10, + "offset": 25, + "text": "Bill Gates" + } + ], + "name": "Bill Gates", + "url": "https://en.wikipedia.org/wiki/Bill_Gates" + }, + { + "dataSource": "Wikipedia", + "id": "Paul Allen", + "language": "en", + "matches": [ + { + "confidenceScore": 0.54, + "length": 10, + "offset": 40, + "text": "Paul Allen" + } + ], + "name": "Paul Allen", + "url": "https://en.wikipedia.org/wiki/Paul_Allen" + }, + { + "dataSource": "Wikipedia", + "id": "Microsoft", + "language": "en", + "matches": [ + { + "confidenceScore": 0.49, + "length": 9, + "offset": 0, + "text": "Microsoft" + } + ], + "name": "Microsoft", + "url": "https://en.wikipedia.org/wiki/Microsoft" + } + ], + "id": "1", + "warnings": [] + }, + { + "entities": [ + { + "dataSource": "Wikipedia", + "id": "Pike Place Market", + "language": "en", + "matches": [ + { + "confidenceScore": 0.86, + "length": 17, + "offset": 0, + "text": "Pike place market" + } + ], + "name": "Pike Place Market", + "url": "https://en.wikipedia.org/wiki/Pike_Place_Market" + }, + { + "dataSource": "Wikipedia", + "id": "Seattle", + "language": "en", + "matches": [ + { + "confidenceScore": 0.27, + "length": 7, + "offset": 33, + "text": "Seattle" + } + ], + "name": "Seattle", + "url": "https://en.wikipedia.org/wiki/Seattle" + } + ], + "id": "2", + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2020-02-01" + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulEntityRecognitionExclusionRequest.json b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulEntityRecognitionExclusionRequest.json new file mode 100644 index 000000000000..cac5bd86bd13 --- /dev/null +++ b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulEntityRecognitionExclusionRequest.json @@ -0,0 +1,136 @@ +{ + "operationId": "AnalyzeText", + "title": "SuccessfulEntityRecognitionExclusionRequest", + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "api-version": "2023-11-15-preview", + "Endpoint": "{Endpoint}", + "body": { + "kind": "EntityRecognition", + "parameters": { + "modelVersion": "latest", + "exclusionList": [ + "Numeric" + ], + "overlapPolicy": { + "policyKind": "allowOverlap" + } + }, + "analysisInput": { + "documents": [ + { + "id": "2", + "language": "en", + "text": "When I was 5 years old I had $90.00 dollars to my name." + }, + { + "id": "3", + "language": "en", + "text": "When we flew from LAX it seemed like we were moving at 10 meters per second. I was lucky to see Amsterdam, Effile Tower, and the Nile." + } + ] + } + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "kind": "EntityRecognitionResults", + "results": { + "documents": [ + { + "entities": [], + "id": "2", + "warnings": [] + }, + { + "entities": [ + { + "text": "LAX", + "category": "Location", + "type": "Airport", + "offset": 18, + "length": 3, + "confidenceScore": 0.72, + "tags": [ + { + "name": "Location", + "confidenceScore": 0.9 + }, + { + "name": "Structural", + "confidenceScore": 0.72 + } + ] + }, + { + "text": "Amsterdam", + "category": "Location", + "type": "City", + "offset": 96, + "length": 9, + "confidenceScore": 0.8, + "tags": [ + { + "name": "Location", + "confidenceScore": 0.84 + }, + { + "name": "GPE", + "confidenceScore": 0.84 + }, + { + "name": "City", + "confidenceScore": 0.8 + } + ] + }, + { + "text": "Eiffel Tower", + "category": "Location", + "type": "Structural", + "offset": 107, + "length": 12, + "confidenceScore": 0.9, + "tags": [ + { + "name": "Location", + "confidenceScore": 0.9 + }, + { + "name": "Structural", + "confidenceScore": 0.9 + } + ] + }, + { + "text": "Nile", + "category": "Location", + "type": "Geological", + "offset": 129, + "length": 4, + "confidenceScore": 0.63, + "tags": [ + { + "name": "Location", + "confidenceScore": 0.9 + }, + { + "name": "Geological", + "confidenceScore": 0.63 + } + ] + } + ], + "id": "3", + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2021-06-01" + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulEntityRecognitionInclusionRequest.json b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulEntityRecognitionInclusionRequest.json new file mode 100644 index 000000000000..795ecd40a390 --- /dev/null +++ b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulEntityRecognitionInclusionRequest.json @@ -0,0 +1,133 @@ +{ + "operationId": "AnalyzeText", + "title": "SuccessfulEntityRecognitionInclusionRequest", + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "api-version": "2023-11-15-preview", + "Endpoint": "{Endpoint}", + "body": { + "kind": "EntityRecognition", + "parameters": { + "modelVersion": "latest", + "inclusionList": [ + "Location" + ] + }, + "analysisInput": { + "documents": [ + { + "id": "2", + "language": "en", + "text": "When I was 5 years old I had $90.00 dollars to my name." + }, + { + "id": "3", + "language": "en", + "text": "When we flew from LAX it seemed like we were moving at 10 meters per second. I was lucky to see Amsterdam, Effile Tower, and the Nile." + } + ] + } + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "kind": "EntityRecognitionResults", + "results": { + "documents": [ + { + "entities": [], + "id": "2", + "warnings": [] + }, + { + "entities": [ + { + "text": "LAX", + "category": "Location", + "type": "Structural", + "offset": 18, + "length": 3, + "confidenceScore": 0.72, + "tags": [ + { + "name": "Location", + "confidenceScore": 0.9 + }, + { + "name": "Structural", + "confidenceScore": 0.72 + } + ] + }, + { + "text": "Amsterdam", + "category": "Location", + "type": "City", + "offset": 96, + "length": 9, + "confidenceScore": 0.8, + "tags": [ + { + "name": "Location", + "confidenceScore": 0.84 + }, + { + "name": "GPE", + "confidenceScore": 0.84 + }, + { + "name": "City", + "confidenceScore": 0.8 + } + ] + }, + { + "text": "Eiffel Tower", + "category": "Location", + "type": "Structural", + "offset": 107, + "length": 12, + "confidenceScore": 0.9, + "tags": [ + { + "name": "Location", + "confidenceScore": 0.9 + }, + { + "name": "Structural", + "confidenceScore": 0.9 + } + ] + }, + { + "text": "Nile", + "category": "Location", + "type": "Geological", + "offset": 129, + "length": 4, + "confidenceScore": 0.63, + "tags": [ + { + "name": "Location", + "confidenceScore": 0.9 + }, + { + "name": "Geological", + "confidenceScore": 0.63 + } + ] + } + ], + "id": "3", + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2021-06-01" + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulEntityRecognitionInferenceOptionsRequest.json b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulEntityRecognitionInferenceOptionsRequest.json new file mode 100644 index 000000000000..1c41651f7fd7 --- /dev/null +++ b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulEntityRecognitionInferenceOptionsRequest.json @@ -0,0 +1,83 @@ +{ + "operationId": "AnalyzeText", + "title": "SuccessfulEntityRecognitionInferenceOptionsRequest", + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "api-version": "2023-11-15-preview", + "Endpoint": "{Endpoint}", + "body": { + "kind": "EntityRecognition", + "parameters": { + "modelVersion": "latest", + "inferenceOptions": { + "excludeNormalizedValues": true + } + }, + "analysisInput": { + "documents": [ + { + "id": "1", + "language": "en", + "text": "When I was 5 years old I had $90.00 dollars to my name." + } + ] + } + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "kind": "EntityRecognitionResults", + "results": { + "documents": [ + { + "entities": [ + { + "text": "5 years old", + "category": "Numeric", + "type": "Age", + "offset": 11, + "length": 11, + "confidenceScore": 0.99, + "tags": [ + { + "name": "Numeric", + "confidenceScore": 0.99 + }, + { + "name": "Age", + "confidenceScore": 0.99 + } + ] + }, + { + "text": "$90.00", + "category": "Numeric", + "type": "Currency", + "offset": 29, + "length": 14, + "confidenceScore": 0.99, + "tags": [ + { + "name": "Numeric", + "confidenceScore": 0.99 + }, + { + "name": "Currency", + "confidenceScore": 0.99 + } + ] + } + ], + "id": "1", + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2023-09-01" + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulEntityRecognitionOverlapPolicy.json b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulEntityRecognitionOverlapPolicy.json new file mode 100644 index 000000000000..f4b9483687a7 --- /dev/null +++ b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulEntityRecognitionOverlapPolicy.json @@ -0,0 +1,79 @@ +{ + "operationId": "AnalyzeText", + "title": "SuccessfulEntityRecognitionOverlapPolicy", + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "api-version": "2023-11-15-preview", + "Endpoint": "{Endpoint}", + "body": { + "kind": "EntityRecognition", + "parameters": { + "modelVersion": "latest", + "overlapPolicy": { + "policyKind": "matchLongest" + } + }, + "analysisInput": { + "documents": [ + { + "id": "4", + "language": "en", + "text": "25th April Meeting was an intresting one. At least we gont to experience the WorldCup" + } + ] + } + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "kind": "EntityRecognitionResults", + "results": { + "documents": [ + { + "entities": [ + { + "text": "25th April Meeting", + "category": "Event", + "type": "Event", + "offset": 0, + "length": 18, + "confidenceScore": 0.59, + "tags": [ + { + "name": "Event", + "confidenceScore": 0.59 + } + ] + }, + { + "text": "Worldcup", + "category": "Event", + "type": "SportsEvent", + "offset": 0, + "length": 8, + "confidenceScore": 0.51, + "tags": [ + { + "name": "Event", + "confidenceScore": 0.55 + }, + { + "name": "SportsEvent", + "confidenceScore": 0.51 + } + ] + } + ], + "id": "4", + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2021-06-01" + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulEntityRecognitionRequest.json b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulEntityRecognitionRequest.json new file mode 100644 index 000000000000..52308cb8f401 --- /dev/null +++ b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulEntityRecognitionRequest.json @@ -0,0 +1,339 @@ +{ + "operationId": "AnalyzeText", + "title": "SuccessfulEntityRecognitionRequest", + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "api-version": "2023-11-15-preview", + "Endpoint": "{Endpoint}", + "body": { + "kind": "EntityRecognition", + "parameters": { + "modelVersion": "latest", + "overlapPolicy": { + "policyKind": "allowOverlap" + } + }, + "analysisInput": { + "documents": [ + { + "id": "2", + "language": "en", + "text": "When I was 5 years old I had $90.00 dollars to my name." + }, + { + "id": "3", + "language": "en", + "text": "When we flew from LAX it seemed like we were moving at 10 meters per second. I was lucky to see Amsterdam, Effile Tower, and the Nile." + }, + { + "id": "4", + "language": "en", + "text": "25th April Meeting was an intresting one. At least we gont to experience the WorldCup" + }, + { + "id": "5", + "language": "en", + "text": "My IP is 127.12.1.1 and my phone number is 5555555555" + } + ] + } + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "kind": "EntityRecognitionResults", + "results": { + "documents": [ + { + "entities": [ + { + "text": "5 years old", + "category": "Numeric", + "type": "Age", + "offset": 11, + "length": 11, + "confidenceScore": 0.99, + "tags": [ + { + "name": "Numeric", + "confidenceScore": 0.99 + }, + { + "name": "Age", + "confidenceScore": 0.99 + } + ], + "metadata": { + "metadataKind": "AgeMetadata", + "unit": "Year", + "value": 5.0 + } + }, + { + "text": "$90.00", + "category": "Numeric", + "type": "Currency", + "offset": 29, + "length": 14, + "confidenceScore": 0.99, + "tags": [ + { + "name": "Numeric", + "confidenceScore": 0.99 + }, + { + "name": "Currency", + "confidenceScore": 0.99 + } + ], + "metadata": { + "metadataKind": "CurrencyMetadata", + "unit": "Dollar", + "iso4217": "USD", + "value": 90.0 + } + } + ], + "id": "2", + "warnings": [] + }, + { + "entities": [ + { + "text": "LAX", + "category": "Location", + "type": "Structural", + "offset": 18, + "length": 3, + "confidenceScore": 0.72, + "tags": [ + { + "name": "Location", + "confidenceScore": 0.9 + }, + { + "name": "Structural", + "confidenceScore": 0.72 + } + ] + }, + { + "text": "10 meters per second", + "category": "Numeric", + "type": "Speed", + "offset": 55, + "length": 20, + "confidenceScore": 0.8, + "tags": [ + { + "name": "Dimension", + "confidenceScore": 0.84 + }, + { + "name": "Numeric", + "confidenceScore": 0.84 + }, + { + "name": "Speed", + "confidenceScore": 0.8 + } + ], + "metadata": { + "metadataKind": "SpeedMetadata", + "unit": "MetersPerSecond", + "value": 10.0 + } + }, + { + "text": "Amsterdam", + "category": "Location", + "type": "City", + "offset": 96, + "length": 9, + "confidenceScore": 0.8, + "tags": [ + { + "name": "Location", + "confidenceScore": 0.84 + }, + { + "name": "GPE", + "confidenceScore": 0.84 + }, + { + "name": "City", + "confidenceScore": 0.8 + } + ] + }, + { + "text": "Eiffel Tower", + "category": "Location", + "type": "Structural", + "offset": 107, + "length": 12, + "confidenceScore": 0.9, + "tags": [ + { + "name": "Location", + "confidenceScore": 0.9 + }, + { + "name": "Structural", + "confidenceScore": 0.9 + } + ] + }, + { + "text": "Nile", + "category": "Location", + "type": "Geological", + "offset": 129, + "length": 4, + "confidenceScore": 0.63, + "tags": [ + { + "name": "Location", + "confidenceScore": 0.9 + }, + { + "name": "Geological", + "confidenceScore": 0.63 + } + ] + } + ], + "id": "3", + "warnings": [] + }, + { + "entities": [ + { + "text": "25th April", + "category": "Temporal", + "type": "Date", + "offset": 0, + "length": 10, + "confidenceScore": 0.58, + "tags": [ + { + "name": "Temporal", + "confidenceScore": 0.9 + }, + { + "name": "Date", + "confidenceScore": 0.58 + } + ], + "metadata": { + "metadataKind": "DateMetadata", + "dateValues": [ + { + "timex": "XXXX-04-25", + "value": "2022-04-25" + }, + { + "timex": "XXXX-04-25", + "value": "2023-04-25" + } + ] + } + }, + { + "text": "25th April Meeting", + "category": "Event", + "type": "Event", + "offset": 0, + "length": 18, + "confidenceScore": 0.55, + "tags": [ + { + "name": "Event", + "confidenceScore": 0.55 + } + ] + }, + { + "text": "25th April Meeting", + "category": "Event", + "type": "CulturalEvent", + "offset": 0, + "length": 18, + "confidenceScore": 0.55, + "tags": [ + { + "name": "Event", + "confidenceScore": 0.55 + }, + { + "name": "CulturalEvent", + "confidenceScore": 0.55 + } + ] + }, + { + "text": "Worldcup", + "category": "Event", + "type": "SportsEvent", + "offset": 0, + "length": 8, + "confidenceScore": 0.51, + "tags": [ + { + "name": "Event", + "confidenceScore": 0.55 + }, + { + "name": "SportsEvent", + "confidenceScore": 0.51 + } + ] + } + ], + "id": "4", + "warnings": [] + }, + { + "entities": [ + { + "text": "127.12.1.1", + "category": "IP", + "type": "IP", + "offset": 9, + "length": 10, + "confidenceScore": 0.8, + "tags": [ + { + "name": "IP", + "confidenceScore": 0.8 + } + ] + }, + { + "text": "5555555555", + "category": "PhoneNumber", + "type": "PhoneNumber", + "offset": 45, + "length": 9, + "confidenceScore": 0.8, + "tags": [ + { + "name": "PhoneNumber", + "confidenceScore": 0.8 + } + ] + } + ], + "id": "5", + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2021-06-01" + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulHealthcareDocumentTypePostRequest.json b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulHealthcareDocumentTypePostRequest.json new file mode 100644 index 000000000000..c264abd4fb2a --- /dev/null +++ b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulHealthcareDocumentTypePostRequest.json @@ -0,0 +1,38 @@ +{ + "operationId": "AnalyzeTextSubmitJob", + "title": "SuccessfulHealthcareDocumentTypePostRequest", + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "api-version": "2023-11-15-preview", + "Endpoint": "{Endpoint}", + "jobId": "{Job ID}", + "body": { + "analysisInput": { + "documents": [ + { + "text": "Prescribed 100mg ibuprofen, taken twice daily.", + "id": "1", + "language": "en" + } + ] + }, + "tasks": [ + { + "kind": "Healthcare", + "parameters": { + "modelVersion": "latest", + "fhirVersion": "4.0.1", + "documentType": "DischargeSummary" + } + } + ] + } + }, + "responses": { + "202": { + "headers": { + "Operation-Location": "{Endpoint}/language/analyze-text/jobs/{jobId}?api-version=2023-11-15-preview" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulHealthcareDocumentTypeTaskStatusRequest.json b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulHealthcareDocumentTypeTaskStatusRequest.json new file mode 100644 index 000000000000..8f4eb4add2d5 --- /dev/null +++ b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulHealthcareDocumentTypeTaskStatusRequest.json @@ -0,0 +1,554 @@ +{ + "operationId": "AnalyzeTextJobStatus", + "title": "SuccessfulHealthcareDocumentTypeTaskStatusRequest", + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "api-version": "2023-11-15-preview", + "Endpoint": "{Endpoint}", + "jobId": "15e4a46b-62e2-4386-8d36-9c2a92bb45dd" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "createdDateTime": "2022-09-06T23:47:43Z", + "displayName": "Providing Document Type", + "expirationDateTime": "2022-09-07T23:47:43Z", + "jobId": "15e4a46b-62e2-4386-8d36-9c2a92bb45dd", + "lastUpdatedDateTime": "2022-09-06T23:48:10Z", + "status": "succeeded", + "errors": [], + "tasks": { + "completed": 1, + "failed": 0, + "inProgress": 0, + "total": 1, + "items": [ + { + "kind": "HealthcareLROResults", + "lastUpdateDateTime": "2022-09-06T23:48:10.1762027Z", + "status": "succeeded", + "results": { + "documents": [ + { + "id": "a", + "entities": [ + { + "offset": 11, + "length": 5, + "text": "100mg", + "category": "Dosage", + "confidenceScore": 0.98 + }, + { + "offset": 17, + "length": 9, + "text": "ibuprofen", + "category": "MedicationName", + "confidenceScore": 1.0, + "name": "ibuprofen", + "links": [ + { + "dataSource": "UMLS", + "id": "C0020740" + }, + { + "dataSource": "AOD", + "id": "0000019879" + }, + { + "dataSource": "ATC", + "id": "M01AE01" + }, + { + "dataSource": "CCPSS", + "id": "0046165" + }, + { + "dataSource": "CHV", + "id": "0000006519" + }, + { + "dataSource": "CSP", + "id": "2270-2077" + }, + { + "dataSource": "DRUGBANK", + "id": "DB01050" + }, + { + "dataSource": "GS", + "id": "1611" + }, + { + "dataSource": "LCH_NW", + "id": "sh97005926" + }, + { + "dataSource": "LNC", + "id": "LP16165-0" + }, + { + "dataSource": "MEDCIN", + "id": "40458" + }, + { + "dataSource": "MMSL", + "id": "d00015" + }, + { + "dataSource": "MSH", + "id": "D007052" + }, + { + "dataSource": "MTHSPL", + "id": "WK2XYI10QM" + }, + { + "dataSource": "NCI", + "id": "C561" + }, + { + "dataSource": "NCI_CTRP", + "id": "C561" + }, + { + "dataSource": "NCI_DCP", + "id": "00803" + }, + { + "dataSource": "NCI_DTP", + "id": "NSC0256857" + }, + { + "dataSource": "NCI_FDA", + "id": "WK2XYI10QM" + }, + { + "dataSource": "NCI_NCI-GLOSS", + "id": "CDR0000613511" + }, + { + "dataSource": "NDDF", + "id": "002377" + }, + { + "dataSource": "PDQ", + "id": "CDR0000040475" + }, + { + "dataSource": "RCD", + "id": "x02MO" + }, + { + "dataSource": "RXNORM", + "id": "5640" + }, + { + "dataSource": "SNM", + "id": "E-7772" + }, + { + "dataSource": "SNMI", + "id": "C-603C0" + }, + { + "dataSource": "SNOMEDCT_US", + "id": "387207008" + }, + { + "dataSource": "USP", + "id": "m39860" + }, + { + "dataSource": "USPMG", + "id": "MTHU000060" + }, + { + "dataSource": "VANDF", + "id": "4017840" + } + ] + }, + { + "offset": 34, + "length": 11, + "text": "twice daily", + "category": "Frequency", + "confidenceScore": 1.0 + } + ], + "relations": [ + { + "confidenceScore": 1.0, + "relationType": "DosageOfMedication", + "entities": [ + { + "ref": "#/results/documents/0/entities/0", + "role": "Dosage" + }, + { + "ref": "#/results/documents/0/entities/1", + "role": "Medication" + } + ] + }, + { + "confidenceScore": 1.0, + "relationType": "FrequencyOfMedication", + "entities": [ + { + "ref": "#/results/documents/0/entities/1", + "role": "Medication" + }, + { + "ref": "#/results/documents/0/entities/2", + "role": "Frequency" + } + ] + } + ], + "warnings": [], + "fhirBundle": { + "resourceType": "Bundle", + "id": "6ee4a7c0-5911-4c4b-bea2-3c2a1fe5c65f", + "meta": { + "profile": [ + "http://hl7.org/fhir/4.0.1/StructureDefinition/Bundle" + ] + }, + "identifier": { + "system": "urn:ietf:rfc:3986", + "value": "urn:uuid:6ee4a7c0-5911-4c4b-bea2-3c2a1fe5c65f" + }, + "type": "document", + "entry": [ + { + "fullUrl": "Composition/5bd33290-b92e-4aa5-becf-535578207946", + "resource": { + "resourceType": "Composition", + "id": "5bd33290-b92e-4aa5-becf-535578207946", + "status": "final", + "type": { + "coding": [ + { + "system": "http://loinc.org", + "code": "18842-5", + "display": "Discharge summary" + } + ], + "text": "Discharge summary" + }, + "subject": { + "reference": "Patient/efcccdf7-87f0-4061-b553-09fc11734594", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/76214457-f94c-4ccf-95ef-ab31e7232d63", + "type": "Encounter", + "display": "unknown" + }, + "date": "2022-09-06", + "author": [ + { + "reference": "Practitioner/bba2dee3-2eb3-4973-b4b9-62d498b17046", + "type": "Practitioner", + "display": "Unknown" + } + ], + "title": "Discharge summary", + "section": [ + { + "title": "General", + "code": { + "coding": [ + { + "system": "", + "display": "Unrecognized Section" + } + ], + "text": "General" + }, + "text": { + "status": "additional", + "div": "
\r\n\t\t\t\t\t\t\t

General

\r\n\t\t\t\t\t\t\t

Prescribed 100mg ibuprofen, taken twice daily.

\r\n\t\t\t\t\t
" + }, + "entry": [ + { + "reference": "List/6d743a3e-e7a2-4cee-a0b5-64361b6c93ad", + "type": "List", + "display": "General" + } + ] + } + ] + } + }, + { + "fullUrl": "Practitioner/bba2dee3-2eb3-4973-b4b9-62d498b17046", + "resource": { + "resourceType": "Practitioner", + "id": "bba2dee3-2eb3-4973-b4b9-62d498b17046", + "name": [ + { + "text": "Unknown", + "family": "Unknown" + } + ] + } + }, + { + "fullUrl": "Patient/efcccdf7-87f0-4061-b553-09fc11734594", + "resource": { + "resourceType": "Patient", + "id": "efcccdf7-87f0-4061-b553-09fc11734594", + "gender": "unknown" + } + }, + { + "fullUrl": "Encounter/76214457-f94c-4ccf-95ef-ab31e7232d63", + "resource": { + "resourceType": "Encounter", + "id": "76214457-f94c-4ccf-95ef-ab31e7232d63", + "meta": { + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/us-core-encounter" + ] + }, + "status": "finished", + "class": { + "system": "http://terminology.hl7.org/CodeSystem/v3-ActCode", + "display": "unknown" + }, + "subject": { + "reference": "Patient/efcccdf7-87f0-4061-b553-09fc11734594", + "type": "Patient" + }, + "period": { + "start": "2022-09-06", + "end": "2022-09-06" + } + } + }, + { + "fullUrl": "MedicationStatement/ac0264b6-63b7-4cf2-a7c3-f7340788aca7", + "resource": { + "resourceType": "MedicationStatement", + "id": "ac0264b6-63b7-4cf2-a7c3-f7340788aca7", + "extension": [ + { + "extension": [ + { + "url": "offset", + "valueInteger": 17 + }, + { + "url": "length", + "valueInteger": 9 + } + ], + "url": "http://hl7.org/fhir/StructureDefinition/derivation-reference" + } + ], + "status": "active", + "medicationCodeableConcept": { + "coding": [ + { + "system": "http://www.nlm.nih.gov/research/umls", + "code": "C0020740", + "display": "ibuprofen" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/aod", + "code": "0000019879" + }, + { + "system": "http://www.whocc.no/atc", + "code": "M01AE01" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/ccpss", + "code": "0046165" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/chv", + "code": "0000006519" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/csp", + "code": "2270-2077" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/drugbank", + "code": "DB01050" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/gs", + "code": "1611" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/lch_nw", + "code": "sh97005926" + }, + { + "system": "http://loinc.org", + "code": "LP16165-0" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/medcin", + "code": "40458" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mmsl", + "code": "d00015" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/msh", + "code": "D007052" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/mthspl", + "code": "WK2XYI10QM" + }, + { + "system": "http://ncimeta.nci.nih.gov", + "code": "C561" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_ctrp", + "code": "C561" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_dcp", + "code": "00803" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_dtp", + "code": "NSC0256857" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_fda", + "code": "WK2XYI10QM" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nci_nci-gloss", + "code": "CDR0000613511" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/nddf", + "code": "002377" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/pdq", + "code": "CDR0000040475" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rcd", + "code": "x02MO" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/rxnorm", + "code": "5640" + }, + { + "system": "http://snomed.info/sct", + "code": "E-7772" + }, + { + "system": "http://snomed.info/sct", + "code": "C-603C0" + }, + { + "system": "http://snomed.info/sct", + "code": "387207008" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/usp", + "code": "m39860" + }, + { + "system": "http://www.nlm.nih.gov/research/umls/uspmg", + "code": "MTHU000060" + }, + { + "system": "http://hl7.org/fhir/ndfrt", + "code": "4017840" + } + ], + "text": "ibuprofen" + }, + "subject": { + "reference": "Patient/efcccdf7-87f0-4061-b553-09fc11734594", + "type": "Patient" + }, + "context": { + "reference": "Encounter/76214457-f94c-4ccf-95ef-ab31e7232d63", + "type": "Encounter", + "display": "unknown" + }, + "dosage": [ + { + "text": "100mg", + "timing": { + "repeat": { + "frequency": 2, + "period": 1, + "periodUnit": "d" + }, + "code": { + "text": "twice daily" + } + }, + "doseAndRate": [ + { + "doseQuantity": { + "value": 100 + } + } + ] + } + ] + } + }, + { + "fullUrl": "List/6d743a3e-e7a2-4cee-a0b5-64361b6c93ad", + "resource": { + "resourceType": "List", + "id": "6d743a3e-e7a2-4cee-a0b5-64361b6c93ad", + "status": "current", + "mode": "snapshot", + "title": "General", + "subject": { + "reference": "Patient/efcccdf7-87f0-4061-b553-09fc11734594", + "type": "Patient" + }, + "encounter": { + "reference": "Encounter/76214457-f94c-4ccf-95ef-ab31e7232d63", + "type": "Encounter", + "display": "unknown" + }, + "entry": [ + { + "item": { + "reference": "MedicationStatement/ac0264b6-63b7-4cf2-a7c3-f7340788aca7", + "type": "MedicationStatement", + "display": "ibuprofen" + } + } + ] + } + } + ] + } + } + ], + "errors": [], + "modelVersion": "2022-03-01" + } + } + ] + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulHealthcarePostRequest.json b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulHealthcarePostRequest.json new file mode 100644 index 000000000000..31a4760e3ced --- /dev/null +++ b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulHealthcarePostRequest.json @@ -0,0 +1,36 @@ +{ + "operationId": "AnalyzeTextSubmitJob", + "title": "SuccessfulHealthcarePostRequest", + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "api-version": "2023-11-15-preview", + "Endpoint": "{Endpoint}", + "jobId": "{Job ID}", + "body": { + "analysisInput": { + "documents": [ + { + "text": "Prescribed 100mg ibuprofen, taken twice daily.", + "id": "1", + "language": "en" + } + ] + }, + "tasks": [ + { + "kind": "Healthcare", + "parameters": { + "modelVersion": "latest" + } + } + ] + } + }, + "responses": { + "202": { + "headers": { + "Operation-Location": "{Endpoint}/language/analyze-text/jobs/{jobId}?api-version=2023-11-15-preview" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulHealthcareTaskStatusRequest.json b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulHealthcareTaskStatusRequest.json new file mode 100644 index 000000000000..84e3456b91af --- /dev/null +++ b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulHealthcareTaskStatusRequest.json @@ -0,0 +1,222 @@ +{ + "operationId": "AnalyzeTextJobStatus", + "title": "SuccessfulHealthcareTaskStatusRequest", + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "api-version": "2023-11-15-preview", + "Endpoint": "{Endpoint}", + "jobId": "1780194a-e9c1-4298-b0d4-fdc59ba818a0" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "createdDateTime": "2022-07-20T18:43:35Z", + "displayName": "Extracting Location & US Region", + "expirationDateTime": "2022-07-21T18:43:35Z", + "jobId": "1780194a-e9c1-4298-b0d4-fdc59ba818a0", + "lastUpdatedDateTime": "2022-07-20T18:43:36Z", + "status": "succeeded", + "tasks": { + "completed": 1, + "failed": 0, + "inProgress": 0, + "total": 1, + "items": [ + { + "kind": "HealthcareLROResults", + "lastUpdateDateTime": "2022-07-20T18:43:36.7159045Z", + "status": "succeeded", + "results": { + "documents": [ + { + "id": "1", + "entities": [ + { + "offset": 11, + "length": 5, + "text": "100mg", + "category": "Dosage", + "confidenceScore": 0.98 + }, + { + "offset": 17, + "length": 9, + "text": "ibuprofen", + "category": "MedicationName", + "confidenceScore": 1, + "name": "ibuprofen", + "links": [ + { + "dataSource": "UMLS", + "id": "C0020740" + }, + { + "dataSource": "AOD", + "id": "0000019879" + }, + { + "dataSource": "ATC", + "id": "M01AE01" + }, + { + "dataSource": "CCPSS", + "id": "0046165" + }, + { + "dataSource": "CHV", + "id": "0000006519" + }, + { + "dataSource": "CSP", + "id": "2270-2077" + }, + { + "dataSource": "DRUGBANK", + "id": "DB01050" + }, + { + "dataSource": "GS", + "id": "1611" + }, + { + "dataSource": "LCH_NW", + "id": "sh97005926" + }, + { + "dataSource": "LNC", + "id": "LP16165-0" + }, + { + "dataSource": "MEDCIN", + "id": "40458" + }, + { + "dataSource": "MMSL", + "id": "d00015" + }, + { + "dataSource": "MSH", + "id": "D007052" + }, + { + "dataSource": "MTHSPL", + "id": "WK2XYI10QM" + }, + { + "dataSource": "NCI", + "id": "C561" + }, + { + "dataSource": "NCI_CTRP", + "id": "C561" + }, + { + "dataSource": "NCI_DCP", + "id": "00803" + }, + { + "dataSource": "NCI_DTP", + "id": "NSC0256857" + }, + { + "dataSource": "NCI_FDA", + "id": "WK2XYI10QM" + }, + { + "dataSource": "NCI_NCI-GLOSS", + "id": "CDR0000613511" + }, + { + "dataSource": "NDDF", + "id": "002377" + }, + { + "dataSource": "PDQ", + "id": "CDR0000040475" + }, + { + "dataSource": "RCD", + "id": "x02MO" + }, + { + "dataSource": "RXNORM", + "id": "5640" + }, + { + "dataSource": "SNM", + "id": "E-7772" + }, + { + "dataSource": "SNMI", + "id": "C-603C0" + }, + { + "dataSource": "SNOMEDCT_US", + "id": "387207008" + }, + { + "dataSource": "USP", + "id": "m39860" + }, + { + "dataSource": "USPMG", + "id": "MTHU000060" + }, + { + "dataSource": "VANDF", + "id": "4017840" + } + ] + }, + { + "offset": 34, + "length": 11, + "text": "twice daily", + "category": "Frequency", + "confidenceScore": 1 + } + ], + "relations": [ + { + "confidenceScore": 1, + "relationType": "DosageOfMedication", + "entities": [ + { + "ref": "#/results/documents/0/entities/0", + "role": "Dosage" + }, + { + "ref": "#/results/documents/0/entities/1", + "role": "Medication" + } + ] + }, + { + "confidenceScore": 1, + "relationType": "FrequencyOfMedication", + "entities": [ + { + "ref": "#/results/documents/0/entities/1", + "role": "Medication" + }, + { + "ref": "#/results/documents/0/entities/2", + "role": "Frequency" + } + ] + } + ], + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2022-03-01" + } + } + ] + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulKeyPhraseExtractionRequest.json b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulKeyPhraseExtractionRequest.json new file mode 100644 index 000000000000..f73ec364952d --- /dev/null +++ b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulKeyPhraseExtractionRequest.json @@ -0,0 +1,73 @@ +{ + "operationId": "AnalyzeText", + "title": "SuccessfulKeyPhraseExtractionRequest", + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "api-version": "2023-11-15-preview", + "Endpoint": "{Endpoint}", + "body": { + "kind": "KeyPhraseExtraction", + "parameters": { + "modelVersion": "latest" + }, + "analysisInput": { + "documents": [ + { + "id": "1", + "language": "en", + "text": "Microsoft was founded by Bill Gates and Paul Allen." + }, + { + "id": "2", + "language": "en", + "text": "Text Analytics is one of the Azure Cognitive Services." + }, + { + "id": "3", + "language": "en", + "text": "My cat might need to see a veterinarian." + } + ] + } + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "kind": "KeyPhraseExtractionResults", + "results": { + "documents": [ + { + "id": "1", + "keyPhrases": [ + "Bill Gates", + "Paul Allen", + "Microsoft" + ], + "warnings": [] + }, + { + "id": "2", + "keyPhrases": [ + "Azure Cognitive Services", + "Text Analytics" + ], + "warnings": [] + }, + { + "id": "3", + "keyPhrases": [ + "cat", + "veterinarian" + ], + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2021-06-01" + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulLanguageDetectionRequest.json b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulLanguageDetectionRequest.json new file mode 100644 index 000000000000..efaaaefe3fb2 --- /dev/null +++ b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulLanguageDetectionRequest.json @@ -0,0 +1,93 @@ +{ + "operationId": "AnalyzeText", + "title": "SuccessfulLanguageDetectionRequest", + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "api-version": "2023-11-15-preview", + "Endpoint": "{Endpoint}", + "body": { + "kind": "LanguageDetection", + "parameters": { + "modelVersion": "latest" + }, + "analysisInput": { + "documents": [ + { + "id": "1", + "text": "Hello world" + }, + { + "id": "2", + "text": "Bonjour tout le monde" + }, + { + "id": "3", + "text": "Hola mundo" + }, + { + "id": "4", + "text": "Tumhara naam kya hai?" + } + ] + } + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "kind": "LanguageDetectionResults", + "results": { + "documents": [ + { + "detectedLanguage": { + "confidenceScore": 1, + "iso6391Name": "en", + "name": "English", + "script": "Latin", + "scriptCode": "Latn" + }, + "id": "1", + "warnings": [] + }, + { + "detectedLanguage": { + "confidenceScore": 1, + "iso6391Name": "fr", + "name": "French", + "script": "Latin", + "scriptCode": "Latn" + }, + "id": "2", + "warnings": [] + }, + { + "detectedLanguage": { + "confidenceScore": 1, + "iso6391Name": "es", + "name": "Spanish", + "script": "Latin", + "scriptCode": "Latn" + }, + "id": "3", + "warnings": [] + }, + { + "detectedLanguage": { + "confidenceScore": 1, + "iso6391Name": "hi", + "name": "Hindi", + "script": "Latin", + "scriptCode": "Latn" + }, + "id": "4", + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2023-12-01" + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulPiiEntityRecognitionExclusionRequest.json b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulPiiEntityRecognitionExclusionRequest.json new file mode 100644 index 000000000000..f44e76a676b5 --- /dev/null +++ b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulPiiEntityRecognitionExclusionRequest.json @@ -0,0 +1,79 @@ +{ + "operationId": "AnalyzeText", + "title": "SuccessfulPiiEntityRecognitionExclusionRequest", + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "api-version": "2023-11-15-preview", + "Endpoint": "{Endpoint}", + "body": { + "kind": "PiiEntityRecognition", + "parameters": { + "modelVersion": "latest", + "excludePiiCategories": [ + "USSocialSecurityNumber" + ] + }, + "analysisInput": { + "documents": [ + { + "id": "1", + "language": "en", + "text": "My SSN is 859-98-0987" + }, + { + "id": "2", + "language": "en", + "text": "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check." + }, + { + "id": "3", + "language": "en", + "text": "Is 998.214.865-68 your Brazilian CPF number?" + } + ] + } + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "kind": "PiiEntityRecognitionResults", + "results": { + "documents": [ + { + "id": "2", + "redactedText": "Your ABA number - ********* - is the first 9 digits in the lower left hand corner of your personal check.", + "entities": [ + { + "category": "ABARoutingNumber", + "confidenceScore": 0.75, + "length": 9, + "offset": 18, + "text": "111000025" + } + ], + "warnings": [] + }, + { + "id": "3", + "redactedText": "Is ************** your Brazilian CPF number?", + "entities": [ + { + "category": "BRCPFNumber", + "confidenceScore": 0.85, + "length": 14, + "offset": 3, + "text": "998.214.865-68" + } + ], + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2021-01-15" + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulPiiEntityRecognitionRedactionRequest.json b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulPiiEntityRecognitionRedactionRequest.json new file mode 100644 index 000000000000..931de9af85f3 --- /dev/null +++ b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulPiiEntityRecognitionRedactionRequest.json @@ -0,0 +1,91 @@ +{ + "operationId": "AnalyzeText", + "title": "SuccessfulPiiEntityRecognitionRedactionRequest", + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "api-version": "2023-11-15-preview", + "Endpoint": "{Endpoint}", + "body": { + "kind": "PiiEntityRecognition", + "parameters": { + "modelVersion": "latest", + "redactionCharacter": "-" + }, + "analysisInput": { + "documents": [ + { + "id": "1", + "language": "en", + "text": "My SSN is 859-98-0987" + }, + { + "id": "2", + "language": "en", + "text": "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check." + }, + { + "id": "3", + "language": "en", + "text": "Is 998.214.865-68 your Brazilian CPF number?" + } + ] + } + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "kind": "PiiEntityRecognitionResults", + "results": { + "documents": [ + { + "id": "1", + "redactedText": "My SSN is -----------", + "entities": [ + { + "category": "USSocialSecurityNumber", + "confidenceScore": 0.65, + "length": 11, + "offset": 28, + "text": "859-98-0987" + } + ], + "warnings": [] + }, + { + "id": "2", + "redactedText": "Your ABA number - --------- - is the first 9 digits in the lower left hand corner of your personal check.", + "entities": [ + { + "category": "ABARoutingNumber", + "confidenceScore": 0.75, + "length": 9, + "offset": 18, + "text": "111000025" + } + ], + "warnings": [] + }, + { + "id": "3", + "redactedText": "Is -------------- your Brazilian CPF number?", + "entities": [ + { + "category": "BRCPFNumber", + "confidenceScore": 0.85, + "length": 14, + "offset": 3, + "text": "998.214.865-68" + } + ], + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2021-01-15" + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulPiiEntityRecognitionRequest.json b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulPiiEntityRecognitionRequest.json new file mode 100644 index 000000000000..3ea26c912e46 --- /dev/null +++ b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulPiiEntityRecognitionRequest.json @@ -0,0 +1,90 @@ +{ + "operationId": "AnalyzeText", + "title": "SuccessfulPiiEntityRecognitionRequest", + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "api-version": "2023-11-15-preview", + "Endpoint": "{Endpoint}", + "body": { + "kind": "PiiEntityRecognition", + "parameters": { + "modelVersion": "latest" + }, + "analysisInput": { + "documents": [ + { + "id": "1", + "language": "en", + "text": "My SSN is 859-98-0987" + }, + { + "id": "2", + "language": "en", + "text": "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check." + }, + { + "id": "3", + "language": "en", + "text": "Is 998.214.865-68 your Brazilian CPF number?" + } + ] + } + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "kind": "PiiEntityRecognitionResults", + "results": { + "documents": [ + { + "id": "1", + "redactedText": "My SSN is ***********", + "entities": [ + { + "category": "USSocialSecurityNumber", + "confidenceScore": 0.65, + "length": 11, + "offset": 28, + "text": "859-98-0987" + } + ], + "warnings": [] + }, + { + "id": "2", + "redactedText": "Your ABA number - ********* - is the first 9 digits in the lower left hand corner of your personal check.", + "entities": [ + { + "category": "ABARoutingNumber", + "confidenceScore": 0.75, + "length": 9, + "offset": 18, + "text": "111000025" + } + ], + "warnings": [] + }, + { + "id": "3", + "redactedText": "Is ************** your Brazilian CPF number?", + "entities": [ + { + "category": "BRCPFNumber", + "confidenceScore": 0.85, + "length": 14, + "offset": 3, + "text": "998.214.865-68" + } + ], + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2021-01-15" + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulSentimentAnalysisRequest.json b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulSentimentAnalysisRequest.json new file mode 100644 index 000000000000..58ba6ab3dff5 --- /dev/null +++ b/specification/cognitiveservices/data-plane/Language/preview/2023-11-15-preview/examples/SuccessfulSentimentAnalysisRequest.json @@ -0,0 +1,150 @@ +{ + "operationId": "AnalyzeText", + "title": "SuccessfulSentimentAnalysisRequest", + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "api-version": "2023-11-15-preview", + "Endpoint": "{Endpoint}", + "body": { + "kind": "SentimentAnalysis", + "parameters": { + "modelVersion": "latest" + }, + "analysisInput": { + "documents": [ + { + "id": "1", + "language": "en", + "text": "Great atmosphere. Close to plenty of restaurants, hotels, and transit! Staff are friendly and helpful." + } + ] + } + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "kind": "SentimentAnalysisResults", + "results": { + "documents": [ + { + "confidenceScores": { + "negative": 0, + "neutral": 0, + "positive": 1 + }, + "id": "1", + "sentences": [ + { + "targets": [ + { + "confidenceScores": { + "negative": 0, + "positive": 1 + }, + "length": 10, + "offset": 6, + "relations": [ + { + "ref": "#/documents/0/sentences/0/assessments/0", + "relationType": "assessment" + } + ], + "sentiment": "positive", + "text": "atmosphere" + } + ], + "confidenceScores": { + "negative": 0, + "neutral": 0, + "positive": 1 + }, + "length": 17, + "offset": 0, + "assessments": [ + { + "confidenceScores": { + "negative": 0, + "positive": 1 + }, + "isNegated": false, + "length": 5, + "offset": 0, + "sentiment": "positive", + "text": "great" + } + ], + "sentiment": "positive", + "text": "Great atmosphere." + }, + { + "targets": [ + { + "confidenceScores": { + "negative": 0.01, + "positive": 0.99 + }, + "length": 11, + "offset": 37, + "relations": [ + { + "ref": "#/documents/0/sentences/1/assessments/0", + "relationType": "assessment" + } + ], + "sentiment": "positive", + "text": "restaurants" + }, + { + "confidenceScores": { + "negative": 0.01, + "positive": 0.99 + }, + "length": 6, + "offset": 50, + "relations": [ + { + "ref": "#/documents/0/sentences/1/assessments/0", + "relationType": "assessment" + } + ], + "sentiment": "positive", + "text": "hotels" + } + ], + "confidenceScores": { + "negative": 0.01, + "neutral": 0.86, + "positive": 0.13 + }, + "length": 52, + "offset": 18, + "assessments": [ + { + "confidenceScores": { + "negative": 0.01, + "positive": 0.99 + }, + "isNegated": false, + "length": 15, + "offset": 18, + "sentiment": "positive", + "text": "Close to plenty" + } + ], + "sentiment": "neutral", + "text": "Close to plenty of restaurants, hotels, and transit!" + } + ], + "sentiment": "positive", + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2021-10-01" + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Language/stable/2022-05-01/analyzeconversations.json b/specification/cognitiveservices/data-plane/Language/stable/2022-05-01/analyzeconversations.json index 10c1683bfa82..93b58ffb3608 100644 --- a/specification/cognitiveservices/data-plane/Language/stable/2022-05-01/analyzeconversations.json +++ b/specification/cognitiveservices/data-plane/Language/stable/2022-05-01/analyzeconversations.json @@ -2,1430 +2,3119 @@ "swagger": "2.0", "info": { "title": "Microsoft Cognitive Language Service - Analyze Conversations", - "description": "The language service conversations API is a suite of natural language processing (NLP) skills that can be used to analyze structured conversations (textual or spoken). The synchronous API in this suite accepts a request and mediates among multiple language projects, such as LUIS Generally Available, Question Answering, Conversational Language Understanding, and then calls the best candidate service to handle the request. At last, it returns a response with the candidate service's response as a payload.\n\n In some cases, this API needs to forward requests and responses between the caller and an upstream service. The asynchronous APIs in this suite enable tasks like Conversation Summarization and Conversational PII detection.", - "version": "2022-05-01" - }, - "securityDefinitions": { - "apim_key": { - "type": "apiKey", - "description": "A subscription key for a Language service resource.", - "name": "Ocp-Apim-Subscription-Key", - "in": "header" - } + "version": "2022-05-01", + "description": "The language service conversations API is a suite of natural language processing (NLP) skills that can be used to analyze structured conversations (textual or spoken). The synchronous API in this suite accepts a request and mediates among multiple language projects, such as LUIS Generally Available, Question Answering, Conversational Language Understanding, and then calls the best candidate service to handle the request. At last, it returns a response with the candidate service's response as a payload.\\n\\n In some cases, this API needs to forward requests and responses between the caller and an upstream service. The asynchronous APIs in this suite enable tasks like Conversation Summarization and Conversational PII detection.", + "x-typespec-generated": [ + { + "emitter": "@azure-tools/typespec-autorest" + } + ] }, - "security": [ - { - "apim_key": [] - } + "schemes": [ + "https" ], "x-ms-parameterized-host": { "hostTemplate": "{Endpoint}/language", "useSchemePrefix": false, "parameters": [ { - "$ref": "common.json#/parameters/Endpoint" + "name": "Endpoint", + "in": "path", + "description": "Supported Cognitive Services endpoint (e.g., https://.api.cognitiveservices.azure.com).", + "required": true, + "type": "string" } ] }, + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ], + "security": [ + { + "ApiKeyAuth": [] + } + ], + "securityDefinitions": { + "ApiKeyAuth": { + "type": "apiKey", + "name": "Ocp-Apim-Subscription-Key", + "in": "header" + } + }, + "tags": [], "paths": { "/:analyze-conversations": { "post": { - "operationId": "ConversationAnalysis_AnalyzeConversation", + "operationId": "AnalyzeConversations", "description": "Analyzes the input conversation utterance.", "parameters": [ { - "$ref": "common.json#/parameters/ApiVersionParameter" + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { - "description": "A single conversational task to execute.", - "in": "body", "name": "body", + "in": "body", + "required": true, "schema": { "$ref": "#/definitions/AnalyzeConversationTask" - }, - "required": true + } } ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], "responses": { "200": { - "description": "The conversation analysis response.", + "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/AnalyzeConversationTaskResult" } }, "default": { - "description": "Error response.", + "description": "An unexpected error response.", "schema": { - "$ref": "common.json#/definitions/ErrorResponse" + "$ref": "#/definitions/ErrorResponse" }, "headers": { "x-ms-error-code": { - "description": "The error code for specific error that occurred.", - "type": "string" + "type": "string", + "description": "String error code indicating what went wrong." } } } }, "x-ms-examples": { - "Conversation project result": { - "$ref": "./examples/conversations/SuccessfulAnalyzeConversations.json" + "SuccessfulAnalyzeConversations": { + "$ref": "./examples/SuccessfulAnalyzeConversations.json" }, - "Orchestration result": { - "$ref": "./examples/conversations/SuccessfulAnalyzeConversationsArbitration.json" + "SuccessfulAnalyzeConversationsArbitration": { + "$ref": "./examples/SuccessfulAnalyzeConversationsArbitration.json" }, - "Orchestration direct target result": { - "$ref": "./examples/conversations/SuccessfulAnalyzeConversationsArbitrationDirectTarget.json" + "SuccessfulAnalyzeConversationsArbitrationDirectTarget": { + "$ref": "./examples/SuccessfulAnalyzeConversationsArbitrationDirectTarget.json" } } } } }, "definitions": { - "AnalyzeConversationTaskKind": { - "type": "string", - "description": "Enumeration of supported Conversation tasks.", - "enum": [ - "Conversation" + "AgeResolution": { + "type": "object", + "description": "Represents the Age entity resolution model.", + "properties": { + "value": { + "type": "number", + "format": "double", + "description": "The numeric value that the extracted text denotes." + }, + "unit": { + "$ref": "#/definitions/AgeUnit", + "description": "The Age Unit of measurement" + } + }, + "required": [ + "value", + "unit" ], - "x-ms-enum": { - "name": "AnalyzeConversationTaskKind", - "modelAsString": true - } + "allOf": [ + { + "$ref": "#/definitions/BaseResolution" + } + ], + "x-ms-discriminator-value": "AgeResolution" }, - "AnalyzeConversationTaskResultsKind": { + "AgeUnit": { "type": "string", - "description": "Enumeration of supported conversational task results", + "description": "The Age Unit of measurement", "enum": [ - "ConversationResult" + "Unspecified", + "Year", + "Month", + "Week", + "Day" ], "x-ms-enum": { - "name": "AnalyzeConversationTaskResultsKind", - "modelAsString": true + "name": "AgeUnit", + "modelAsString": true, + "values": [ + { + "name": "Unspecified", + "value": "Unspecified", + "description": "Unspecified age unit" + }, + { + "name": "Year", + "value": "Year", + "description": "Year age unit" + }, + { + "name": "Month", + "value": "Month", + "description": "Month age unit" + }, + { + "name": "Week", + "value": "Week", + "description": "Week age unit" + }, + { + "name": "Day", + "value": "Day", + "description": "Day age unit" + } + ] } }, + "AnalysisParameters": { + "type": "object", + "description": "This is the parameter set of either the Orchestration project itself or one of the target services.", + "properties": { + "targetProjectKind": { + "$ref": "#/definitions/targetProjectKind", + "description": "The type of a target service" + }, + "apiVersion": { + "type": "string", + "description": "The API version to use when call a specific target service." + } + }, + "discriminator": "targetProjectKind", + "required": [ + "targetProjectKind" + ] + }, + "AnalyzeConversationResult": { + "type": "object", + "description": "Represents a conversation analysis response.", + "properties": { + "query": { + "type": "string", + "description": "The conversation utterance given by the caller." + }, + "detectedLanguage": { + "type": "string", + "description": "The system detected language for the query in BCP 47 language representation.." + }, + "prediction": { + "$ref": "#/definitions/BasePrediction", + "description": "The prediction result of a conversation project." + } + }, + "required": [ + "query", + "prediction" + ] + }, "AnalyzeConversationTask": { + "type": "object", "description": "The base class of a conversation input task.", + "properties": { + "kind": { + "$ref": "#/definitions/AnalyzeConversationTaskKind", + "description": "The base class of a conversation input task.", + "x-ms-mutability": [ + "read", + "create" + ] + } + }, "discriminator": "kind", "required": [ "kind" + ] + }, + "AnalyzeConversationTaskKind": { + "type": "string", + "description": "Enumeration of supported Conversation tasks.", + "enum": [ + "Conversation" ], - "properties": { - "kind": { - "$ref": "#/definitions/AnalyzeConversationTaskKind" - } + "x-ms-enum": { + "name": "AnalyzeConversationTaskKind", + "modelAsString": true, + "values": [ + { + "name": "Conversation", + "value": "Conversation", + "description": "Conversation task kind" + } + ] } }, "AnalyzeConversationTaskResult": { - "description": "The base class of a conversation task result.", + "type": "object", + "description": "The base class of a conversation input task result.", + "properties": { + "kind": { + "$ref": "#/definitions/AnalyzeConversationTaskResultsKind", + "description": "The base class of a conversation input task result." + } + }, "discriminator": "kind", "required": [ "kind" + ] + }, + "AnalyzeConversationTaskResultsKind": { + "type": "string", + "description": "Enumeration of supported conversational task results.", + "enum": [ + "ConversationResult" ], - "properties": { - "kind": { - "$ref": "#/definitions/AnalyzeConversationTaskResultsKind" - } + "x-ms-enum": { + "name": "AnalyzeConversationTaskResultsKind", + "modelAsString": true, + "values": [ + { + "name": "ConversationResult", + "value": "ConversationResult", + "description": "Conversation result task kind" + } + ] } }, - "ConversationalTask": { - "description": "The input for a custom conversation task.", - "allOf": [ - { - "$ref": "#/definitions/AnalyzeConversationTask" - } - ], + "AnswerSpan": { + "type": "object", + "description": "Answer span object of QnA.", "properties": { - "analysisInput": { - "$ref": "#/definitions/ConversationAnalysisOptions" + "text": { + "type": "string", + "description": "Predicted text of answer span." }, - "parameters": { - "$ref": "#/definitions/ConversationTaskParameters" + "confidenceScore": { + "type": "number", + "format": "double", + "description": "Predicted score of answer span, value ranges from 0 to 1.", + "minimum": 0, + "maximum": 1 + }, + "offset": { + "type": "integer", + "format": "int32", + "description": "The answer span offset from the start of answer." + }, + "length": { + "type": "integer", + "format": "int32", + "description": "The length of the answer span." } - }, - "x-ms-discriminator-value": "Conversation", - "required": [ - "analysisInput", - "parameters" - ] + } }, - "ConversationTaskParameters": { + "AnswersOptions": { "type": "object", - "description": "Input parameters necessary for a Conversation task.", + "description": "Parameters to query a knowledge base.", "properties": { - "projectName": { + "qnaId": { + "type": "integer", + "format": "int32", + "description": "Exact QnA ID to fetch from the knowledge base, this field takes priority over question." + }, + "question": { "type": "string", - "description": "The name of the project to use." + "description": "User question to query against the knowledge base." }, - "deploymentName": { + "top": { + "type": "integer", + "format": "int32", + "description": "Max number of answers to be returned for the question." + }, + "userId": { "type": "string", - "description": "The name of the deployment to use." + "description": "Unique identifier for the user." }, - "verbose": { - "type": "boolean", - "description": "If true, the service will return more detailed information in the response." + "confidenceScoreThreshold": { + "type": "number", + "format": "double", + "description": "Minimum threshold score for answers, value ranges from 0 to 1.", + "minimum": 0, + "maximum": 1 }, - "isLoggingEnabled": { - "type": "boolean", - "description": "If true, the service will keep the query for further review." + "context": { + "$ref": "#/definitions/KnowledgeBaseAnswerContext", + "description": "Context object with previous QnA's information." }, - "stringIndexType": { - "$ref": "common.json#/definitions/StringIndexType" + "rankerType": { + "$ref": "#/definitions/RankerKind", + "description": "Type of ranker to be used." }, - "directTarget": { - "type": "string", - "description": "The name of a target project to forward the request to." + "filters": { + "$ref": "#/definitions/QueryFilters", + "description": "Filter QnAs based on given metadata list and knowledge base sources." }, - "targetProjectParameters": { - "type": "object", - "description": "A dictionary representing the parameters for each target project.", - "additionalProperties": { - "$ref": "#/definitions/AnalysisParameters" - } + "answerSpanRequest": { + "$ref": "#/definitions/ShortAnswerOptions", + "description": "To configure Answer span prediction feature." + }, + "includeUnstructuredSources": { + "type": "boolean", + "description": "(Optional) Flag to enable Query over Unstructured Sources." } - }, - "required": [ - "projectName", - "deploymentName" - ] + } }, - "ConversationalTaskResult": { - "description": "The results of a Conversation task.", - "allOf": [ - { - "$ref": "#/definitions/AnalyzeConversationTaskResult" - } - ], + "AnswersResult": { "type": "object", + "description": "Represents List of Question Answers.", "properties": { - "result": { - "$ref": "#/definitions/AnalyzeConversationResult" + "answers": { + "type": "array", + "description": "Represents Answer Result list.", + "items": { + "$ref": "#/definitions/KnowledgeBaseAnswer" + } } - }, - "required": [ - "result" - ], - "x-ms-discriminator-value": "ConversationResult" + } }, - "ConversationItemBase": { + "AreaResolution": { "type": "object", - "description": "The abstract base for a user input formatted conversation (e.g., Text, Transcript).", + "description": "Represents the area entity resolution model.", "properties": { - "id": { - "description": "The ID of a conversation item.", - "type": "string" - }, - "participantId": { - "description": "The participant ID of a conversation item.", - "type": "string" - }, - "language": { - "description": "The override language of a conversation item in BCP 47 language representation.", - "type": "string" + "value": { + "type": "number", + "format": "double", + "description": "The numeric value that the extracted text denotes." }, - "modality": { - "$ref": "#/definitions/Modality" + "unit": { + "$ref": "#/definitions/AreaUnit", + "description": "The area Unit of measurement" } }, "required": [ - "participantId", - "id" + "value", + "unit" ], - "additionalProperties": true - }, - "TextConversationItem": { - "description": "The text modality of an input conversation.", "allOf": [ { - "$ref": "#/definitions/ConversationItemBase" + "$ref": "#/definitions/BaseResolution" } ], - "properties": { - "text": { - "description": "The text input", - "type": "string" - } - }, - "required": [ - "text" - ] + "x-ms-discriminator-value": "AreaResolution" }, - "ConversationAnalysisOptions": { - "type": "object", - "description": "The input ConversationItem and its optional parameters", - "required": [ - "conversationItem" + "AreaUnit": { + "type": "string", + "description": "The area unit of measurement.", + "enum": [ + "Unspecified", + "SquareKilometer", + "SquareHectometer", + "SquareDecameter", + "SquareDecimeter", + "SquareMeter", + "SquareCentimeter", + "SquareMillimeter", + "SquareInch", + "SquareFoot", + "SquareMile", + "SquareYard", + "Acre" ], - "properties": { - "conversationItem": { - "$ref": "#/definitions/ConversationItemBase" - } + "x-ms-enum": { + "name": "AreaUnit", + "modelAsString": true, + "values": [ + { + "name": "Unspecified", + "value": "Unspecified", + "description": "Unspecified area unit" + }, + { + "name": "SquareKilometer", + "value": "SquareKilometer", + "description": "Square kilometer area unit" + }, + { + "name": "SquareHectometer", + "value": "SquareHectometer", + "description": "Square hectometer area unit" + }, + { + "name": "SquareDecameter", + "value": "SquareDecameter", + "description": "Square decameter area unit" + }, + { + "name": "SquareDecimeter", + "value": "SquareDecimeter", + "description": "Square decimeter area unit" + }, + { + "name": "SquareMeter", + "value": "SquareMeter", + "description": "Square meter area unit" + }, + { + "name": "SquareCentimeter", + "value": "SquareCentimeter", + "description": "Square centimeter area unit" + }, + { + "name": "SquareMillimeter", + "value": "SquareMillimeter", + "description": "Square millimeter area unit" + }, + { + "name": "SquareInch", + "value": "SquareInch", + "description": "Square inch area unit" + }, + { + "name": "SquareFoot", + "value": "SquareFoot", + "description": "Square foot area unit" + }, + { + "name": "SquareMile", + "value": "SquareMile", + "description": "Square mile area unit" + }, + { + "name": "SquareYard", + "value": "SquareYard", + "description": "Square yard area unit" + }, + { + "name": "Acre", + "value": "Acre", + "description": "Acre area unit" + } + ] } }, - "AnalysisParameters": { + "BaseExtraInformation": { "type": "object", - "description": "This is the parameter set of either the Orchestration project itself or one of the target services.", + "description": "The abstract base object for entity extra information.", + "properties": { + "extraInformationKind": { + "$ref": "#/definitions/ExtraInformationKind", + "description": "The extra information object kind." + } + }, + "discriminator": "extraInformationKind", "required": [ - "targetProjectKind" - ], - "discriminator": "targetProjectKind", + "extraInformationKind" + ] + }, + "BasePrediction": { + "type": "object", + "description": "This is the base class of prediction", "properties": { - "targetProjectKind": { - "type": "string", - "description": "The type of a target service.", - "enum": [ - "Luis", - "Conversation", - "QuestionAnswering", - "NonLinked" - ], - "x-ms-enum": { - "name": "targetProjectKind", - "modelAsString": true - } + "projectKind": { + "$ref": "#/definitions/projectKind", + "description": "The type of the project." }, - "apiVersion": { + "topIntent": { "type": "string", - "description": "The API version to use when call a specific target service." + "description": "The intent with the highest score." } - } + }, + "discriminator": "projectKind", + "required": [ + "projectKind" + ] }, - "NoneLinkedTargetIntentResult": { + "BaseResolution": { "type": "object", - "description": "A wrap up of non-linked intent response.", - "x-ms-discriminator-value": "NonLinked", - "allOf": [ - { - "$ref": "#/definitions/TargetIntentResult" - } - ], + "description": "The abstract base class for entity resolutions.", "properties": { - "result": { - "$ref": "#/definitions/ConversationResult", - "description": "The actual response from a Conversation project." + "resolutionKind": { + "$ref": "#/definitions/ResolutionKind", + "description": "The entity resolution object kind." } - } + }, + "discriminator": "resolutionKind", + "required": [ + "resolutionKind" + ] }, - "LuisParameters": { - "description": "This is a set of request parameters for LUIS Generally Available projects.", - "x-ms-discriminator-value": "Luis", + "BooleanResolution": { "type": "object", + "description": "A resolution for boolean expressions", + "properties": { + "value": { + "type": "boolean", + "description": "A resolution for boolean expressions" + } + }, + "required": [ + "value" + ], "allOf": [ { - "$ref": "#/definitions/AnalysisParameters" + "$ref": "#/definitions/BaseResolution" } ], + "x-ms-discriminator-value": "BooleanResolution" + }, + "ConversationAnalysisOptions": { + "type": "object", + "description": "The input ConversationItem and its optional parameters", "properties": { - "query": { - "type": "string", - "maxLength": 500, - "description": "The utterance to predict." - }, - "callingOptions": { - "type": "object", - "description": "This customizes how the service calls LUIS Generally Available projects.", - "$ref": "#/definitions/LuisCallingOptions" + "conversationItem": { + "$ref": "#/definitions/TextConversationItem", + "description": "The abstract base for a user input formatted conversation (e.g., Text, Transcript)." } }, - "additionalProperties": true + "required": [ + "conversationItem" + ] }, - "LuisCallingOptions": { - "description": "This customizes how the service calls LUIS Generally Available projects.", + "ConversationCallingOptions": { "type": "object", + "description": "The option to set to call a Conversation project.", "properties": { + "language": { + "type": "string", + "description": "The language of the query in BCP 47 language representation." + }, "verbose": { - "description": "Enable verbose response.", - "type": "boolean" + "type": "boolean", + "description": "If true, the service will return more detailed information." }, - "log": { - "description": "Save log to add in training utterances later.", - "type": "boolean" + "isLoggingEnabled": { + "type": "boolean", + "description": "If true, the query will be saved for customers to further review in authoring, to improve the model quality." + } + } + }, + "ConversationEntity": { + "type": "object", + "description": "The entity extraction result of a Conversation project.", + "properties": { + "category": { + "type": "string", + "description": "The entity category." }, - "show-all-intents": { - "description": "Set true to show all intents.", - "type": "boolean" + "text": { + "type": "string", + "description": "The predicted entity text." }, - "timezoneOffset": { + "offset": { + "type": "integer", + "format": "int32", + "description": "The starting index of this entity in the query." + }, + "length": { + "type": "integer", + "format": "int32", + "description": "The length of the text." + }, + "confidenceScore": { "type": "number", - "description": "The timezone offset for the location of the request." + "format": "float", + "description": "The entity confidence score." }, - "spellCheck": { - "type": "boolean", - "description": "Enable spell checking." + "resolutions": { + "type": "array", + "description": "The collection of entity resolution objects.", + "items": { + "$ref": "#/definitions/BaseResolution" + }, + "x-ms-identifiers": [] }, - "bing-spell-check-subscription-key": { - "description": "The subscription key to use when enabling Bing spell check", - "type": "string" + "extraInformation": { + "type": "array", + "description": "The collection of entity extra information objects.", + "items": { + "$ref": "#/definitions/BaseExtraInformation" + }, + "x-ms-identifiers": [] } - } + }, + "required": [ + "category", + "text", + "offset", + "length", + "confidenceScore" + ] + }, + "ConversationIntent": { + "type": "object", + "description": "The intent classification result of a Conversation project.", + "properties": { + "category": { + "type": "string", + "description": "A predicted class." + }, + "confidenceScore": { + "type": "number", + "format": "float", + "description": "The confidence score of the class from 0.0 to 1.0.", + "minimum": 0, + "maximum": 1 + } + }, + "required": [ + "category", + "confidenceScore" + ] }, "ConversationParameters": { "type": "object", "description": "This is a set of request parameters for Customized Conversation projects.", - "x-ms-discriminator-value": "Conversation", + "properties": { + "callingOptions": { + "$ref": "#/definitions/ConversationCallingOptions", + "description": "The option to set to call a Conversation project." + } + }, "allOf": [ { "$ref": "#/definitions/AnalysisParameters" } ], - "properties": { - "callingOptions": { - "type": "object", - "$ref": "#/definitions/ConversationCallingOptions" - } - } + "x-ms-discriminator-value": "Conversation" }, - "ConversationCallingOptions": { + "ConversationPrediction": { "type": "object", - "description": "The option to set to call a Conversation project.", + "description": "Represents the prediction section of a Conversation project.", "properties": { - "language": { - "description": "The language of the query in BCP 47 language representation..", - "type": "string" - }, - "verbose": { - "description": "If true, the service will return more detailed information.", - "type": "boolean" + "intents": { + "type": "array", + "description": "The intent classification results.", + "items": { + "$ref": "#/definitions/ConversationIntent" + }, + "x-ms-identifiers": [] }, - "isLoggingEnabled": { - "description": "If true, the query will be saved for customers to further review in authoring, to improve the model quality.", - "type": "boolean" + "entities": { + "type": "array", + "description": "The entity extraction results.", + "items": { + "$ref": "#/definitions/ConversationEntity" + }, + "x-ms-identifiers": [] } - } - }, - "QuestionAnsweringParameters": { - "type": "object", - "description": "This is a set of request parameters for Question Answering knowledge bases.", - "x-ms-discriminator-value": "QuestionAnswering", + }, + "required": [ + "intents", + "entities" + ], "allOf": [ { - "$ref": "#/definitions/AnalysisParameters" + "$ref": "#/definitions/BasePrediction" } ], - "properties": { - "callingOptions": { - "description": "The options sent to a Question Answering KB.", - "$ref": "common.json#/definitions/AnswersOptions" - } - } + "x-ms-discriminator-value": "Conversation" }, - "AnalyzeConversationResult": { + "ConversationResult": { "type": "object", - "description": "Represents a conversation analysis response.", - "required": [ - "query", - "prediction" - ], + "description": "The response returned by a Conversation project.", "properties": { "query": { "type": "string", - "description": "The conversation utterance given by the caller." + "description": "The same query given in request." }, "detectedLanguage": { "type": "string", - "description": "The system detected language for the query in BCP 47 language representation.." + "description": "The detected language from the query in BCP 47 language representation." }, "prediction": { - "description": "The prediction result of a conversation project.", - "$ref": "#/definitions/BasePrediction" + "$ref": "#/definitions/ConversationPrediction", + "description": "The predicted result for the query." } - } - }, - "BasePrediction": { - "type": "object", - "description": "This is the base class of prediction", + }, "required": [ - "projectKind" + "query" + ] + }, + "ConversationTargetIntentResult": { + "type": "object", + "description": "A wrap up of Conversation project response.", + "properties": { + "result": { + "$ref": "#/definitions/ConversationResult", + "description": "The actual response from a Conversation project." + } + }, + "allOf": [ + { + "$ref": "#/definitions/TargetIntentResult" + } ], - "discriminator": "projectKind", + "x-ms-discriminator-value": "Conversation" + }, + "ConversationTaskParameters": { + "type": "object", + "description": "Input parameters necessary for a Conversation task.", "properties": { - "projectKind": { + "projectName": { + "type": "string", + "description": "The name of the project to use." + }, + "deploymentName": { + "type": "string", + "description": "The name of the deployment to use." + }, + "verbose": { + "type": "boolean", + "description": "If true, the service will return more detailed information in the response." + }, + "isLoggingEnabled": { + "type": "boolean", + "description": "If true, the service will keep the query for further review." + }, + "stringIndexType": { "type": "string", - "description": "The type of the project.", + "description": "Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see https://aka.ms/text-analytics-offsets.", + "default": "TextElements_v8", "enum": [ - "Conversation", - "Orchestration" + "TextElements_v8", + "UnicodeCodePoint", + "Utf16CodeUnit" ], "x-ms-enum": { - "name": "projectKind", - "modelAsString": true + "name": "StringIndexType", + "modelAsString": true, + "values": [ + { + "name": "TextElements_v8", + "value": "TextElements_v8", + "description": "Returned offset and length values will correspond to TextElements (Graphemes and Grapheme clusters) confirming to the Unicode 8.0.0 standard. Use this option if your application is written in .Net Framework or .Net Core and you will be using StringInfo." + }, + { + "name": "UnicodeCodePoint", + "value": "UnicodeCodePoint", + "description": "Returned offset and length values will correspond to Unicode code points. Use this option if your application is written in a language that support Unicode, for example Python." + }, + { + "name": "Utf16CodeUnit", + "value": "Utf16CodeUnit", + "description": "Returned offset and length values will correspond to UTF-16 code units. Use this option if your application is written in a language that support Unicode, for example Java, JavaScript." + } + ] } }, - "topIntent": { + "directTarget": { "type": "string", - "description": "The intent with the highest score." + "description": "The name of a target project to forward the request to." + }, + "targetProjectParameters": { + "type": "object", + "description": "A dictionary representing the parameters for each target project.", + "additionalProperties": { + "$ref": "#/definitions/AnalysisParameters" + } } - } + }, + "required": [ + "projectName", + "deploymentName" + ] }, - "OrchestrationPrediction": { + "ConversationalTask": { "type": "object", - "description": "This represents the prediction result of an Orchestration project.", - "x-ms-discriminator-value": "Orchestration", + "description": "The input for a custom conversation task.", + "properties": { + "analysisInput": { + "$ref": "#/definitions/ConversationAnalysisOptions", + "description": "The input ConversationItem and its optional parameters" + }, + "parameters": { + "$ref": "#/definitions/ConversationTaskParameters", + "description": "Input parameters necessary for a Conversation task." + } + }, "required": [ - "intents" + "analysisInput", + "parameters" ], "allOf": [ { - "$ref": "#/definitions/BasePrediction" + "$ref": "#/definitions/AnalyzeConversationTask" } ], - "properties": { - "intents": { - "description": "A dictionary that contains all intents. A key is an intent name and a value is its confidence score and target type. The top intent's value also contains the actual response from the target project.", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/TargetIntentResult" - } - } - } + "x-ms-discriminator-value": "Conversation" }, - "TargetIntentResult": { + "ConversationalTaskResult": { "type": "object", - "description": "This is the base class of an intent prediction", - "discriminator": "targetProjectKind", + "description": "The results of a Conversation task.", + "properties": { + "result": { + "$ref": "#/definitions/AnalyzeConversationResult", + "description": "Represents a conversation analysis response." + } + }, "required": [ - "confidenceScore", - "targetProjectKind" + "result" ], + "allOf": [ + { + "$ref": "#/definitions/AnalyzeConversationTaskResult" + } + ], + "x-ms-discriminator-value": "ConversationResult" + }, + "CurrencyResolution": { + "type": "object", + "description": "Represents the currency entity resolution model.", "properties": { - "targetProjectKind": { - "type": "string", - "description": "This discriminator property specifies the type of the target project that returns the response.", - "enum": [ - "Luis", - "Conversation", - "QuestionAnswering", - "NonLinked" - ], - "x-ms-enum": { - "name": "targetProjectKind", - "modelAsString": true - } - }, - "apiVersion": { + "ISO4217": { "type": "string", - "description": "The API version used to call a target service." + "description": "The alphabetic code based on another ISO standard, ISO 3166, which lists the codes for country names. The first two letters of the ISO 4217 three-letter code are the same as the code for the country name, and, where possible, the third letter corresponds to the first letter of the currency name.", + "x-ms-client-name": "iso4217" }, - "confidenceScore": { + "value": { "type": "number", "format": "double", - "x-ms-client-name": "confidence", - "description": "The prediction score and it ranges from 0.0 to 1.0.", - "minimum": 0, - "maximum": 1 + "description": "The money amount captured in the extracted entity" + }, + "unit": { + "type": "string", + "description": "The unit of the amount captured in the extracted entity" } - } - }, - "ConversationTargetIntentResult": { - "type": "object", - "description": "A wrap up of Conversation project response.", - "x-ms-discriminator-value": "Conversation", + }, + "required": [ + "value", + "unit" + ], "allOf": [ { - "$ref": "#/definitions/TargetIntentResult" + "$ref": "#/definitions/BaseResolution" } ], - "properties": { - "result": { - "type": "object", - "$ref": "#/definitions/ConversationResult", - "description": "The actual response from a Conversation project." - } - } + "x-ms-discriminator-value": "CurrencyResolution" }, - "ConversationResult": { + "DateTimeResolution": { "type": "object", - "description": "The response returned by a Conversation project.", - "required": [ - "query" - ], + "description": "A resolution for datetime entity instances.", "properties": { - "query": { - "description": "The same query given in request.", - "type": "string" + "timex": { + "type": "string", + "description": "An extended ISO 8601 date/time representation as described in (https://github.com/Microsoft/Recognizers-Text/blob/master/Patterns/English/English-DateTime.yaml)" }, - "detectedLanguage": { - "description": "The detected language from the query in BCP 47 language representation..", - "type": "string" + "dateTimeSubKind": { + "$ref": "#/definitions/DateTimeSubKind", + "description": "The DateTime SubKind" }, - "prediction": { - "description": "The predicted result for the query.", - "$ref": "#/definitions/ConversationPrediction" + "value": { + "type": "string", + "description": "The actual time that the extracted text denote." + }, + "modifier": { + "$ref": "#/definitions/TemporalModifier", + "description": "An optional modifier of a date/time instance." } - } - }, - "ConversationPrediction": { - "type": "object", - "description": "Represents the prediction section of a Conversation project.", - "x-ms-discriminator-value": "Conversation", + }, "required": [ - "intents", - "entities" + "timex", + "dateTimeSubKind", + "value" ], "allOf": [ { - "$ref": "#/definitions/BasePrediction" + "$ref": "#/definitions/BaseResolution" } ], - "properties": { - "intents": { - "description": "The intent classification results.", - "type": "array", - "items": { - "$ref": "#/definitions/ConversationIntent" - } - }, - "entities": { - "description": "The entity extraction results.", - "type": "array", - "items": { - "$ref": "#/definitions/ConversationEntity" + "x-ms-discriminator-value": "DateTimeResolution" + }, + "DateTimeSubKind": { + "type": "string", + "description": "The Datetime SubKind.", + "enum": [ + "Time", + "Date", + "DateTime", + "Duration", + "Set" + ], + "x-ms-enum": { + "name": "DateTimeSubKind", + "modelAsString": true, + "values": [ + { + "name": "Time", + "value": "Time", + "description": "Time subkind" + }, + { + "name": "Date", + "value": "Date", + "description": "Date subkind" + }, + { + "name": "DateTime", + "value": "DateTime", + "description": "DateTime subkind" + }, + { + "name": "Duration", + "value": "Duration", + "description": "Duration subkind" + }, + { + "name": "Set", + "value": "Set", + "description": "Set subkind" } - } + ] } }, - "ConversationIntent": { + "EntitySubtype": { "type": "object", - "description": "The intent classification result of a Conversation project.", - "required": [ - "category", - "confidenceScore" - ], + "description": "The concrete entity Subtype model of extra information.", "properties": { - "category": { - "description": "A predicted class.", - "type": "string" - }, - "confidenceScore": { - "format": "float", - "x-ms-client-name": "confidence", - "description": "The confidence score of the class from 0.0 to 1.0.", - "type": "number", - "minimum": 0, - "maximum": 1 + "value": { + "type": "string", + "description": "The Subtype of an extracted entity type." } - } + }, + "allOf": [ + { + "$ref": "#/definitions/BaseExtraInformation" + } + ], + "x-ms-discriminator-value": "EntitySubtype" }, - "ConversationEntity": { + "Error": { "type": "object", - "description": "The entity extraction result of a Conversation project.", - "required": [ - "category", - "text", - "offset", - "length", - "confidenceScore" - ], + "description": "The error object.", "properties": { - "category": { - "description": "The entity category.", - "type": "string" - }, - "text": { - "description": "The predicted entity text.", - "type": "string" - }, - "offset": { - "format": "int32", - "description": "The starting index of this entity in the query.", - "type": "integer" + "code": { + "$ref": "#/definitions/ErrorCode", + "description": "One of a server-defined set of error codes." }, - "length": { - "format": "int32", - "description": "The length of the text.", - "type": "integer" + "message": { + "type": "string", + "description": "A human-readable representation of the error." }, - "confidenceScore": { - "format": "float", - "x-ms-client-name": "confidence", - "description": "The entity confidence score.", - "type": "number" + "target": { + "type": "string", + "description": "The target of the error." }, - "resolutions": { - "description": "The collection of entity resolution objects.", + "details": { "type": "array", + "description": "An array of details about specific errors that led to this reported error.", "items": { - "$ref": "#/definitions/BaseResolution" - } + "$ref": "#/definitions/Error" + }, + "x-ms-identifiers": [] }, - "extraInformation": { - "description": "The collection of entity extra information objects.", + "innererror": { + "$ref": "#/definitions/InnerErrorModel", + "description": "An object containing more specific information than the current object about the error." + } + }, + "required": [ + "code", + "message" + ] + }, + "ErrorCode": { + "type": "string", + "description": "Human-readable error code.", + "enum": [ + "InvalidRequest", + "InvalidArgument", + "Unauthorized", + "Forbidden", + "NotFound", + "ProjectNotFound", + "OperationNotFound", + "AzureCognitiveSearchNotFound", + "AzureCognitiveSearchIndexNotFound", + "TooManyRequests", + "AzureCognitiveSearchThrottling", + "AzureCognitiveSearchIndexLimitReached", + "InternalServerError", + "ServiceUnavailable", + "Timeout", + "QuotaExceeded", + "Conflict", + "Warning" + ], + "x-ms-enum": { + "name": "ErrorCode", + "modelAsString": true, + "values": [ + { + "name": "InvalidRequest", + "value": "InvalidRequest", + "description": "Invalid request error" + }, + { + "name": "InvalidArgument", + "value": "InvalidArgument", + "description": "Invalid argument error" + }, + { + "name": "Unauthorized", + "value": "Unauthorized", + "description": "Unauthorized access error" + }, + { + "name": "Forbidden", + "value": "Forbidden", + "description": "Forbidden access error" + }, + { + "name": "NotFound", + "value": "NotFound", + "description": "Not found error" + }, + { + "name": "ProjectNotFound", + "value": "ProjectNotFound", + "description": "Project not found error" + }, + { + "name": "OperationNotFound", + "value": "OperationNotFound", + "description": "Operation not found error" + }, + { + "name": "AzureCognitiveSearchNotFound", + "value": "AzureCognitiveSearchNotFound", + "description": "Azure Cognitive Search not found error" + }, + { + "name": "AzureCognitiveSearchIndexNotFound", + "value": "AzureCognitiveSearchIndexNotFound", + "description": "Azure Cognitive Search index not found error" + }, + { + "name": "TooManyRequests", + "value": "TooManyRequests", + "description": "Too many requests error" + }, + { + "name": "AzureCognitiveSearchThrottling", + "value": "AzureCognitiveSearchThrottling", + "description": "Azure Cognitive Search throttling error" + }, + { + "name": "AzureCognitiveSearchIndexLimitReached", + "value": "AzureCognitiveSearchIndexLimitReached", + "description": "Azure Cognitive Search index limit reached error" + }, + { + "name": "InternalServerError", + "value": "InternalServerError", + "description": "Internal server error" + }, + { + "name": "ServiceUnavailable", + "value": "ServiceUnavailable", + "description": "Service unavailable error" + }, + { + "name": "Timeout", + "value": "Timeout", + "description": "Timeout error" + }, + { + "name": "QuotaExceeded", + "value": "QuotaExceeded", + "description": "Quota exceeded error" + }, + { + "name": "Conflict", + "value": "Conflict", + "description": "Conflict error" + }, + { + "name": "Warning", + "value": "Warning", + "description": "Warning error" + } + ] + } + }, + "ErrorResponse": { + "type": "object", + "description": "Error response.", + "properties": { + "error": { + "$ref": "#/definitions/Error", + "description": "The error object." + } + }, + "required": [ + "error" + ] + }, + "ExtraInformationKind": { + "type": "string", + "description": "The extra information object kind.", + "enum": [ + "EntitySubtype", + "ListKey" + ], + "x-ms-enum": { + "name": "ExtraInformationKind", + "modelAsString": true, + "values": [ + { + "name": "EntitySubtype", + "value": "EntitySubtype", + "description": "Entity subtype extra information kind" + }, + { + "name": "ListKey", + "value": "ListKey", + "description": "List key extra information kind" + } + ] + } + }, + "InformationResolution": { + "type": "object", + "description": "Represents the information (data) entity resolution model.", + "properties": { + "value": { + "type": "number", + "format": "double", + "description": "The numeric value that the extracted text denotes." + }, + "unit": { + "$ref": "#/definitions/InformationUnit", + "description": "The information (data) Unit of measurement." + } + }, + "required": [ + "value", + "unit" + ], + "allOf": [ + { + "$ref": "#/definitions/BaseResolution" + } + ], + "x-ms-discriminator-value": "InformationResolution" + }, + "InformationUnit": { + "type": "string", + "description": "The information (data) Unit of measurement.", + "enum": [ + "Unspecified", + "Bit", + "Kilobit", + "Megabit", + "Gigabit", + "Terabit", + "Petabit", + "Byte", + "Kilobyte", + "Megabyte", + "Gigabyte", + "Terabyte", + "Petabyte" + ], + "x-ms-enum": { + "name": "InformationUnit", + "modelAsString": true, + "values": [ + { + "name": "Unspecified", + "value": "Unspecified", + "description": "Unspecified information unit" + }, + { + "name": "Bit", + "value": "Bit", + "description": "Bit information unit" + }, + { + "name": "Kilobit", + "value": "Kilobit", + "description": "Kilobit information unit" + }, + { + "name": "Megabit", + "value": "Megabit", + "description": "Megabit information unit" + }, + { + "name": "Gigabit", + "value": "Gigabit", + "description": "Gigabit information unit" + }, + { + "name": "Terabit", + "value": "Terabit", + "description": "Terabit information unit" + }, + { + "name": "Petabit", + "value": "Petabit", + "description": "Petabit information unit" + }, + { + "name": "Byte", + "value": "Byte", + "description": "Byte information unit" + }, + { + "name": "Kilobyte", + "value": "Kilobyte", + "description": "Kilobyte information unit" + }, + { + "name": "Megabyte", + "value": "Megabyte", + "description": "Megabyte information unit" + }, + { + "name": "Gigabyte", + "value": "Gigabyte", + "description": "Gigabyte information unit" + }, + { + "name": "Terabyte", + "value": "Terabyte", + "description": "Terabyte information unit" + }, + { + "name": "Petabyte", + "value": "Petabyte", + "description": "Petabyte information unit" + } + ] + } + }, + "InnerErrorCode": { + "type": "string", + "description": "Human-readable error code.", + "enum": [ + "InvalidRequest", + "InvalidParameterValue", + "KnowledgeBaseNotFound", + "AzureCognitiveSearchNotFound", + "AzureCognitiveSearchThrottling", + "ExtractionFailure", + "InvalidRequestBodyFormat", + "EmptyRequest", + "MissingInputDocuments", + "InvalidDocument", + "ModelVersionIncorrect", + "InvalidDocumentBatch", + "UnsupportedLanguageCode", + "InvalidCountryHint" + ], + "x-ms-enum": { + "name": "InnerErrorCode", + "modelAsString": true, + "values": [ + { + "name": "InvalidRequest", + "value": "InvalidRequest", + "description": "Invalid request error" + }, + { + "name": "InvalidParameterValue", + "value": "InvalidParameterValue", + "description": "Invalid parameter value error" + }, + { + "name": "KnowledgeBaseNotFound", + "value": "KnowledgeBaseNotFound", + "description": "Knowledge base not found error" + }, + { + "name": "AzureCognitiveSearchNotFound", + "value": "AzureCognitiveSearchNotFound", + "description": "Azure Cognitive Search not found error" + }, + { + "name": "AzureCognitiveSearchThrottling", + "value": "AzureCognitiveSearchThrottling", + "description": "Azure Cognitive Search throttling error" + }, + { + "name": "ExtractionFailure", + "value": "ExtractionFailure", + "description": "Extraction failure error" + }, + { + "name": "InvalidRequestBodyFormat", + "value": "InvalidRequestBodyFormat", + "description": "Invalid request body format error" + }, + { + "name": "EmptyRequest", + "value": "EmptyRequest", + "description": "Empty request error" + }, + { + "name": "MissingInputDocuments", + "value": "MissingInputDocuments", + "description": "Missing input documents error" + }, + { + "name": "InvalidDocument", + "value": "InvalidDocument", + "description": "Invalid document error" + }, + { + "name": "ModelVersionIncorrect", + "value": "ModelVersionIncorrect", + "description": "Model version incorrect error" + }, + { + "name": "InvalidDocumentBatch", + "value": "InvalidDocumentBatch", + "description": "Invalid document batch error" + }, + { + "name": "UnsupportedLanguageCode", + "value": "UnsupportedLanguageCode", + "description": "Unsupported language code error" + }, + { + "name": "InvalidCountryHint", + "value": "InvalidCountryHint", + "description": "Invalid country hint error" + } + ] + } + }, + "InnerErrorModel": { + "type": "object", + "description": "An object containing more specific information about the error. As per Microsoft One API guidelines - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses.", + "properties": { + "code": { + "$ref": "#/definitions/InnerErrorCode", + "description": "One of a server-defined set of error codes." + }, + "message": { + "type": "string", + "description": "Error message." + }, + "details": { + "type": "object", + "description": "Error details.", + "additionalProperties": { + "type": "string" + } + }, + "target": { + "type": "string", + "description": "Error target." + }, + "innererror": { + "$ref": "#/definitions/InnerErrorModel", + "description": "An object containing more specific information than the current object about the error." + } + }, + "required": [ + "code", + "message" + ] + }, + "InputModality": { + "type": "string", + "description": "Enumeration of supported conversational modalities.", + "enum": [ + "transcript", + "text" + ], + "x-ms-enum": { + "name": "InputModality", + "modelAsString": true, + "values": [ + { + "name": "transcript", + "value": "transcript", + "description": "Transcript input modality" + }, + { + "name": "text", + "value": "text", + "description": "Text input modality" + } + ] + } + }, + "KnowledgeBaseAnswer": { + "type": "object", + "description": "Represents knowledge base answer.", + "properties": { + "questions": { "type": "array", + "description": "List of questions associated with the answer.", "items": { - "$ref": "#/definitions/BaseExtraInformation" + "type": "string" + } + }, + "answer": { + "type": "string", + "description": "Answer text." + }, + "confidenceScore": { + "type": "number", + "format": "double", + "description": "Answer confidence score, value ranges from 0 to 1.", + "minimum": 0, + "maximum": 1 + }, + "id": { + "type": "integer", + "format": "int32", + "description": "ID of the QnA result." + }, + "source": { + "type": "string", + "description": "Source of QnA result." + }, + "metadata": { + "type": "object", + "description": "Metadata associated with the answer, useful to categorize or filter question answers.", + "additionalProperties": { + "type": "string" } + }, + "dialog": { + "$ref": "#/definitions/KnowledgeBaseAnswerDialog", + "description": "Dialog associated with Answer." + }, + "answerSpan": { + "$ref": "#/definitions/AnswerSpan", + "description": "Answer span object of QnA with respect to user's question." } } }, - "BaseExtraInformation": { - "description": "The abstract base object for entity extra information.", + "KnowledgeBaseAnswerContext": { "type": "object", - "discriminator": "extraInformationKind", + "description": "Context object with previous QnA's information.", "properties": { - "extraInformationKind": { - "description": "The extra information object kind.", + "previousQnaId": { + "type": "integer", + "format": "int32", + "description": "Previous turn top answer result QnA ID." + }, + "previousUserQuery": { "type": "string", - "enum": [ - "EntitySubtype", - "ListKey" - ], - "x-ms-enum": { - "name": "ExtraInformationKind", - "modelAsString": true - } + "description": "Previous user query." } }, "required": [ - "extraInformationKind" + "previousQnaId" ] }, - "EntitySubtype": { - "description": "The concrete entity Subtype model of extra information.", - "allOf": [ - { - "$ref": "#/definitions/BaseExtraInformation" + "KnowledgeBaseAnswerDialog": { + "type": "object", + "description": "Dialog associated with Answer.", + "properties": { + "isContextOnly": { + "type": "boolean", + "description": "To mark if a prompt is relevant only with a previous question or not. If true, do not include this QnA as search result for queries without context; otherwise, if false, ignores context and includes this QnA in search result." + }, + "prompts": { + "type": "array", + "description": "List of prompts associated with the answer.", + "maxItems": 20, + "items": { + "$ref": "#/definitions/KnowledgeBaseAnswerPrompt" + }, + "x-ms-identifiers": [] } - ], + } + }, + "KnowledgeBaseAnswerPrompt": { "type": "object", - "x-ms-discriminator-value": "EntitySubtype", + "description": "Prompt for an answer.", "properties": { - "value": { + "displayOrder": { + "type": "integer", + "format": "int32", + "description": "Index of the prompt - used in ordering of the prompts." + }, + "qnaId": { + "type": "integer", + "format": "int32", + "description": "QnA ID corresponding to the prompt." + }, + "displayText": { "type": "string", - "description": "The Subtype of an extracted entity type." + "description": "Text displayed to represent a follow up question prompt.", + "maxLength": 200 + } + } + }, + "LengthResolution": { + "type": "object", + "description": "Represents the length entity resolution model.", + "properties": { + "value": { + "type": "number", + "format": "double", + "description": "The numeric value that the extracted text denotes." + }, + "unit": { + "$ref": "#/definitions/LengthUnit", + "description": "The length Unit of measurement" + } + }, + "required": [ + "value", + "unit" + ], + "allOf": [ + { + "$ref": "#/definitions/BaseResolution" } + ], + "x-ms-discriminator-value": "LengthResolution" + }, + "LengthUnit": { + "type": "string", + "description": "The length unit of measurement.", + "enum": [ + "Unspecified", + "Kilometer", + "Hectometer", + "Decameter", + "Meter", + "Decimeter", + "Centimeter", + "Millimeter", + "Micrometer", + "Nanometer", + "Picometer", + "Mile", + "Yard", + "Inch", + "Foot", + "LightYear", + "Pt" + ], + "x-ms-enum": { + "name": "LengthUnit", + "modelAsString": true, + "values": [ + { + "name": "Unspecified", + "value": "Unspecified", + "description": "Unspecified length unit" + }, + { + "name": "Kilometer", + "value": "Kilometer", + "description": "Kilometer length unit" + }, + { + "name": "Hectometer", + "value": "Hectometer", + "description": "Hectometer length unit" + }, + { + "name": "Decameter", + "value": "Decameter", + "description": "Decameter length unit" + }, + { + "name": "Meter", + "value": "Meter", + "description": "Meter length unit" + }, + { + "name": "Decimeter", + "value": "Decimeter", + "description": "Decimeter length unit" + }, + { + "name": "Centimeter", + "value": "Centimeter", + "description": "Centimeter length unit" + }, + { + "name": "Millimeter", + "value": "Millimeter", + "description": "Millimeter length unit" + }, + { + "name": "Micrometer", + "value": "Micrometer", + "description": "Micrometer length unit" + }, + { + "name": "Nanometer", + "value": "Nanometer", + "description": "Nanometer length unit" + }, + { + "name": "Picometer", + "value": "Picometer", + "description": "Picometer length unit" + }, + { + "name": "Mile", + "value": "Mile", + "description": "Mile length unit" + }, + { + "name": "Yard", + "value": "Yard", + "description": "Yard length unit" + }, + { + "name": "Inch", + "value": "Inch", + "description": "Inch length unit" + }, + { + "name": "Foot", + "value": "Foot", + "description": "Foot length unit" + }, + { + "name": "LightYear", + "value": "LightYear", + "description": "Light year length unit" + }, + { + "name": "Pt", + "value": "Pt", + "description": "Point length unit" + } + ] } }, "ListKey": { + "type": "object", "description": "The list key extra data kind.", + "properties": { + "key": { + "type": "string", + "description": "The canonical form of the extracted entity." + } + }, "allOf": [ { "$ref": "#/definitions/BaseExtraInformation" } ], + "x-ms-discriminator-value": "ListKey" + }, + "LuisCallingOptions": { "type": "object", - "x-ms-discriminator-value": "ListKey", + "description": "This customizes how the service calls LUIS Generally Available projects.", "properties": { - "key": { + "verbose": { + "type": "boolean", + "description": "Enable verbose response." + }, + "log": { + "type": "boolean", + "description": "Save log to add in training utterances later." + }, + "show-all-intents": { + "type": "boolean", + "description": "Set true to show all intents." + }, + "timezoneOffset": { + "type": "integer", + "format": "int32", + "description": "The timezone offset for the location of the request." + }, + "spellCheck": { + "type": "boolean", + "description": "Enable spell checking." + }, + "bing-spell-check-subscription-key": { "type": "string", - "description": "The canonical form of the extracted entity." + "description": "The subscription key to use when enabling Bing spell check" } } }, - "BaseResolution": { - "description": "The abstract base class for entity resolutions.", + "LuisParameters": { "type": "object", - "discriminator": "resolutionKind", + "description": "This is a set of request parameters for LUIS Generally Available projects.", "properties": { - "resolutionKind": { - "description": "The entity resolution object kind.", + "query": { "type": "string", + "description": "The utterance to predict.", + "maxLength": 500 + }, + "callingOptions": { + "$ref": "#/definitions/LuisCallingOptions", + "description": "This customizes how the service calls LUIS Generally Available projects." + } + }, + "allOf": [ + { + "$ref": "#/definitions/AnalysisParameters" + } + ], + "x-ms-discriminator-value": "Luis" + }, + "LuisResult": { + "type": "object", + "description": "It is the response from a LUIS Generally Available application.", + "additionalProperties": {} + }, + "LuisTargetIntentResult": { + "type": "object", + "description": "It is a wrap up of LUIS Generally Available response.", + "properties": { + "result": { + "$ref": "#/definitions/LuisResult", + "description": "The actual response from a LUIS Generally Available application." + } + }, + "allOf": [ + { + "$ref": "#/definitions/TargetIntentResult" + } + ], + "x-ms-discriminator-value": "Luis" + }, + "MetadataFilter": { + "type": "object", + "description": "Find QnAs that are associated with the given list of metadata.", + "properties": { + "metadata": { + "type": "array", + "description": "List of metadata.", + "items": { + "$ref": "#/definitions/MetadataRecord" + }, + "x-ms-identifiers": [] + }, + "logicalOperation": { + "type": "string", + "description": "Operation used to join metadata filters.", + "default": "AND", "enum": [ - "BooleanResolution", - "DateTimeResolution", - "NumberResolution", - "OrdinalResolution", - "SpeedResolution", - "WeightResolution", - "LengthResolution", - "VolumeResolution", - "AreaResolution", - "AgeResolution", - "InformationResolution", - "TemperatureResolution", - "CurrencyResolution", - "NumericRangeResolution", - "TemporalSpanResolution" + "AND", + "OR" ], "x-ms-enum": { - "name": "ResolutionKind", - "modelAsString": true + "name": "LogicalOperationKind", + "modelAsString": true, + "values": [ + { + "name": "AND", + "value": "AND" + }, + { + "name": "OR", + "value": "OR" + } + ] } } + } + }, + "MetadataRecord": { + "type": "object", + "description": "Object to provide the key value pair for each metadata.", + "properties": { + "key": { + "type": "string", + "description": "Metadata Key from Metadata dictionary used in the QnA." + }, + "value": { + "type": "string", + "description": "Metadata Value from Metadata dictionary used in the QnA." + } }, "required": [ - "resolutionKind" + "key", + "value" ] }, - "QuantityResolution": { - "description": "Represents resolutions for quantities.", + "NoneLinkedTargetIntentResult": { + "type": "object", + "description": "A wrap up of non-linked intent response.", + "properties": { + "result": { + "$ref": "#/definitions/ConversationResult", + "description": "The actual response from a Conversation project." + } + }, + "allOf": [ + { + "$ref": "#/definitions/TargetIntentResult" + } + ], + "x-ms-discriminator-value": "NonLinked" + }, + "NumberKind": { + "type": "string", + "description": "The type of the extracted number entity.", + "enum": [ + "Integer", + "Decimal", + "Power", + "Fraction", + "Percent", + "Unspecified" + ], + "x-ms-enum": { + "name": "NumberKind", + "modelAsString": true, + "values": [ + { + "name": "Integer", + "value": "Integer", + "description": "Integer number" + }, + { + "name": "Decimal", + "value": "Decimal", + "description": "Decimal number" + }, + { + "name": "Power", + "value": "Power", + "description": "Power number" + }, + { + "name": "Fraction", + "value": "Fraction", + "description": "Fraction number" + }, + { + "name": "Percent", + "value": "Percent", + "description": "Percent number" + }, + { + "name": "Unspecified", + "value": "Unspecified", + "description": "Unspecified number kind" + } + ] + } + }, + "NumberResolution": { "type": "object", + "description": "A resolution for numeric entity instances.", "properties": { + "numberKind": { + "$ref": "#/definitions/NumberKind", + "description": "The type of the extracted number entity." + }, "value": { "type": "number", "format": "double", - "description": "The numeric value that the extracted text denotes." + "description": "A numeric representation of what the extracted text denotes." } }, "required": [ + "numberKind", "value" - ] - }, - "AgeResolution": { - "description": "Represents the Age entity resolution model.", + ], "allOf": [ { "$ref": "#/definitions/BaseResolution" - }, - { - "$ref": "#/definitions/QuantityResolution" } ], + "x-ms-discriminator-value": "NumberResolution" + }, + "NumericRangeResolution": { "type": "object", - "x-ms-discriminator-value": "AgeResolution", + "description": "represents the resolution of numeric intervals.", "properties": { - "unit": { - "type": "string", - "enum": [ - "Unspecified", - "Year", - "Month", - "Week", - "Day" - ], - "x-ms-enum": { - "name": "AgeUnit", - "modelAsString": true - }, - "description": "The Age Unit of measurement" + "rangeKind": { + "$ref": "#/definitions/RangeKind", + "description": "The kind of range that the resolution object represents." + }, + "minimum": { + "type": "number", + "format": "double", + "description": "The beginning value of the interval." + }, + "maximum": { + "type": "number", + "format": "double", + "description": "The ending value of the interval." } }, "required": [ - "unit" - ] - }, - "VolumeResolution": { - "description": "Represents the volume entity resolution model.", + "rangeKind", + "minimum", + "maximum" + ], "allOf": [ { "$ref": "#/definitions/BaseResolution" - }, - { - "$ref": "#/definitions/QuantityResolution" } ], + "x-ms-discriminator-value": "NumericRangeResolution" + }, + "OrchestrationPrediction": { "type": "object", - "x-ms-discriminator-value": "VolumeResolution", + "description": "This represents the prediction result of an Orchestration project.", "properties": { - "unit": { - "type": "string", - "enum": [ - "Unspecified", - "CubicMeter", - "CubicCentimeter", - "CubicMillimeter", - "Hectoliter", - "Decaliter", - "Liter", - "Centiliter", - "Milliliter", - "CubicYard", - "CubicInch", - "CubicFoot", - "CubicMile", - "FluidOunce", - "Teaspoon", - "Tablespoon", - "Pint", - "Quart", - "Cup", - "Gill", - "Pinch", - "FluidDram", - "Barrel", - "Minim", - "Cord", - "Peck", - "Bushel", - "Hogshead" - ], - "x-ms-enum": { - "name": "VolumeUnit", - "modelAsString": true - }, - "description": "The Volume Unit of measurement" + "intents": { + "type": "object", + "description": "A dictionary that contains all intents. A key is an intent name and a value is its confidence score and target type. The top intent's value also contains the actual response from the target project.", + "additionalProperties": { + "$ref": "#/definitions/TargetIntentResult" + } } }, "required": [ - "unit" - ] - }, - "SpeedResolution": { - "description": "Represents the speed entity resolution model.", + "intents" + ], "allOf": [ { - "$ref": "#/definitions/BaseResolution" - }, - { - "$ref": "#/definitions/QuantityResolution" + "$ref": "#/definitions/BasePrediction" } ], + "x-ms-discriminator-value": "Orchestration" + }, + "OrdinalResolution": { "type": "object", - "x-ms-discriminator-value": "SpeedResolution", + "description": "A resolution for ordinal numbers entity instances.", "properties": { - "unit": { + "offset": { "type": "string", - "enum": [ - "Unspecified", - "MetersPerSecond", - "KilometersPerHour", - "KilometersPerMinute", - "KilometersPerSecond", - "MilesPerHour", - "Knot", - "FootPerSecond", - "FootPerMinute", - "YardsPerMinute", - "YardsPerSecond", - "MetersPerMillisecond", - "CentimetersPerMillisecond", - "KilometersPerMillisecond" - ], - "x-ms-enum": { - "name": "SpeedUnit", - "modelAsString": true - }, - "description": "The speed Unit of measurement" + "description": "The offset with respect to the reference (e.g., offset = -1 indicates the second to last)" + }, + "relativeTo": { + "$ref": "#/definitions/RelativeTo", + "description": "The reference point that the ordinal number denotes." + }, + "value": { + "type": "string", + "description": "A simple arithmetic expression that the ordinal denotes." } }, "required": [ - "unit" - ] - }, - "AreaResolution": { - "description": "Represents the area entity resolution model.", + "offset", + "relativeTo", + "value" + ], "allOf": [ { "$ref": "#/definitions/BaseResolution" - }, - { - "$ref": "#/definitions/QuantityResolution" } ], + "x-ms-discriminator-value": "OrdinalResolution" + }, + "QueryFilters": { "type": "object", - "x-ms-discriminator-value": "AreaResolution", + "description": "filters over knowledge base.", "properties": { - "unit": { + "metadataFilter": { + "$ref": "#/definitions/MetadataFilter", + "description": "filters over knowledge base." + }, + "sourceFilter": { + "$ref": "#/definitions/SourceFilter", + "description": "filters over knowledge base." + }, + "logicalOperation": { "type": "string", + "description": "Logical operation used to join metadata filter with source filter.", + "default": "AND", "enum": [ - "Unspecified", - "SquareKilometer", - "SquareHectometer", - "SquareDecameter", - "SquareDecimeter", - "SquareMeter", - "SquareCentimeter", - "SquareMillimeter", - "SquareInch", - "SquareFoot", - "SquareMile", - "SquareYard", - "Acre" + "AND", + "OR" ], "x-ms-enum": { - "name": "AreaUnit", - "modelAsString": true - }, - "description": "The area Unit of measurement" + "name": "LogicalOperationKind", + "modelAsString": true, + "values": [ + { + "name": "AND", + "value": "AND" + }, + { + "name": "OR", + "value": "OR" + } + ] + } } - }, - "required": [ - "unit" - ] + } }, - "LengthResolution": { - "description": "Represents the length entity resolution model.", - "allOf": [ - { - "$ref": "#/definitions/BaseResolution" - }, - { - "$ref": "#/definitions/QuantityResolution" - } - ], + "QuestionAnsweringParameters": { "type": "object", - "x-ms-discriminator-value": "LengthResolution", + "description": "This is a set of request parameters for Question Answering knowledge bases.", "properties": { - "unit": { - "type": "string", - "enum": [ - "Unspecified", - "Kilometer", - "Hectometer", - "Decameter", - "Meter", - "Decimeter", - "Centimeter", - "Millimeter", - "Micrometer", - "Nanometer", - "Picometer", - "Mile", - "Yard", - "Inch", - "Foot", - "LightYear", - "Pt" - ], - "x-ms-enum": { - "name": "LengthUnit", - "modelAsString": true - }, - "description": "The length Unit of measurement" + "callingOptions": { + "$ref": "#/definitions/AnswersOptions", + "description": "The options sent to a Question Answering KB." } }, - "required": [ - "unit" - ] - }, - "InformationResolution": { - "description": "Represents the information (data) entity resolution model.", "allOf": [ { - "$ref": "#/definitions/BaseResolution" - }, - { - "$ref": "#/definitions/QuantityResolution" + "$ref": "#/definitions/AnalysisParameters" } ], + "x-ms-discriminator-value": "QuestionAnswering" + }, + "QuestionAnsweringTargetIntentResult": { "type": "object", - "x-ms-discriminator-value": "InformationResolution", + "description": "It is a wrap up a Question Answering KB response.", "properties": { - "unit": { - "type": "string", - "enum": [ - "Unspecified", - "Bit", - "Kilobit", - "Megabit", - "Gigabit", - "Terabit", - "Petabit", - "Byte", - "Kilobyte", - "Megabyte", - "Gigabyte", - "Terabyte", - "Petabyte" - ], - "x-ms-enum": { - "name": "InformationUnit", - "modelAsString": true - }, - "description": "The information (data) Unit of measurement." + "result": { + "$ref": "#/definitions/AnswersResult", + "description": "The generated answer by a Question Answering KB." } }, - "required": [ - "unit" - ] - }, - "TemperatureResolution": { - "description": "Represents the temperature entity resolution model.", "allOf": [ { - "$ref": "#/definitions/BaseResolution" - }, - { - "$ref": "#/definitions/QuantityResolution" + "$ref": "#/definitions/TargetIntentResult" } ], - "type": "object", - "x-ms-discriminator-value": "TemperatureResolution", - "properties": { - "unit": { - "type": "string", - "enum": [ - "Unspecified", - "Fahrenheit", - "Kelvin", - "Rankine", - "Celsius" - ], - "x-ms-enum": { - "name": "TemperatureUnit", - "modelAsString": true + "x-ms-discriminator-value": "QuestionAnswering" + }, + "RangeKind": { + "type": "string", + "description": "The kind of range that the resolution object represents.", + "enum": [ + "Number", + "Speed", + "Weight", + "Length", + "Volume", + "Area", + "Age", + "Information", + "Temperature", + "Currency" + ], + "x-ms-enum": { + "name": "RangeKind", + "modelAsString": true, + "values": [ + { + "name": "Number", + "value": "Number", + "description": "Number range" + }, + { + "name": "Speed", + "value": "Speed", + "description": "Speed range" + }, + { + "name": "Weight", + "value": "Weight", + "description": "Weight range" + }, + { + "name": "Length", + "value": "Length", + "description": "Length range" + }, + { + "name": "Volume", + "value": "Volume", + "description": "Volume range" + }, + { + "name": "Area", + "value": "Area", + "description": "Area range" + }, + { + "name": "Age", + "value": "Age", + "description": "Age range" + }, + { + "name": "Information", + "value": "Information", + "description": "Information range" + }, + { + "name": "Temperature", + "value": "Temperature", + "description": "Temperature range" + }, + { + "name": "Currency", + "value": "Currency", + "description": "Currency range" + } + ] + } + }, + "RankerKind": { + "type": "string", + "description": "Type of ranker to be used", + "enum": [ + "Default", + "QuestionOnly" + ], + "x-ms-enum": { + "name": "RankerKind", + "modelAsString": true, + "values": [ + { + "name": "Default", + "value": "Default", + "description": "Default ranker." + }, + { + "name": "QuestionOnly", + "value": "QuestionOnly", + "description": "Question only ranker." + } + ] + } + }, + "RelativeTo": { + "type": "string", + "description": "The reference point that the ordinal number denotes.", + "enum": [ + "Current", + "End", + "Start" + ], + "x-ms-enum": { + "name": "RelativeTo", + "modelAsString": true, + "values": [ + { + "name": "Current", + "value": "Current", + "description": "Current state" + }, + { + "name": "End", + "value": "End", + "description": "End state" + }, + { + "name": "Start", + "value": "Start", + "description": "Start state" + } + ] + } + }, + "ResolutionKind": { + "type": "string", + "description": "The entity resolution object kind.", + "enum": [ + "BooleanResolution", + "DateTimeResolution", + "NumberResolution", + "OrdinalResolution", + "SpeedResolution", + "WeightResolution", + "LengthResolution", + "VolumeResolution", + "AreaResolution", + "AgeResolution", + "InformationResolution", + "TemperatureResolution", + "CurrencyResolution", + "NumericRangeResolution", + "TemporalSpanResolution" + ], + "x-ms-enum": { + "name": "ResolutionKind", + "modelAsString": true, + "values": [ + { + "name": "BooleanResolution", + "value": "BooleanResolution", + "description": "Resolution of a boolean entity" + }, + { + "name": "DateTimeResolution", + "value": "DateTimeResolution", + "description": "Resolution of a date/time entity" + }, + { + "name": "NumberResolution", + "value": "NumberResolution", + "description": "Resolution of a number entity" + }, + { + "name": "OrdinalResolution", + "value": "OrdinalResolution", + "description": "Resolution of an ordinal entity" + }, + { + "name": "SpeedResolution", + "value": "SpeedResolution", + "description": "Resolution of a speed entity" + }, + { + "name": "WeightResolution", + "value": "WeightResolution", + "description": "Resolution of a weight entity" + }, + { + "name": "LengthResolution", + "value": "LengthResolution", + "description": "Resolution of a length entity" + }, + { + "name": "VolumeResolution", + "value": "VolumeResolution", + "description": "Resolution of a volume entity" + }, + { + "name": "AreaResolution", + "value": "AreaResolution", + "description": "Resolution of an area entity" + }, + { + "name": "AgeResolution", + "value": "AgeResolution", + "description": "Resolution of an age entity" + }, + { + "name": "InformationResolution", + "value": "InformationResolution", + "description": "Resolution of an information entity" + }, + { + "name": "TemperatureResolution", + "value": "TemperatureResolution", + "description": "Resolution of a temperature entity" + }, + { + "name": "CurrencyResolution", + "value": "CurrencyResolution", + "description": "Resolution of a currency entity" }, - "description": "The temperature Unit of measurement." - } - }, - "required": [ - "unit" - ] + { + "name": "NumericRangeResolution", + "value": "NumericRangeResolution", + "description": "Resolution of a numeric range entity" + }, + { + "name": "TemporalSpanResolution", + "value": "TemporalSpanResolution", + "description": "Resolution of a temporal span entity" + } + ] + } }, - "WeightResolution": { - "description": "Represents the weight entity resolution model.", - "allOf": [ - { - "$ref": "#/definitions/BaseResolution" - }, - { - "$ref": "#/definitions/QuantityResolution" - } - ], + "ShortAnswerOptions": { "type": "object", - "x-ms-discriminator-value": "WeightResolution", + "description": "To configure Answer span prediction feature.", "properties": { - "unit": { - "type": "string", - "enum": [ - "Unspecified", - "Kilogram", - "Gram", - "Milligram", - "Gallon", - "MetricTon", - "Ton", - "Pound", - "Ounce", - "Grain", - "PennyWeight", - "LongTonBritish", - "ShortTonUS", - "ShortHundredWeightUS", - "Stone", - "Dram" - ], - "x-ms-enum": { - "name": "WeightUnit", - "modelAsString": true - }, - "description": "The weight Unit of measurement." - } - }, - "required": [ - "unit" - ] - }, - "CurrencyResolution": { - "description": "Represents the currency entity resolution model.", - "allOf": [ - { - "$ref": "#/definitions/BaseResolution" + "enable": { + "type": "boolean", + "description": "Enable or disable Answer Span prediction.", + "default": true }, - { - "$ref": "#/definitions/QuantityResolution" + "confidenceScoreThreshold": { + "type": "number", + "format": "double", + "description": "Minimum threshold score required to include an answer span, value ranges from 0 to 1.", + "minimum": 0, + "maximum": 1 + }, + "topAnswersWithSpan": { + "type": "integer", + "format": "int32", + "description": "Number of Top answers to be considered for span prediction from 1 to 10.", + "minimum": 1, + "maximum": 10 } - ], + } + }, + "SourceFilter": { + "type": "array", + "description": "Find QnAs that are associated with any of the given list of sources in knowledge base.", + "items": { + "type": "string" + } + }, + "SpeedResolution": { "type": "object", - "x-ms-discriminator-value": "CurrencyResolution", + "description": "Represents the speed entity resolution model.", "properties": { - "ISO4217": { - "type": "string", - "description": "The alphabetic code based on another ISO standard, ISO 3166, which lists the codes for country names. The first two letters of the ISO 4217 three-letter code are the same as the code for the country name, and, where possible, the third letter corresponds to the first letter of the currency name." - }, "value": { "type": "number", "format": "double", - "description": "The money amount captured in the extracted entity" + "description": "The numeric value that the extracted text denotes." }, "unit": { - "type": "string", - "description": "The unit of the amount captured in the extracted entity" + "$ref": "#/definitions/SpeedUnit", + "description": "The speed Unit of measurement" } }, "required": [ "value", "unit" - ] - }, - "BooleanResolution": { - "description": "A resolution for boolean expressions", + ], "allOf": [ { "$ref": "#/definitions/BaseResolution" } ], - "type": "object", - "x-ms-discriminator-value": "BooleanResolution", - "properties": { - "value": { - "type": "boolean" - } - }, - "required": [ - "value" - ] + "x-ms-discriminator-value": "SpeedResolution" }, - "DateTimeResolution": { - "description": "A resolution for datetime entity instances.", - "allOf": [ - { - "$ref": "#/definitions/BaseResolution" - } + "SpeedUnit": { + "type": "string", + "description": "The speed Unit of measurement", + "enum": [ + "Unspecified", + "MetersPerSecond", + "KilometersPerHour", + "KilometersPerMinute", + "KilometersPerSecond", + "MilesPerHour", + "Knot", + "FootPerSecond", + "FootPerMinute", + "YardsPerMinute", + "YardsPerSecond", + "MetersPerMillisecond", + "CentimetersPerMillisecond", + "KilometersPerMillisecond" ], + "x-ms-enum": { + "name": "SpeedUnit", + "modelAsString": true, + "values": [ + { + "name": "Unspecified", + "value": "Unspecified", + "description": "Unspecified speed unit" + }, + { + "name": "MetersPerSecond", + "value": "MetersPerSecond", + "description": "Meters per second speed unit" + }, + { + "name": "KilometersPerHour", + "value": "KilometersPerHour", + "description": "Kilometers per hour speed unit" + }, + { + "name": "KilometersPerMinute", + "value": "KilometersPerMinute", + "description": "Kilometers per minute speed unit" + }, + { + "name": "KilometersPerSecond", + "value": "KilometersPerSecond", + "description": "Kilometers per second speed unit" + }, + { + "name": "MilesPerHour", + "value": "MilesPerHour", + "description": "Miles per hour speed unit" + }, + { + "name": "Knot", + "value": "Knot", + "description": "Knot speed unit" + }, + { + "name": "FootPerSecond", + "value": "FootPerSecond", + "description": "Foot per second speed unit" + }, + { + "name": "FootPerMinute", + "value": "FootPerMinute", + "description": "Foot per minute speed unit" + }, + { + "name": "YardsPerMinute", + "value": "YardsPerMinute", + "description": "Yards per minute speed unit" + }, + { + "name": "YardsPerSecond", + "value": "YardsPerSecond", + "description": "Yards per second speed unit" + }, + { + "name": "MetersPerMillisecond", + "value": "MetersPerMillisecond", + "description": "Meters per millisecond speed unit" + }, + { + "name": "CentimetersPerMillisecond", + "value": "CentimetersPerMillisecond", + "description": "Centimeters per millisecond speed unit" + }, + { + "name": "KilometersPerMillisecond", + "value": "KilometersPerMillisecond", + "description": "Kilometers per millisecond speed unit" + } + ] + } + }, + "TargetIntentResult": { "type": "object", - "x-ms-discriminator-value": "DateTimeResolution", + "description": "This is the base class of an intent prediction", "properties": { - "timex": { - "$ref": "#/definitions/TimeExpression" - }, - "dateTimeSubKind": { - "type": "string", - "enum": [ - "Time", - "Date", - "DateTime", - "Duration", - "Set" - ], - "x-ms-enum": { - "name": "DateTimeSubKind", - "modelAsString": true - }, - "description": "The DateTime SubKind" + "targetProjectKind": { + "$ref": "#/definitions/targetProjectKind", + "description": "This is the base class of an intent prediction" }, - "value": { + "apiVersion": { "type": "string", - "description": "The actual time that the extracted text denote." + "description": "The API version used to call a target service." }, - "modifier": { - "$ref": "#/definitions/TemporalModifier" + "confidenceScore": { + "type": "number", + "format": "double", + "description": "The prediction score and it ranges from 0.0 to 1.0.", + "minimum": 0, + "maximum": 1 } }, + "discriminator": "targetProjectKind", "required": [ - "timex", - "dateTimeSubKind", - "value" + "targetProjectKind", + "confidenceScore" ] }, - "NumberResolution": { - "description": "A resolution for numeric entity instances.", - "allOf": [ - { - "$ref": "#/definitions/BaseResolution" - } - ], + "TemperatureResolution": { "type": "object", - "x-ms-discriminator-value": "NumberResolution", + "description": "Represents the temperature entity resolution model.", "properties": { - "numberKind": { - "type": "string", - "enum": [ - "Integer", - "Decimal", - "Power", - "Fraction", - "Percent", - "Unspecified" - ], - "x-ms-enum": { - "name": "NumberKind", - "modelAsString": true - }, - "description": "The type of the extracted number entity." - }, "value": { "type": "number", "format": "double", - "description": "A numeric representation of what the extracted text denotes." + "description": "The numeric value that the extracted text denotes." + }, + "unit": { + "$ref": "#/definitions/TemperatureUnit", + "description": "The temperature Unit of measurement." } }, "required": [ - "numberKind", - "value" - ] - }, - "OrdinalResolution": { - "description": "A resolution for ordinal numbers entity instances.", + "value", + "unit" + ], "allOf": [ { "$ref": "#/definitions/BaseResolution" } ], - "type": "object", - "x-ms-discriminator-value": "OrdinalResolution", - "properties": { - "offset": { - "type": "string", - "description": "The offset With respect to the reference (e.g., offset = -1 in \"show me the second to last\"" - }, - "relativeTo": { - "type": "string", - "enum": [ - "Current", - "End", - "Start" - ], - "x-ms-enum": { - "name": "RelativeTo", - "modelAsString": true + "x-ms-discriminator-value": "TemperatureResolution" + }, + "TemperatureUnit": { + "type": "string", + "description": "The temperature Unit of measurement.", + "enum": [ + "Unspecified", + "Fahrenheit", + "Kelvin", + "Rankine", + "Celsius" + ], + "x-ms-enum": { + "name": "TemperatureUnit", + "modelAsString": true, + "values": [ + { + "name": "Unspecified", + "value": "Unspecified", + "description": "Unspecified temperature unit" + }, + { + "name": "Fahrenheit", + "value": "Fahrenheit", + "description": "Fahrenheit temperature unit" + }, + { + "name": "Kelvin", + "value": "Kelvin", + "description": "Kelvin temperature unit" + }, + { + "name": "Rankine", + "value": "Rankine", + "description": "Rankine temperature unit" + }, + { + "name": "Celsius", + "value": "Celsius", + "description": "Celsius temperature unit" + } + ] + } + }, + "TemporalModifier": { + "type": "string", + "description": "An optional modifier of a date/time instance.", + "enum": [ + "AfterApprox", + "Before", + "BeforeStart", + "Approx", + "ReferenceUndefined", + "SinceEnd", + "AfterMid", + "Start", + "After", + "BeforeEnd", + "Until", + "End", + "Less", + "Since", + "AfterStart", + "BeforeApprox", + "Mid", + "More" + ], + "x-ms-enum": { + "name": "TemporalModifier", + "modelAsString": true, + "values": [ + { + "name": "AfterApprox", + "value": "AfterApprox", + "description": "AfterApprox temporal modifier" + }, + { + "name": "Before", + "value": "Before", + "description": "Before temporal modifier" + }, + { + "name": "BeforeStart", + "value": "BeforeStart", + "description": "BeforeStart temporal modifier" + }, + { + "name": "Approx", + "value": "Approx", + "description": "Approx temporal modifier" + }, + { + "name": "ReferenceUndefined", + "value": "ReferenceUndefined", + "description": "ReferenceUndefined temporal modifier" + }, + { + "name": "SinceEnd", + "value": "SinceEnd", + "description": "SinceEnd temporal modifier" + }, + { + "name": "AfterMid", + "value": "AfterMid", + "description": "AfterMid temporal modifier" + }, + { + "name": "Start", + "value": "Start", + "description": "Start temporal modifier" + }, + { + "name": "After", + "value": "After", + "description": "After temporal modifier" + }, + { + "name": "BeforeEnd", + "value": "BeforeEnd", + "description": "BeforeEnd temporal modifier" + }, + { + "name": "Until", + "value": "Until", + "description": "Until temporal modifier" + }, + { + "name": "End", + "value": "End", + "description": "End temporal modifier" + }, + { + "name": "Less", + "value": "Less", + "description": "Less temporal modifier" + }, + { + "name": "Since", + "value": "Since", + "description": "Since temporal modifier" + }, + { + "name": "AfterStart", + "value": "AfterStart", + "description": "AfterStart temporal modifier" + }, + { + "name": "BeforeApprox", + "value": "BeforeApprox", + "description": "BeforeApprox temporal modifier" + }, + { + "name": "Mid", + "value": "Mid", + "description": "Mid temporal modifier" }, - "description": "The reference point that the ordinal number denotes." - }, - "value": { - "type": "string", - "description": "A simple arithmetic expression that the ordinal denotes." - } - }, - "required": [ - "offset", - "relativeTo", - "value" - ] + { + "name": "More", + "value": "More", + "description": "More temporal modifier" + } + ] + } }, "TemporalSpanResolution": { - "description": "represents the resolution of a date and/or time span.", - "allOf": [ - { - "$ref": "#/definitions/BaseResolution" - } - ], "type": "object", - "x-ms-discriminator-value": "TemporalSpanResolution", + "description": "represents the resolution of a date and/or time span.", "properties": { "begin": { - "$ref": "#/definitions/TimeExpression" + "type": "string", + "description": "represents the resolution of a date and/or time span. An extended ISO 8601 date/time representation as described in (https://github.com/Microsoft/Recognizers-Text/blob/master/Patterns/English/English-DateTime.yaml)" }, "end": { - "$ref": "#/definitions/TimeExpression" + "type": "string", + "description": "represents the resolution of a date and/or time span. An extended ISO 8601 date/time representation as described in (https://github.com/Microsoft/Recognizers-Text/blob/master/Patterns/English/English-DateTime.yaml)" }, "duration": { "type": "string", "description": "An optional duration value formatted based on the ISO 8601 (https://en.wikipedia.org/wiki/ISO_8601#Durations)" }, "modifier": { - "$ref": "#/definitions/TemporalModifier" + "$ref": "#/definitions/TemporalModifier", + "description": "An optional modifier of a date/time instance." } - } - }, - "NumericRangeResolution": { - "description": "represents the resolution of numeric intervals.", + }, "allOf": [ { "$ref": "#/definitions/BaseResolution" } ], + "x-ms-discriminator-value": "TemporalSpanResolution" + }, + "TextConversationItem": { "type": "object", - "x-ms-discriminator-value": "NumericRangeResolution", + "description": "The text modality of an input conversation.", "properties": { - "rangeKind": { + "id": { "type": "string", - "enum": [ - "Number", - "Speed", - "Weight", - "Length", - "Volume", - "Area", - "Age", - "Information", - "Temperature", - "Currency" - ], - "x-ms-enum": { - "name": "RangeKind", - "modelAsString": true - }, - "description": "The kind of range that the resolution object represents." + "description": "The ID of a conversation item." }, - "minimum": { - "type": "number", - "format": "double", - "description": "The beginning value of the interval." + "participantId": { + "type": "string", + "description": "The participant ID of a conversation item." }, - "maximum": { + "language": { + "type": "string", + "description": "The override language of a conversation item in BCP 47 language representation." + }, + "modality": { + "$ref": "#/definitions/InputModality", + "description": "Enumeration of supported conversational modalities." + }, + "text": { + "type": "string", + "description": "The text input" + } + }, + "required": [ + "id", + "participantId", + "text" + ] + }, + "VolumeResolution": { + "type": "object", + "description": "Represents the volume entity resolution model.", + "properties": { + "value": { "type": "number", "format": "double", - "description": "The ending value of the interval." + "description": "The numeric value that the extracted text denotes." + }, + "unit": { + "$ref": "#/definitions/VolumeUnit", + "description": "The Volume Unit of measurement" } }, "required": [ - "rangeKind", - "minimum", - "maximum" - ] + "value", + "unit" + ], + "allOf": [ + { + "$ref": "#/definitions/BaseResolution" + } + ], + "x-ms-discriminator-value": "VolumeResolution" }, - "TemporalModifier": { + "VolumeUnit": { "type": "string", - "description": "An optional modifier of a date/time instance.", + "description": "The Volume Unit of measurement", "enum": [ - "AfterApprox", - "Before", - "BeforeStart", - "Approx", - "ReferenceUndefined", - "SinceEnd", - "AfterMid", - "Start", - "After", - "BeforeEnd", - "Until", - "End", - "Less", - "Since", - "AfterStart", - "BeforeApprox", - "Mid", - "More" + "Unspecified", + "CubicMeter", + "CubicCentimeter", + "CubicMillimeter", + "Hectoliter", + "Decaliter", + "Liter", + "Centiliter", + "Milliliter", + "CubicYard", + "CubicInch", + "CubicFoot", + "CubicMile", + "FluidOunce", + "Teaspoon", + "Tablespoon", + "Pint", + "Quart", + "Cup", + "Gill", + "Pinch", + "FluidDram", + "Barrel", + "Minim", + "Cord", + "Peck", + "Bushel", + "Hogshead" ], "x-ms-enum": { - "name": "TemporalModifier", - "modelAsString": true + "name": "VolumeUnit", + "modelAsString": true, + "values": [ + { + "name": "Unspecified", + "value": "Unspecified", + "description": "Unspecified volume unit." + }, + { + "name": "CubicMeter", + "value": "CubicMeter", + "description": "Volume unit in cubic meters." + }, + { + "name": "CubicCentimeter", + "value": "CubicCentimeter", + "description": "Volume unit in cubic centimeters." + }, + { + "name": "CubicMillimeter", + "value": "CubicMillimeter", + "description": "Volume unit in cubic millimeters." + }, + { + "name": "Hectoliter", + "value": "Hectoliter", + "description": "Volume unit in hectoliters." + }, + { + "name": "Decaliter", + "value": "Decaliter", + "description": "Volume unit in decaliters." + }, + { + "name": "Liter", + "value": "Liter", + "description": "Volume unit in liters." + }, + { + "name": "Centiliter", + "value": "Centiliter", + "description": "Volume unit in centiliters." + }, + { + "name": "Milliliter", + "value": "Milliliter", + "description": "Volume unit in milliliters." + }, + { + "name": "CubicYard", + "value": "CubicYard", + "description": "Volume unit in cubic yards." + }, + { + "name": "CubicInch", + "value": "CubicInch", + "description": "Volume unit in cubic inches." + }, + { + "name": "CubicFoot", + "value": "CubicFoot", + "description": "Volume unit in cubic feet." + }, + { + "name": "CubicMile", + "value": "CubicMile", + "description": "Volume unit in cubic miles." + }, + { + "name": "FluidOunce", + "value": "FluidOunce", + "description": "Volume unit in fluid ounces." + }, + { + "name": "Teaspoon", + "value": "Teaspoon", + "description": "Volume unit in teaspoons." + }, + { + "name": "Tablespoon", + "value": "Tablespoon", + "description": "Volume unit in tablespoons." + }, + { + "name": "Pint", + "value": "Pint", + "description": "Volume unit in pints." + }, + { + "name": "Quart", + "value": "Quart", + "description": "Volume unit in quarts." + }, + { + "name": "Cup", + "value": "Cup", + "description": "Volume unit in cups." + }, + { + "name": "Gill", + "value": "Gill", + "description": "Volume unit in gills." + }, + { + "name": "Pinch", + "value": "Pinch", + "description": "Volume unit in pinches." + }, + { + "name": "FluidDram", + "value": "FluidDram", + "description": "Volume unit in fluid drams." + }, + { + "name": "Barrel", + "value": "Barrel", + "description": "Volume unit in barrels." + }, + { + "name": "Minim", + "value": "Minim", + "description": "Volume unit in minims." + }, + { + "name": "Cord", + "value": "Cord", + "description": "Volume unit in cords." + }, + { + "name": "Peck", + "value": "Peck", + "description": "Volume unit in pecks." + }, + { + "name": "Bushel", + "value": "Bushel", + "description": "Volume unit in bushels." + }, + { + "name": "Hogshead", + "value": "Hogshead", + "description": "Volume unit in hogsheads." + } + ] } }, - "TimeExpression": { - "type": "string", - "description": "An extended ISO 8601 date/time representation as described in (https://github.com/Microsoft/Recognizers-Text/blob/master/Patterns/English/English-DateTime.yaml)" - }, - "LuisTargetIntentResult": { + "WeightResolution": { "type": "object", - "description": "It is a wrap up of LUIS Generally Available response.", - "x-ms-discriminator-value": "Luis", + "description": "Represents the weight entity resolution model.", + "properties": { + "value": { + "type": "number", + "format": "double", + "description": "The numeric value that the extracted text denotes." + }, + "unit": { + "$ref": "#/definitions/WeightUnit", + "description": "The weight Unit of measurement." + } + }, + "required": [ + "value", + "unit" + ], "allOf": [ { - "$ref": "#/definitions/TargetIntentResult" + "$ref": "#/definitions/BaseResolution" } ], - "properties": { - "result": { - "type": "object", - "description": "The actual response from a LUIS Generally Available application." - } + "x-ms-discriminator-value": "WeightResolution" + }, + "WeightUnit": { + "type": "string", + "description": "The weight Unit of measurement.", + "enum": [ + "Unspecified", + "Kilogram", + "Gram", + "Milligram", + "Gallon", + "MetricTon", + "Ton", + "Pound", + "Ounce", + "Grain", + "PennyWeight", + "LongTonBritish", + "ShortTonUS", + "ShortHundredWeightUS", + "Stone", + "Dram" + ], + "x-ms-enum": { + "name": "WeightUnit", + "modelAsString": true, + "values": [ + { + "name": "Unspecified", + "value": "Unspecified", + "description": "Unspecified weight unit" + }, + { + "name": "Kilogram", + "value": "Kilogram", + "description": "Weight unit in kilograms" + }, + { + "name": "Gram", + "value": "Gram", + "description": "Weight unit in grams" + }, + { + "name": "Milligram", + "value": "Milligram", + "description": "Weight unit in milligrams" + }, + { + "name": "Gallon", + "value": "Gallon", + "description": "Volume unit in gallons" + }, + { + "name": "MetricTon", + "value": "MetricTon", + "description": "Weight unit in metric tons" + }, + { + "name": "Ton", + "value": "Ton", + "description": "Weight unit in tons" + }, + { + "name": "Pound", + "value": "Pound", + "description": "Weight unit in pounds" + }, + { + "name": "Ounce", + "value": "Ounce", + "description": "Weight unit in ounces" + }, + { + "name": "Grain", + "value": "Grain", + "description": "Weight unit in grains" + }, + { + "name": "PennyWeight", + "value": "PennyWeight", + "description": "Weight unit in pennyweights" + }, + { + "name": "LongTonBritish", + "value": "LongTonBritish", + "description": "Weight unit in long tons (British)" + }, + { + "name": "ShortTonUS", + "value": "ShortTonUS", + "description": "Weight unit in short tons (US)" + }, + { + "name": "ShortHundredWeightUS", + "value": "ShortHundredWeightUS", + "description": "Weight unit in short hundredweights (US)" + }, + { + "name": "Stone", + "value": "Stone", + "description": "Weight unit in stones" + }, + { + "name": "Dram", + "value": "Dram", + "description": "Weight unit in drams" + } + ] } }, - "QuestionAnsweringTargetIntentResult": { - "type": "object", - "description": "It is a wrap up a Question Answering KB response.", - "x-ms-discriminator-value": "QuestionAnswering", - "allOf": [ - { - "$ref": "#/definitions/TargetIntentResult" - } + "projectKind": { + "type": "string", + "description": "The type of the project.", + "enum": [ + "Conversation", + "Orchestration" ], - "properties": { - "result": { - "description": "The generated answer by a Question Answering KB.", - "$ref": "common.json#/definitions/AnswersResult" - } + "x-ms-enum": { + "name": "projectKind", + "modelAsString": true, + "values": [ + { + "name": "Conversation", + "value": "Conversation", + "description": "Conversation type" + }, + { + "name": "Orchestration", + "value": "Orchestration", + "description": "Orchestration type" + } + ] } }, - "Modality": { + "targetProjectKind": { "type": "string", - "description": "Enumeration of supported conversational modalities.", + "description": "The type of a target service.", "enum": [ - "transcript", - "text" + "Luis", + "Conversation", + "QuestionAnswering", + "NonLinked" ], "x-ms-enum": { - "name": "InputModality", - "modelAsString": true + "name": "targetProjectKind", + "modelAsString": true, + "values": [ + { + "name": "Luis", + "value": "Luis", + "description": "Luis target service type" + }, + { + "name": "Conversation", + "value": "Conversation", + "description": "Conversation target service type" + }, + { + "name": "QuestionAnswering", + "value": "QuestionAnswering", + "description": "QuestionAnswering target service type" + }, + { + "name": "NonLinked", + "value": "NonLinked", + "description": "NonLinked target service type" + } + ] } } }, "parameters": { - "ConversationAnalysisOptions": { - "name": "ConversationAnalysisOptions", - "in": "body", + "Azure.Core.Foundations.ApiVersionParameter": { + "name": "api-version", + "in": "query", + "description": "The API version to use for this operation.", "required": true, - "schema": { - "$ref": "#/definitions/ConversationAnalysisOptions" - }, - "description": "Post body of the request.", - "x-ms-parameter-location": "method" + "type": "string", + "minLength": 1, + "x-ms-parameter-location": "method", + "x-ms-client-name": "apiVersion" } } } diff --git a/specification/cognitiveservices/data-plane/Language/stable/2022-05-01/analyzetext.json b/specification/cognitiveservices/data-plane/Language/stable/2022-05-01/analyzetext.json index 8fa2b691a1d2..e8215d3f7871 100644 --- a/specification/cognitiveservices/data-plane/Language/stable/2022-05-01/analyzetext.json +++ b/specification/cognitiveservices/data-plane/Language/stable/2022-05-01/analyzetext.json @@ -2,91 +2,111 @@ "swagger": "2.0", "info": { "title": "Microsoft Cognitive Language Service - Text Analysis", - "description": "The language service API is a suite of natural language processing (NLP) skills 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, language detection and question answering. Further documentation can be found in https://docs.microsoft.com/en-us/azure/cognitive-services/language-service/overview.0", - "version": "2022-05-01" - }, - "securityDefinitions": { - "apim_key": { - "type": "apiKey", - "description": "A subscription key for a Language service resource.", - "name": "Ocp-Apim-Subscription-Key", - "in": "header" - } + "version": "2022-05-01", + "description": "The language service API is a suite of natural language processing (NLP) skills 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, language detection and question answering. Further documentation can be found in https://docs.microsoft.com/azure/cognitive-services/language-service/overview.0", + "x-typespec-generated": [ + { + "emitter": "@azure-tools/typespec-autorest" + } + ] }, - "security": [ - { - "apim_key": [] - } + "schemes": [ + "https" ], "x-ms-parameterized-host": { "hostTemplate": "{Endpoint}/language", "useSchemePrefix": false, "parameters": [ { - "$ref": "common.json#/parameters/Endpoint" + "name": "Endpoint", + "in": "path", + "description": "Supported Cognitive Services endpoint (e.g., https://.api.cognitiveservices.azure.com).", + "required": true, + "type": "string" } ] }, + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ], + "security": [ + { + "ApiKeyAuth": [] + } + ], + "securityDefinitions": { + "ApiKeyAuth": { + "type": "apiKey", + "name": "Ocp-Apim-Subscription-Key", + "in": "header" + } + }, + "tags": [], "paths": { "/:analyze-text": { "post": { - "summary": "Request text analysis over a collection of documents.", - "description": "Submit a collection of text documents for analysis. Specify a single unique task to be executed immediately.", "operationId": "AnalyzeText", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], + "description": "Request text analysis over a collection of documents.", "parameters": [ { - "$ref": "common.json#/parameters/ApiVersionParameter" + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { - "$ref": "#/parameters/ShowStats" + "name": "showStats", + "in": "query", + "description": "(Optional) if set to true, response will contain request and document level statistics.", + "required": false, + "type": "boolean" }, { - "description": "Collection of documents to analyze and a single task to execute.", - "in": "body", "name": "body", + "in": "body", + "required": true, "schema": { "$ref": "#/definitions/AnalyzeTextTask" - }, - "required": true + } } ], "responses": { "200": { - "description": "A successful call result", + "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/AnalyzeTextTaskResult" } }, "default": { - "description": "Unexpected error", + "description": "An unexpected error response.", "schema": { - "$ref": "common.json#/definitions/ErrorResponse" + "$ref": "#/definitions/ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } } } }, "x-ms-examples": { - "Successful Entity Linking Request": { + "SuccessfulEntityLinkingRequest": { "$ref": "./examples/SuccessfulEntityLinkingRequest.json" }, - "Successful Entity Recognition Request": { + "SuccessfulEntityRecognitionRequest": { "$ref": "./examples/SuccessfulEntityRecognitionRequest.json" }, - "Successful Key Phrase Extraction Request": { + "SuccessfulKeyPhraseExtractionRequest": { "$ref": "./examples/SuccessfulKeyPhraseExtractionRequest.json" }, - "Successful PII Entity Recognition Request": { - "$ref": "./examples/SuccessfulPiiEntityRecognitionRequest.json" - }, - "Successful Language Detection Request": { + "SuccessfulLanguageDetectionRequest": { "$ref": "./examples/SuccessfulLanguageDetectionRequest.json" }, - "Successful Sentiment Analysis Request": { + "SuccessfulPiiEntityRecognitionRequest": { + "$ref": "./examples/SuccessfulPiiEntityRecognitionRequest.json" + }, + "SuccessfulSentimentAnalysisRequest": { "$ref": "./examples/SuccessfulSentimentAnalysisRequest.json" } } @@ -94,47 +114,47 @@ }, "/analyze-text/jobs": { "post": { - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], + "operationId": "AnalyzeTextSubmitJob", "description": "Submit a collection of text documents for analysis. Specify one or more unique tasks to be executed as a long-running operation.", - "operationId": "AnalyzeText_SubmitJob", - "summary": "Submit text analysis job", "parameters": [ { - "$ref": "common.json#/parameters/ApiVersionParameter" + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { - "description": "Collection of documents to analyze and one or more tasks to execute.", - "in": "body", "name": "body", + "in": "body", + "required": true, "schema": { "$ref": "#/definitions/AnalyzeTextJobsInput" - }, - "required": true + } } ], "responses": { "202": { - "description": "A successful call results with an Operation-Location header used to check the status of the analysis job.", + "description": "The request has been accepted for processing, but processing has not yet completed.", "headers": { "Operation-Location": { - "type": "string" + "type": "string", + "format": "uri", + "description": "The location for monitoring the operation state." } } }, "default": { - "description": "Error response.", + "description": "An unexpected error response.", "schema": { - "$ref": "common.json#/definitions/ErrorResponse" + "$ref": "#/definitions/ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } } } }, "x-ms-examples": { - "Successful Submit Analysis Job Request": { + "SuccessfulAnalyzeTextJobsMultipleTaskSubmitRequest": { "$ref": "./examples/SuccessfulAnalyzeTextJobsMultipleTaskSubmitRequest.json" } }, @@ -143,45 +163,67 @@ }, "/analyze-text/jobs/{jobId}": { "get": { - "produces": [ - "application/json" - ], - "description": "Get the status of an analysis job. A job may consist of one or more tasks. Once all tasks are succeeded, the job will transition to the succeeded state and results will be available for each task.", - "operationId": "AnalyzeText_JobStatus", + "operationId": "AnalyzeTextJobStatus", "summary": "Get analysis status and results", + "description": "Get the status of an analysis job. A job can consist of one or more tasks. After all tasks succeed, the job transitions to the succeeded state and results are available for each task.", "parameters": [ { - "$ref": "common.json#/parameters/ApiVersionParameter" + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { - "$ref": "#/parameters/JobId" + "name": "jobId", + "in": "path", + "description": "job ID", + "required": true, + "type": "string", + "format": "uuid" }, { - "$ref": "#/parameters/ShowStats" + "name": "showStats", + "in": "query", + "description": "(Optional) if set to true, response will contain request and document level statistics.", + "required": false, + "type": "boolean" }, { - "$ref": "common.json#/parameters/TopParameter" + "name": "top", + "in": "query", + "description": "The maximum number of resources to return from the collection.", + "required": false, + "type": "integer", + "format": "int32" }, { - "$ref": "common.json#/parameters/SkipParameter" + "name": "skip", + "in": "query", + "description": "An offset into the collection of the first resource to be returned.", + "required": false, + "type": "integer", + "format": "int32" } ], "responses": { "200": { - "description": "Analysis job status and metadata.", + "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/AnalyzeTextJobState" } }, "default": { - "description": "Unexpected error", + "description": "An unexpected error response.", "schema": { - "$ref": "common.json#/definitions/ErrorResponse" + "$ref": "#/definitions/ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } } } }, "x-ms-examples": { - "Successful Get Text Analysis Job Status Request": { + "SuccessfulAnalyzeTextJobsMultipleTaskStatusRequest": { "$ref": "./examples/SuccessfulAnalyzeTextJobsMultipleTaskStatusRequest.json" } } @@ -189,39 +231,49 @@ }, "/analyze-text/jobs/{jobId}:cancel": { "post": { - "produces": [ - "application/json" - ], + "operationId": "AnalyzeTextCancelJob", + "summary": "Cancel a long-running Text Analysis job.", "description": "Cancel a long-running Text Analysis job.", - "operationId": "AnalyzeText_CancelJob", - "summary": "Cancel a long-running Text Analysis job", "parameters": [ { - "$ref": "common.json#/parameters/ApiVersionParameter" + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { - "$ref": "#/parameters/JobId" + "name": "jobId", + "in": "path", + "description": "The job ID to cancel.", + "required": true, + "type": "string", + "format": "uuid" } ], "responses": { "202": { - "description": "Cancel Job request has been received.", + "description": "The request has been accepted for processing, but processing has not yet completed.", "headers": { "Operation-Location": { - "type": "string" + "type": "string", + "format": "uri", + "description": "The location for monitoring the operation state." } } }, "default": { - "description": "Unexpected error", + "description": "An unexpected error response.", "schema": { - "$ref": "common.json#/definitions/ErrorResponse" + "$ref": "#/definitions/ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } } } }, "x-ms-examples": { - "Successful Job Delete Request": { - "$ref": ".//examples//SuccessfulAnalyzeTextJobsCancelRequest.json" + "SuccessfulAnalyzeTextJobsCancelRequest": { + "$ref": "./examples/SuccessfulAnalyzeTextJobsCancelRequest.json" } }, "x-ms-long-running-operation": true @@ -229,141 +281,17 @@ } }, "definitions": { - "AnalyzeTextTaskKind": { - "type": "string", - "description": "Enumeration of supported Text Analysis tasks.", - "enum": [ - "SentimentAnalysis", - "EntityRecognition", - "PiiEntityRecognition", - "KeyPhraseExtraction", - "LanguageDetection", - "EntityLinking" - ], - "x-ms-enum": { - "name": "AnalyzeTextTaskKind", - "modelAsString": true - } - }, - "AnalyzeTextLROTaskKind": { - "type": "string", - "description": "Enumeration of supported long-running Text Analysis tasks.", - "enum": [ - "SentimentAnalysis", - "EntityRecognition", - "PiiEntityRecognition", - "KeyPhraseExtraction", - "EntityLinking", - "Healthcare", - "CustomEntityRecognition", - "CustomSingleLabelClassification", - "CustomMultiLabelClassification" - ], - "x-ms-enum": { - "name": "AnalyzeTextLROTaskKind", - "modelAsString": true - } - }, - "AnalyzeTextTaskResultsKind": { - "type": "string", - "description": "Enumeration of supported Text Analysis task results.", - "enum": [ - "SentimentAnalysisResults", - "EntityRecognitionResults", - "PiiEntityRecognitionResults", - "KeyPhraseExtractionResults", - "LanguageDetectionResults", - "EntityLinkingResults" - ], - "x-ms-enum": { - "name": "AnalyzeTextTaskResultsKind", - "modelAsString": true - } - }, - "AnalyzeTextLROResultsKind": { - "type": "string", - "description": "Enumeration of supported Text Analysis long-running operation task results.", - "enum": [ - "SentimentAnalysisLROResults", - "EntityRecognitionLROResults", - "PiiEntityRecognitionLROResults", - "KeyPhraseExtractionLROResults", - "EntityLinkingLROResults", - "HealthcareLROResults", - "CustomEntityRecognitionLROResults", - "CustomSingleLabelClassificationLROResults", - "CustomMultiLabelClassificationLROResults" - ], - "x-ms-enum": { - "name": "AnalyzeTextLROResultsKind", - "modelAsString": true - } - }, - "MultiLanguageAnalysisInput": { - "properties": { - "documents": { - "type": "array", - "items": { - "$ref": "#/definitions/MultiLanguageInput" - } - } - } - }, - "LanguageDetectionAnalysisInput": { - "properties": { - "documents": { - "type": "array", - "items": { - "$ref": "#/definitions/LanguageInput" - } - } - } - }, - "AnalyzeTextTask": { - "discriminator": "kind", - "required": [ - "kind" - ], - "properties": { - "kind": { - "$ref": "#/definitions/AnalyzeTextTaskKind" - } - } - }, - "AnalyzeTextLROTask": { - "discriminator": "kind", - "required": [ - "kind" - ], - "properties": { - "kind": { - "$ref": "#/definitions/AnalyzeTextLROTaskKind" - } - }, - "allOf": [ - { - "$ref": "#/definitions/TaskIdentifier" - } - ] - }, - "AnalyzeTextTaskResult": { - "discriminator": "kind", - "required": [ - "kind" - ], - "properties": { - "kind": { - "$ref": "#/definitions/AnalyzeTextTaskResultsKind" - } - } - }, "AnalyzeTextEntityLinkingInput": { + "type": "object", + "description": "Contains the analyze text Entity linking input.", "properties": { "analysisInput": { - "$ref": "#/definitions/MultiLanguageAnalysisInput" + "$ref": "#/definitions/MultiLanguageAnalysisInput", + "description": "Contains the analysis input to be handled by the service." }, "parameters": { - "$ref": "#/definitions/EntityLinkingTaskParameters" + "$ref": "#/definitions/EntityLinkingTaskParameters", + "description": "Task parameters." } }, "allOf": [ @@ -374,12 +302,16 @@ "x-ms-discriminator-value": "EntityLinking" }, "AnalyzeTextEntityRecognitionInput": { + "type": "object", + "description": "The entity recognition analyze text input task request.", "properties": { "analysisInput": { - "$ref": "#/definitions/MultiLanguageAnalysisInput" + "$ref": "#/definitions/MultiLanguageAnalysisInput", + "description": "The input to be analyzed." }, "parameters": { - "$ref": "#/definitions/EntitiesTaskParameters" + "$ref": "#/definitions/EntitiesTaskParameters", + "description": "Task parameters." } }, "allOf": [ @@ -389,45 +321,104 @@ ], "x-ms-discriminator-value": "EntityRecognition" }, - "AnalyzeTextKeyPhraseExtractionInput": { + "AnalyzeTextJobState": { + "type": "object", + "description": "The object containing the analyze job LRO job state.", "properties": { - "analysisInput": { - "$ref": "#/definitions/MultiLanguageAnalysisInput" + "displayName": { + "type": "string", + "description": "display name" }, - "parameters": { - "$ref": "#/definitions/KeyPhraseTaskParameters" + "createdDateTime": { + "type": "string", + "format": "date-time", + "description": "Date and time job created" + }, + "expirationDateTime": { + "type": "string", + "format": "date-time", + "description": "Date and time job expires" + }, + "jobId": { + "$ref": "#/definitions/Azure.Core.uuid", + "description": "job ID", + "readOnly": true + }, + "lastUpdatedDateTime": { + "type": "string", + "format": "date-time", + "description": "last updated date and time" + }, + "status": { + "$ref": "#/definitions/State", + "description": "status" + }, + "errors": { + "type": "array", + "description": "errors", + "items": { + "$ref": "#/definitions/Error" + }, + "x-ms-identifiers": [] + }, + "nextLink": { + "type": "string", + "description": "next link" + }, + "tasks": { + "$ref": "#/definitions/Tasks", + "description": "List of tasks." + }, + "statistics": { + "$ref": "#/definitions/RequestStatistics", + "description": "if showStats=true was specified in the request this field will contain information about the request payload." } }, - "allOf": [ - { - "$ref": "#/definitions/AnalyzeTextTask" - } - ], - "x-ms-discriminator-value": "KeyPhraseExtraction" + "required": [ + "createdDateTime", + "jobId", + "lastUpdatedDateTime", + "status", + "tasks" + ] }, - "AnalyzeTextPiiEntitiesRecognitionInput": { + "AnalyzeTextJobsInput": { + "type": "object", + "description": "The input object for the analyze text LRO.", "properties": { + "displayName": { + "type": "string", + "description": "Name for the task." + }, "analysisInput": { - "$ref": "#/definitions/MultiLanguageAnalysisInput" + "$ref": "#/definitions/MultiLanguageAnalysisInput", + "description": "Contains the input to be analyzed." }, - "parameters": { - "$ref": "#/definitions/PiiTaskParameters" + "tasks": { + "type": "array", + "description": "List of tasks to be performed as part of the LRO.", + "items": { + "$ref": "#/definitions/AnalyzeTextLROTask" + }, + "x-ms-identifiers": [] } }, - "allOf": [ - { - "$ref": "#/definitions/AnalyzeTextTask" - } - ], - "x-ms-discriminator-value": "PiiEntityRecognition" + "required": [ + "analysisInput", + "tasks" + ] }, - "AnalyzeTextLanguageDetectionInput": { + "AnalyzeTextKeyPhraseExtractionInput": { + "type": "object", + "description": "Contains the analyze text KeyPhraseExtraction task input.", "properties": { "analysisInput": { - "$ref": "#/definitions/LanguageDetectionAnalysisInput" + "$ref": "#/definitions/MultiLanguageAnalysisInput", + "description": "Contains the input documents." }, "parameters": { - "$ref": "#/definitions/LanguageDetectionTaskParameters" + "$ref": "#/definitions/KeyPhraseTaskParameters", + "description": "Key phrase extraction task parameters." } }, "allOf": [ @@ -435,259 +426,480 @@ "$ref": "#/definitions/AnalyzeTextTask" } ], - "x-ms-discriminator-value": "LanguageDetection" + "x-ms-discriminator-value": "KeyPhraseExtraction" }, - "AnalyzeTextSentimentAnalysisInput": { + "AnalyzeTextLROResult": { + "type": "object", + "description": "Contains the AnalyzeText long running operation result object.", "properties": { - "analysisInput": { - "$ref": "#/definitions/MultiLanguageAnalysisInput" + "lastUpdateDateTime": { + "type": "string", + "format": "date-time", + "description": "The last updated time in UTC for the task." }, - "parameters": { - "$ref": "#/definitions/SentimentAnalysisTaskParameters" - } - }, - "allOf": [ - { - "$ref": "#/definitions/AnalyzeTextTask" - } - ], - "x-ms-discriminator-value": "SentimentAnalysis" - }, - "AnalyzeTextJobsInput": { - "properties": { - "displayName": { - "description": "Optional display name for the analysis job.", - "type": "string" + "status": { + "$ref": "#/definitions/State", + "description": "The status of the task at the mentioned last update time." }, - "analysisInput": { - "$ref": "#/definitions/MultiLanguageAnalysisInput" + "taskName": { + "type": "string", + "description": "task name" }, - "tasks": { - "description": "The set of tasks to execute on the input documents.", - "type": "array", - "items": { - "$ref": "#/definitions/AnalyzeTextLROTask" - } + "kind": { + "$ref": "#/definitions/AnalyzeTextLROResultsKind", + "description": "Kind of the task." } }, + "discriminator": "kind", "required": [ - "analysisInput", - "tasks" + "lastUpdateDateTime", + "status", + "kind" ] }, - "TaskIdentifier": { - "type": "object", - "description": "Base task object.", - "properties": { - "taskName": { - "type": "string" - } - } - }, - "TaskParameters": { - "type": "object", - "description": "Base parameters object for a text analysis task.", - "properties": { - "loggingOptOut": { - "type": "boolean", - "default": false - } + "AnalyzeTextLROResultsKind": { + "type": "string", + "description": "The kind of the response object returned by the analyze-text long running task.", + "enum": [ + "SentimentAnalysisLROResults", + "EntityRecognitionLROResults", + "PiiEntityRecognitionLROResults", + "KeyPhraseExtractionLROResults", + "EntityLinkingLROResults", + "HealthcareLROResults", + "CustomEntityRecognitionLROResults", + "CustomSingleLabelClassificationLROResults", + "CustomMultiLabelClassificationLROResults" + ], + "x-ms-enum": { + "name": "AnalyzeTextLROResultsKind", + "modelAsString": true, + "values": [ + { + "name": "SentimentAnalysisLROResults", + "value": "SentimentAnalysisLROResults", + "description": "Sentiment analysis LRO results" + }, + { + "name": "EntityRecognitionLROResults", + "value": "EntityRecognitionLROResults", + "description": "Entity recognition LRO results" + }, + { + "name": "PiiEntityRecognitionLROResults", + "value": "PiiEntityRecognitionLROResults", + "description": "PII entity recognition LRO results" + }, + { + "name": "KeyPhraseExtractionLROResults", + "value": "KeyPhraseExtractionLROResults", + "description": "Key phrase extraction LRO results" + }, + { + "name": "EntityLinkingLROResults", + "value": "EntityLinkingLROResults", + "description": "Entity linking LRO results" + }, + { + "name": "HealthcareLROResults", + "value": "HealthcareLROResults", + "description": "Healthcare LRO results" + }, + { + "name": "CustomEntityRecognitionLROResults", + "value": "CustomEntityRecognitionLROResults", + "description": "Custom entity recognition LRO results" + }, + { + "name": "CustomSingleLabelClassificationLROResults", + "value": "CustomSingleLabelClassificationLROResults", + "description": "Custom single label classification LRO results" + }, + { + "name": "CustomMultiLabelClassificationLROResults", + "value": "CustomMultiLabelClassificationLROResults", + "description": "Custom multi label classification LRO results" + } + ] } }, - "PreBuiltTaskParameters": { + "AnalyzeTextLROTask": { "type": "object", - "description": "Parameters object for a text analysis task using pre-built models.", + "description": "The long running task to be performed by the service on the input documents.", "properties": { - "modelVersion": { + "taskName": { "type": "string", - "default": "latest" - } - }, - "allOf": [ - { - "$ref": "#/definitions/TaskParameters" - } - ] - }, - "PreBuiltResult": { - "properties": { - "errors": { - "type": "array", - "description": "Errors by document id.", - "items": { - "$ref": "#/definitions/DocumentError" - } - }, - "statistics": { - "$ref": "#/definitions/RequestStatistics" + "description": "task name" }, - "modelVersion": { - "type": "string", - "description": "This field indicates which model is used for scoring." + "kind": { + "$ref": "#/definitions/AnalyzeTextLROTaskKind", + "description": "The kind of task to perform." } }, + "discriminator": "kind", "required": [ - "errors", - "modelVersion" + "kind" ] }, - "CustomTaskParameters": { + "AnalyzeTextLROTaskKind": { + "type": "string", + "description": "The kind of the long running analyze text tasks supported.", + "enum": [ + "SentimentAnalysis", + "EntityRecognition", + "PiiEntityRecognition", + "KeyPhraseExtraction", + "EntityLinking", + "Healthcare", + "CustomEntityRecognition", + "CustomSingleLabelClassification", + "CustomMultiLabelClassification" + ], + "x-ms-enum": { + "name": "AnalyzeTextLROTaskKind", + "modelAsString": true, + "values": [ + { + "name": "SentimentAnalysis", + "value": "SentimentAnalysis", + "description": "Sentiment analysis task" + }, + { + "name": "EntityRecognition", + "value": "EntityRecognition", + "description": "Entity recognition task" + }, + { + "name": "PiiEntityRecognition", + "value": "PiiEntityRecognition", + "description": "PII entity recognition task" + }, + { + "name": "KeyPhraseExtraction", + "value": "KeyPhraseExtraction", + "description": "Key phrase extraction task" + }, + { + "name": "EntityLinking", + "value": "EntityLinking", + "description": "Entity linking task" + }, + { + "name": "Healthcare", + "value": "Healthcare", + "description": "Healthcare task" + }, + { + "name": "CustomEntityRecognition", + "value": "CustomEntityRecognition", + "description": "Custom entity recognition task" + }, + { + "name": "CustomSingleLabelClassification", + "value": "CustomSingleLabelClassification", + "description": "Custom single label classification task" + }, + { + "name": "CustomMultiLabelClassification", + "value": "CustomMultiLabelClassification", + "description": "Custom multi label classification task" + } + ] + } + }, + "AnalyzeTextLanguageDetectionInput": { "type": "object", - "description": "Parameters object for a text analysis task using custom models.", + "description": "Contains the language detection document analysis task input.", "properties": { - "projectName": { - "type": "string", - "description": "This field indicates the project name for the model." + "analysisInput": { + "$ref": "#/definitions/LanguageDetectionAnalysisInput", + "description": "Documents to be analyzed." }, - "deploymentName": { - "type": "string", - "description": "This field indicates the deployment name for the model." + "parameters": { + "$ref": "#/definitions/LanguageDetectionTaskParameters", + "description": "task parameters." } }, "allOf": [ { - "$ref": "#/definitions/TaskParameters" + "$ref": "#/definitions/AnalyzeTextTask" } ], - "required": [ - "projectName", - "deploymentName" - ] - }, - "CustomResult": { - "properties": { - "errors": { - "type": "array", - "description": "Errors by document id.", - "items": { - "$ref": "#/definitions/DocumentError" - } - }, - "statistics": { - "$ref": "#/definitions/RequestStatistics" - }, - "projectName": { - "type": "string", - "description": "This field indicates the project name for the model." - }, - "deploymentName": { - "type": "string", - "description": "This field indicates the deployment name for the model." - } - }, - "required": [ - "errors", - "projectName", - "deploymentName" - ] + "x-ms-discriminator-value": "LanguageDetection" }, - "CustomEntitiesTaskParameters": { + "AnalyzeTextPiiEntitiesRecognitionInput": { "type": "object", - "description": "Supported parameters for a Custom Entities task.", + "description": "Contains the analyze text PIIEntityRecognition task input.", "properties": { - "stringIndexType": { - "$ref": "common.json#/definitions/StringIndexType" + "analysisInput": { + "$ref": "#/definitions/MultiLanguageAnalysisInput", + "description": "Contains the input documents." + }, + "parameters": { + "$ref": "#/definitions/PiiTaskParameters", + "description": "Pii task parameters." } }, "allOf": [ { - "$ref": "#/definitions/CustomTaskParameters" + "$ref": "#/definitions/AnalyzeTextTask" } - ] + ], + "x-ms-discriminator-value": "PiiEntityRecognition" }, - "CustomEntitiesLROTask": { + "AnalyzeTextSentimentAnalysisInput": { "type": "object", - "description": "Use custom models to ease the process of information extraction from unstructured documents like contracts or financial documents", + "description": "Contains the analyze text SentimentAnalysis task input.", "properties": { + "analysisInput": { + "$ref": "#/definitions/MultiLanguageAnalysisInput", + "description": "Contains the input documents." + }, "parameters": { - "$ref": "#/definitions/CustomEntitiesTaskParameters" + "$ref": "#/definitions/SentimentAnalysisTaskParameters", + "description": "Sentiment Analysis task parameters." } }, "allOf": [ { - "$ref": "#/definitions/AnalyzeTextLROTask" + "$ref": "#/definitions/AnalyzeTextTask" } ], - "x-ms-discriminator-value": "CustomEntityRecognition" + "x-ms-discriminator-value": "SentimentAnalysis" }, - "CustomEntitiesResult": { + "AnalyzeTextTask": { "type": "object", + "description": "Collection of documents to analyze and a single task to execute.", "properties": { - "documents": { - "type": "array", - "description": "Response by document", - "items": { - "allOf": [ - { - "$ref": "#/definitions/EntitiesDocumentResult" - } - ] - } + "kind": { + "$ref": "#/definitions/AnalyzeTextTaskKind", + "description": "The kind of task to perform." } }, - "allOf": [ - { - "$ref": "#/definitions/CustomResult" - } - ], + "discriminator": "kind", "required": [ - "documents" + "kind" ] }, - "CustomSingleLabelClassificationTaskParameters": { - "type": "object", - "description": "Supported parameters for a Custom Single Classification task.", - "allOf": [ - { - "$ref": "#/definitions/CustomTaskParameters" - } - ] + "AnalyzeTextTaskKind": { + "type": "string", + "description": "The kind of the analyze-text tasks supported.", + "enum": [ + "SentimentAnalysis", + "EntityRecognition", + "PiiEntityRecognition", + "KeyPhraseExtraction", + "LanguageDetection", + "EntityLinking" + ], + "x-ms-enum": { + "name": "AnalyzeTextTaskKind", + "modelAsString": true, + "values": [ + { + "name": "SentimentAnalysis", + "value": "SentimentAnalysis", + "description": "Sentiment analysis task" + }, + { + "name": "EntityRecognition", + "value": "EntityRecognition", + "description": "Entity recognition task" + }, + { + "name": "PiiEntityRecognition", + "value": "PiiEntityRecognition", + "description": "PII entity recognition task" + }, + { + "name": "KeyPhraseExtraction", + "value": "KeyPhraseExtraction", + "description": "Key phrase extraction task" + }, + { + "name": "LanguageDetection", + "value": "LanguageDetection", + "description": "Language detection task" + }, + { + "name": "EntityLinking", + "value": "EntityLinking", + "description": "Entity linking task" + } + ] + } }, - "CustomSingleLabelClassificationLROTask": { + "AnalyzeTextTaskResult": { "type": "object", - "description": "Use custom models to classify text into single label taxonomy", + "description": "The result object for the analyze task.", "properties": { - "parameters": { - "$ref": "#/definitions/CustomSingleLabelClassificationTaskParameters" + "kind": { + "$ref": "#/definitions/AnalyzeTextTaskResultsKind", + "description": "The kind of task result." } }, - "allOf": [ - { - "$ref": "#/definitions/AnalyzeTextLROTask" - } + "discriminator": "kind", + "required": [ + "kind" + ] + }, + "AnalyzeTextTaskResultsKind": { + "type": "string", + "description": "The kind of the response object returned by the analyze-text task.", + "enum": [ + "SentimentAnalysisResults", + "EntityRecognitionResults", + "PiiEntityRecognitionResults", + "KeyPhraseExtractionResults", + "LanguageDetectionResults", + "EntityLinkingResults" ], - "x-ms-discriminator-value": "CustomSingleLabelClassification" + "x-ms-enum": { + "name": "AnalyzeTextTaskResultsKind", + "modelAsString": true, + "values": [ + { + "name": "SentimentAnalysisResults", + "value": "SentimentAnalysisResults", + "description": "Sentiment analysis results" + }, + { + "name": "EntityRecognitionResults", + "value": "EntityRecognitionResults", + "description": "Entity recognition results" + }, + { + "name": "PiiEntityRecognitionResults", + "value": "PiiEntityRecognitionResults", + "description": "PII entity recognition results" + }, + { + "name": "KeyPhraseExtractionResults", + "value": "KeyPhraseExtractionResults", + "description": "Key phrase extraction results" + }, + { + "name": "LanguageDetectionResults", + "value": "LanguageDetectionResults", + "description": "Language detection results" + }, + { + "name": "EntityLinkingResults", + "value": "EntityLinkingResults", + "description": "Entity linking results" + } + ] + } }, - "CustomLabelClassificationResult": { + "Association": { + "type": "string", + "description": "Describes if the entity is the subject of the text or if it describes someone else.", + "enum": [ + "subject", + "other" + ], + "x-ms-enum": { + "name": "Association", + "modelAsString": false, + "values": [ + { + "name": "subject", + "value": "subject", + "description": "Subject association" + }, + { + "name": "other", + "value": "other", + "description": "Other association" + } + ] + } + }, + "Azure.Core.uuid": { + "type": "string", + "format": "uuid", + "description": "Universally Unique Identifier" + }, + "Certainty": { + "type": "string", + "description": "Describes the entities certainty and polarity.", + "enum": [ + "positive", + "positivePossible", + "neutralPossible", + "negativePossible", + "negative" + ], + "x-ms-enum": { + "name": "Certainty", + "modelAsString": false, + "values": [ + { + "name": "positive", + "value": "positive", + "description": "Positive certainty" + }, + { + "name": "positivePossible", + "value": "positivePossible", + "description": "Possibly positive certainty" + }, + { + "name": "neutralPossible", + "value": "neutralPossible", + "description": "Possibly neutral certainty" + }, + { + "name": "negativePossible", + "value": "negativePossible", + "description": "Possibly negative certainty" + }, + { + "name": "negative", + "value": "negative", + "description": "Negative certainty" + } + ] + } + }, + "ClassificationDocumentResult": { "type": "object", + "description": "Contains the classification doc result for the task.", "properties": { - "documents": { + "id": { + "type": "string", + "description": "Unique, non-empty document identifier." + }, + "warnings": { "type": "array", - "description": "Response by document", + "description": "Warnings encountered while processing document.", "items": { - "allOf": [ - { - "$ref": "#/definitions/ClassificationDocumentResult" - } - ] - } + "$ref": "#/definitions/DocumentWarning" + }, + "x-ms-identifiers": [] + }, + "statistics": { + "$ref": "#/definitions/DocumentStatistics", + "description": "if showStats=true was specified in the request this field will contain information about the document payload." + }, + "class": { + "type": "array", + "description": "Contains the classification doc results for all docs.", + "items": { + "$ref": "#/definitions/ClassificationResult" + }, + "x-ms-identifiers": [] } }, - "allOf": [ - { - "$ref": "#/definitions/CustomResult" - } - ], "required": [ - "documents" + "id", + "warnings", + "class" ] }, "ClassificationResult": { "type": "object", - "required": [ - "category", - "confidenceScore" - ], + "description": "Contains the classification result.", "properties": { "category": { "type": "string", @@ -698,23 +910,43 @@ "format": "double", "description": "Confidence score between 0 and 1 of the recognized class." } - } - }, - "CustomMultiLabelClassificationTaskParameters": { - "type": "object", - "description": "Supported parameters for a Custom Multi Classification task.", - "allOf": [ - { - "$ref": "#/definitions/CustomTaskParameters" - } + }, + "required": [ + "category", + "confidenceScore" ] }, - "CustomMultiLabelClassificationLROTask": { + "Conditionality": { + "type": "string", + "description": "Describes any conditionality on the entity.", + "enum": [ + "hypothetical", + "conditional" + ], + "x-ms-enum": { + "name": "Conditionality", + "modelAsString": false, + "values": [ + { + "name": "hypothetical", + "value": "hypothetical", + "description": "Hypothetical conditionality" + }, + { + "name": "conditional", + "value": "conditional", + "description": "Conditional conditionality" + } + ] + } + }, + "CustomEntitiesLROTask": { "type": "object", - "description": "Use custom models to classify text into multi label taxonomy", + "description": "Contains the custom text LRO task.", "properties": { "parameters": { - "$ref": "#/definitions/CustomMultiLabelClassificationTaskParameters" + "$ref": "#/definitions/CustomEntitiesTaskParameters", + "description": "task parameters." } }, "allOf": [ @@ -722,342 +954,241 @@ "$ref": "#/definitions/AnalyzeTextLROTask" } ], - "x-ms-discriminator-value": "CustomMultiLabelClassification" + "x-ms-discriminator-value": "CustomEntityRecognition" }, - "ClassificationDocumentResult": { + "CustomEntitiesResult": { "type": "object", + "description": "Contains the list of detected custom entities result for the documents.", "properties": { - "class": { + "errors": { "type": "array", + "description": "Errors by document id.", "items": { - "$ref": "#/definitions/ClassificationResult" + "$ref": "#/definitions/DocumentError" + } + }, + "statistics": { + "$ref": "#/definitions/RequestStatistics", + "description": "if showStats=true was specified in the request this field will contain information about the request payload." + }, + "projectName": { + "type": "string", + "description": "This field indicates the project name for the model." + }, + "deploymentName": { + "type": "string", + "description": "This field indicates the deployment name for the model." + }, + "documents": { + "type": "array", + "description": "Enumeration of the document results.", + "items": { + "$ref": "#/definitions/EntitiesDocumentResult" } } }, - "allOf": [ - { - "$ref": "#/definitions/DocumentResult" - } - ], "required": [ - "class" + "errors", + "projectName", + "deploymentName", + "documents" ] }, - "HealthcareTaskParameters": { + "CustomEntitiesTaskParameters": { "type": "object", - "description": "Supported parameters for a Healthcare task.", + "description": "Supported parameters for a Custom Entities task.", "properties": { + "loggingOptOut": { + "type": "boolean", + "description": "logging opt out", + "default": false + }, + "projectName": { + "type": "string", + "description": "This field indicates the project name for the model." + }, + "deploymentName": { + "type": "string", + "description": "This field indicates the deployment name for the model." + }, "stringIndexType": { - "$ref": "common.json#/definitions/StringIndexType" + "type": "string", + "description": "Optional parameter to provide the string index type used to interpret string offsets. Defaults to TextElements (Graphemes).", + "default": "TextElements_v8", + "enum": [ + "TextElements_v8", + "UnicodeCodePoint", + "Utf16CodeUnit" + ], + "x-ms-enum": { + "name": "StringIndexType", + "modelAsString": true, + "values": [ + { + "name": "TextElements_v8", + "value": "TextElements_v8", + "description": "Returned offset and length values will correspond to TextElements (Graphemes and Grapheme clusters) confirming to the Unicode 8.0.0 standard. Use this option if your application is written in .Net Framework or .Net Core and you will be using StringInfo." + }, + { + "name": "UnicodeCodePoint", + "value": "UnicodeCodePoint", + "description": "Returned offset and length values will correspond to Unicode code points. Use this option if your application is written in a language that support Unicode, for example Python." + }, + { + "name": "Utf16CodeUnit", + "value": "Utf16CodeUnit", + "description": "Returned offset and length values will correspond to UTF-16 code units. Use this option if your application is written in a language that support Unicode, for example Java, JavaScript." + } + ] + } } }, - "allOf": [ - { - "$ref": "#/definitions/PreBuiltTaskParameters" - } + "required": [ + "projectName", + "deploymentName" ] }, - "HealthcareLROTask": { + "CustomEntityRecognitionLROResult": { "type": "object", + "description": "Contains the custom entity recognition job result.", "properties": { - "parameters": { - "$ref": "#/definitions/HealthcareTaskParameters" + "results": { + "$ref": "#/definitions/CustomEntitiesResult", + "description": "List of results." } }, + "required": [ + "results" + ], "allOf": [ { - "$ref": "#/definitions/AnalyzeTextLROTask" + "$ref": "#/definitions/AnalyzeTextLROResult" } ], - "x-ms-discriminator-value": "Healthcare" + "x-ms-discriminator-value": "CustomEntityRecognitionLROResults" }, - "HealthcareResult": { + "CustomLabelClassificationResult": { "type": "object", + "description": "Contains the custom label classification results.", "properties": { + "errors": { + "type": "array", + "description": "Errors by document id.", + "items": { + "$ref": "#/definitions/DocumentError" + } + }, + "statistics": { + "$ref": "#/definitions/RequestStatistics", + "description": "if showStats=true was specified in the request this field will contain information about the request payload." + }, + "projectName": { + "type": "string", + "description": "This field indicates the project name for the model." + }, + "deploymentName": { + "type": "string", + "description": "This field indicates the deployment name for the model." + }, "documents": { "type": "array", + "description": "Response by document", "items": { - "allOf": [ - { - "$ref": "#/definitions/HealthcareEntitiesDocumentResult" - } - ] + "$ref": "#/definitions/ClassificationDocumentResult" } } }, - "allOf": [ - { - "$ref": "#/definitions/PreBuiltResult" - } - ], "required": [ + "errors", + "projectName", + "deploymentName", "documents" ] }, - "HealthcareEntitiesDocumentResult": { + "CustomMultiLabelClassificationLROResult": { "type": "object", + "description": "Contains the custom multi label classification job result.", "properties": { - "entities": { - "description": "Healthcare entities.", - "type": "array", - "items": { - "$ref": "#/definitions/HealthcareEntity" - } - }, - "relations": { - "type": "array", - "description": "Healthcare entity relations.", - "items": { - "$ref": "#/definitions/HealthcareRelation" - } + "results": { + "$ref": "#/definitions/CustomLabelClassificationResult", + "description": "List of results." } }, - "allOf": [ - { - "$ref": "#/definitions/DocumentResult" + "required": [ + "results" + ], + "allOf": [ + { + "$ref": "#/definitions/AnalyzeTextLROResult" } ], - "required": [ - "entities", - "relations" - ] + "x-ms-discriminator-value": "CustomMultiLabelClassificationLROResults" }, - "HealthcareEntity": { + "CustomMultiLabelClassificationLROTask": { "type": "object", + "description": "Use custom models to classify text into multi label taxonomy", "properties": { - "text": { - "type": "string", - "description": "Entity text as appears in the request." - }, - "category": { - "x-ms-enum": { - "name": "healthcareEntityCategory", - "modelAsString": true - }, - "type": "string", - "description": "Healthcare Entity Category.", - "enum": [ - "BodyStructure", - "Age", - "Gender", - "ExaminationName", - "Date", - "Direction", - "Frequency", - "MeasurementValue", - "MeasurementUnit", - "RelationalOperator", - "Time", - "GeneOrProtein", - "Variant", - "AdministrativeEvent", - "CareEnvironment", - "HealthcareProfession", - "Diagnosis", - "SymptomOrSign", - "ConditionQualifier", - "MedicationClass", - "MedicationName", - "Dosage", - "MedicationForm", - "MedicationRoute", - "FamilyRelation", - "TreatmentName" - ] - }, - "subcategory": { - "type": "string", - "description": "(Optional) Entity sub type." - }, - "offset": { - "type": "integer", - "format": "int32", - "description": "Start position for the entity text. Use of different 'stringIndexType' values can affect the offset returned." - }, - "length": { - "type": "integer", - "format": "int32", - "description": "Length for the entity text. Use of different 'stringIndexType' values can affect the length returned." - }, - "confidenceScore": { - "type": "number", - "format": "double", - "description": "Confidence score between 0 and 1 of the extracted entity." - }, - "assertion": { - "type": "object", - "$ref": "#/definitions/HealthcareAssertion" - }, - "name": { - "description": "Preferred name for the entity. Example: 'histologically' would have a 'name' of 'histologic'.", - "type": "string" - }, - "links": { - "description": "Entity references in known data sources.", - "type": "array", - "items": { - "$ref": "#/definitions/HealthcareEntityLink" - } + "parameters": { + "$ref": "#/definitions/CustomMultiLabelClassificationTaskParameters", + "description": "Task parameters." } }, - "required": [ - "text", - "category", - "offset", - "length", - "confidenceScore" - ] - }, - "HealthcareRelation": { - "type": "object", - "description": "Every relation is an entity graph of a certain relationType, where all entities are connected and have specific roles within the relation context.", - "required": [ - "relationType", - "entities" - ], - "properties": { - "relationType": { - "description": "Type of relation. Examples include: `DosageOfMedication` or 'FrequencyOfMedication', etc.", - "type": "string", - "enum": [ - "Abbreviation", - "DirectionOfBodyStructure", - "DirectionOfCondition", - "DirectionOfExamination", - "DirectionOfTreatment", - "DosageOfMedication", - "FormOfMedication", - "FrequencyOfMedication", - "FrequencyOfTreatment", - "QualifierOfCondition", - "RelationOfExamination", - "RouteOfMedication", - "TimeOfCondition", - "TimeOfEvent", - "TimeOfExamination", - "TimeOfMedication", - "TimeOfTreatment", - "UnitOfCondition", - "UnitOfExamination", - "ValueOfCondition", - "ValueOfExamination" - ], - "x-ms-enum": { - "name": "relationType", - "modelAsString": true - } - }, - "entities": { - "description": "The entities in the relation.", - "type": "array", - "items": { - "$ref": "#/definitions/HealthcareRelationEntity" - } + "allOf": [ + { + "$ref": "#/definitions/AnalyzeTextLROTask" } - } + ], + "x-ms-discriminator-value": "CustomMultiLabelClassification" }, - "HealthcareAssertion": { + "CustomMultiLabelClassificationTaskParameters": { "type": "object", + "description": "Supported parameters for a Custom Multi Classification task.", "properties": { - "conditionality": { - "description": "Describes any conditionality on the entity.", - "type": "string", - "enum": [ - "hypothetical", - "conditional" - ], - "x-ms-enum": { - "name": "Conditionality", - "modelAsString": false - } + "loggingOptOut": { + "type": "boolean", + "description": "logging opt out", + "default": false }, - "certainty": { - "description": "Describes the entities certainty and polarity.", + "projectName": { "type": "string", - "enum": [ - "positive", - "positivePossible", - "neutralPossible", - "negativePossible", - "negative" - ], - "x-ms-enum": { - "name": "Certainty", - "modelAsString": false - } + "description": "This field indicates the project name for the model." }, - "association": { - "description": "Describes if the entity is the subject of the text or if it describes someone else.", + "deploymentName": { "type": "string", - "enum": [ - "subject", - "other" - ], - "x-ms-enum": { - "name": "Association", - "modelAsString": false - } - } - } - }, - "HealthcareRelationEntity": { - "type": "object", - "required": [ - "ref", - "role" - ], - "properties": { - "ref": { - "description": "Reference link object, using a JSON pointer RFC 6901 (URI Fragment Identifier Representation), pointing to the entity .", - "type": "string" - }, - "role": { - "description": "Role of entity in the relationship. For example: 'CD20-positive diffuse large B-cell lymphoma' has the following entities with their roles in parenthesis: CD20 (GeneOrProtein), Positive (Expression), diffuse large B-cell lymphoma (Diagnosis).", - "type": "string" + "description": "This field indicates the deployment name for the model." } - } - }, - "HealthcareEntityLink": { - "type": "object", + }, "required": [ - "dataSource", - "id" - ], - "properties": { - "dataSource": { - "description": "Entity Catalog. Examples include: UMLS, CHV, MSH, etc.", - "type": "string" - }, - "id": { - "description": "Entity id in the given source catalog.", - "type": "string" - } - } + "projectName", + "deploymentName" + ] }, - "SentimentAnalysisTaskParameters": { + "CustomSingleLabelClassificationLROResult": { "type": "object", - "description": "Supported parameters for a Sentiment Analysis task.", + "description": "Contains the custom single label classification job result.", "properties": { - "opinionMining": { - "type": "boolean", - "default": false - }, - "stringIndexType": { - "$ref": "common.json#/definitions/StringIndexType" + "results": { + "$ref": "#/definitions/CustomLabelClassificationResult", + "description": "List of results." } }, + "required": [ + "results" + ], "allOf": [ { - "$ref": "#/definitions/PreBuiltTaskParameters" + "$ref": "#/definitions/AnalyzeTextLROResult" } - ] + ], + "x-ms-discriminator-value": "CustomSingleLabelClassificationLROResults" }, - "SentimentAnalysisLROTask": { + "CustomSingleLabelClassificationLROTask": { "type": "object", - "description": "An object representing the task definition for a Sentiment Analysis task.", + "description": "Use custom models to classify text into single label taxonomy", "properties": { "parameters": { - "$ref": "#/definitions/SentimentAnalysisTaskParameters" + "$ref": "#/definitions/CustomSingleLabelClassificationTaskParameters", + "description": "Task parameters" } }, "allOf": [ @@ -1065,328 +1196,184 @@ "$ref": "#/definitions/AnalyzeTextLROTask" } ], - "x-ms-discriminator-value": "SentimentAnalysis" + "x-ms-discriminator-value": "CustomSingleLabelClassification" }, - "SentimentTaskResult": { + "CustomSingleLabelClassificationTaskParameters": { "type": "object", + "description": "Supported parameters for a Custom Single Classification task.", "properties": { - "results": { - "$ref": "#/definitions/SentimentResponse" + "loggingOptOut": { + "type": "boolean", + "description": "logging opt out", + "default": false + }, + "projectName": { + "type": "string", + "description": "This field indicates the project name for the model." + }, + "deploymentName": { + "type": "string", + "description": "This field indicates the deployment name for the model." } }, - "allOf": [ - { - "$ref": "#/definitions/AnalyzeTextTaskResult" - } - ], "required": [ - "results" - ], - "x-ms-discriminator-value": "SentimentAnalysisResults" + "projectName", + "deploymentName" + ] }, - "SentimentResponse": { + "DetectedLanguage": { "type": "object", + "description": "Contains the details of the detected language for the text.", "properties": { - "documents": { - "type": "array", - "description": "Sentiment analysis per document.", - "items": { - "allOf": [ - { - "$ref": "#/definitions/SentimentDocumentResult" - } - ] - } + "name": { + "type": "string", + "description": "Long name of a detected language (e.g. English, French)." + }, + "iso6391Name": { + "type": "string", + "description": "A two letter representation of the detected language according to the ISO 639-1 standard (e.g. en, fr)." + }, + "confidenceScore": { + "type": "number", + "format": "double", + "description": "A confidence score between 0 and 1. Scores close to 1 indicate 100% certainty that the identified language is true." } }, - "allOf": [ - { - "$ref": "#/definitions/PreBuiltResult" - } - ], "required": [ - "documents" + "name", + "iso6391Name", + "confidenceScore" ] }, - "SentimentDocumentResult": { + "DocumentError": { "type": "object", + "description": "Contains details of errors encountered during a job execution.", "properties": { - "sentiment": { + "id": { "type": "string", - "description": "Predicted sentiment for document (Negative, Neutral, Positive, or Mixed).", - "enum": [ - "positive", - "neutral", - "negative", - "mixed" - ], - "x-ms-enum": { - "name": "DocumentSentimentValue", - "modelAsString": false - } - }, - "confidenceScores": { - "description": "Document level sentiment confidence scores between 0 and 1 for each sentiment class.", - "$ref": "#/definitions/SentimentConfidenceScorePerLabel" + "description": "The ID of the input document." }, - "sentences": { - "type": "array", - "description": "Sentence level sentiment analysis.", - "items": { - "$ref": "#/definitions/SentenceSentiment" - } + "error": { + "$ref": "#/definitions/Error", + "description": "Error encountered." } }, - "allOf": [ - { - "$ref": "#/definitions/DocumentResult" - } - ], "required": [ - "sentiment", - "confidenceScores", - "sentences" + "id", + "error" ] }, - "SentimentConfidenceScorePerLabel": { - "type": "object", - "required": [ + "DocumentSentimentValue": { + "type": "string", + "description": "Predicted sentiment for document (Negative, Neutral, Positive, or Mixed).", + "enum": [ "positive", "neutral", - "negative" + "negative", + "mixed" ], - "properties": { - "positive": { - "type": "number", - "format": "double", - "description": "Confidence score for positive sentiment" - }, - "neutral": { - "type": "number", - "format": "double", - "description": "Confidence score for neutral sentiment" - }, - "negative": { - "type": "number", - "format": "double", - "description": "Confidence score for negative sentiment" - } - }, - "description": "Represents the confidence scores between 0 and 1 across all sentiment classes: positive, neutral, negative." - }, - "SentenceSentiment": { - "type": "object", - "required": [ - "text", - "sentiment", - "confidenceScores", - "offset", - "length" - ], - "properties": { - "text": { - "type": "string", - "description": "The sentence text." - }, - "sentiment": { - "type": "string", - "description": "The predicted Sentiment for the sentence.", - "enum": [ - "positive", - "neutral", - "negative" - ], - "x-ms-enum": { - "name": "SentenceSentimentValue", - "modelAsString": false - } - }, - "confidenceScores": { - "description": "The sentiment confidence score between 0 and 1 for the sentence for all classes.", - "$ref": "#/definitions/SentimentConfidenceScorePerLabel" - }, - "offset": { - "type": "integer", - "format": "int32", - "description": "The sentence offset from the start of the document." - }, - "length": { - "type": "integer", - "format": "int32", - "description": "The length of the sentence." - }, - "targets": { - "type": "array", - "description": "The array of sentence targets for the sentence.", - "items": { - "$ref": "#/definitions/SentenceTarget" - } - }, - "assessments": { - "type": "array", - "description": "The array of assessments for the sentence.", - "items": { - "$ref": "#/definitions/SentenceAssessment" + "x-ms-enum": { + "name": "DocumentSentimentValue", + "modelAsString": false, + "values": [ + { + "name": "positive", + "value": "positive", + "description": "Positive statement" + }, + { + "name": "neutral", + "value": "neutral", + "description": "Neutral statement" + }, + { + "name": "negative", + "value": "negative", + "description": "Negative statement" + }, + { + "name": "mixed", + "value": "mixed", + "description": "Mixed statement" } - } + ] } }, - "SentenceTarget": { + "DocumentStatistics": { "type": "object", - "required": [ - "confidenceScores", - "length", - "offset", - "relations", - "sentiment", - "text" - ], + "description": "if showStats=true was specified in the request this field will contain information about the document payload.", "properties": { - "sentiment": { - "type": "string", - "enum": [ - "positive", - "mixed", - "negative" - ], - "x-ms-enum": { - "name": "TokenSentimentValue", - "modelAsString": false - }, - "description": "Targeted sentiment in the sentence." - }, - "confidenceScores": { - "description": "Target sentiment confidence scores for the target in the sentence.", - "$ref": "#/definitions/TargetConfidenceScoreLabel" - }, - "offset": { + "charactersCount": { "type": "integer", "format": "int32", - "description": "The target offset from the start of the sentence." + "description": "Number of text elements recognized in the document." }, - "length": { + "transactionsCount": { "type": "integer", "format": "int32", - "description": "The length of the target." - }, - "text": { - "type": "string", - "description": "The target text detected." - }, - "relations": { - "type": "array", - "description": "The array of either assessment or target objects which is related to the target.", - "items": { - "$ref": "#/definitions/TargetRelation" - } + "description": "Number of transactions for the document." } - } + }, + "required": [ + "charactersCount", + "transactionsCount" + ] }, - "SentenceAssessment": { + "DocumentWarning": { "type": "object", - "required": [ - "confidenceScores", - "isNegated", - "length", - "offset", - "sentiment", - "text" - ], + "description": "Contains the warnings object with warnings encountered for the processed document.", "properties": { - "sentiment": { - "type": "string", - "enum": [ - "positive", - "mixed", - "negative" - ], - "x-ms-enum": { - "name": "TokenSentimentValue", - "modelAsString": false - }, - "description": "Assessment sentiment in the sentence." - }, - "confidenceScores": { - "description": "Assessment sentiment confidence scores in the sentence.", - "$ref": "#/definitions/TargetConfidenceScoreLabel" - }, - "offset": { - "type": "integer", - "format": "int32", - "description": "The assessment offset from the start of the sentence." - }, - "length": { - "type": "integer", - "format": "int32", - "description": "The length of the assessment." + "code": { + "$ref": "#/definitions/WarningCodeValue", + "description": "Warning code." }, - "text": { + "message": { "type": "string", - "description": "The assessment text detected." + "description": "Warning message." }, - "isNegated": { - "type": "boolean", - "description": "The indicator representing if the assessment is negated." + "targetRef": { + "type": "string", + "description": "A JSON pointer reference indicating the target object." } - } + }, + "required": [ + "code", + "message" + ] }, - "TargetRelation": { + "EntitiesDocumentResult": { "type": "object", - "required": [ - "ref", - "relationType" - ], + "description": "Contains the entity recognition task result for the document.", "properties": { - "relationType": { + "id": { "type": "string", - "enum": [ - "assessment", - "target" - ], - "x-ms-enum": { - "name": "TargetRelationType", - "modelAsString": false + "description": "Unique, non-empty document identifier." + }, + "warnings": { + "type": "array", + "description": "Warnings encountered while processing document.", + "items": { + "$ref": "#/definitions/DocumentWarning" }, - "description": "The type related to the target." + "x-ms-identifiers": [] }, - "ref": { - "type": "string", - "description": "The JSON pointer indicating the linked object." - } - } - }, - "TargetConfidenceScoreLabel": { - "type": "object", - "required": [ - "negative", - "positive" - ], - "properties": { - "positive": { - "type": "number", - "format": "double", - "description": "Confidence score for positive sentiment" + "statistics": { + "$ref": "#/definitions/DocumentStatistics", + "description": "if showStats=true was specified in the request this field will contain information about the document payload." }, - "negative": { - "type": "number", - "format": "double", - "description": "Confidence score for negative sentiment" - } - }, - "description": "Represents the confidence scores across all sentiment classes: positive and negative." - }, - "EntitiesTaskParameters": { - "type": "object", - "description": "Supported parameters for an Entity Recognition task.", - "properties": { - "stringIndexType": { - "$ref": "common.json#/definitions/StringIndexType" + "entities": { + "type": "array", + "description": "Recognized entities in the document.", + "items": { + "$ref": "#/definitions/Entity" + }, + "x-ms-identifiers": [] } }, - "allOf": [ - { - "$ref": "#/definitions/PreBuiltTaskParameters" - } + "required": [ + "id", + "warnings", + "entities" ] }, "EntitiesLROTask": { @@ -1394,7 +1381,8 @@ "description": "An object representing the task definition for an Entities Recognition task.", "properties": { "parameters": { - "$ref": "#/definitions/EntitiesTaskParameters" + "$ref": "#/definitions/EntitiesTaskParameters", + "description": "Task parameters." } }, "allOf": [ @@ -1404,76 +1392,108 @@ ], "x-ms-discriminator-value": "EntityRecognition" }, - "EntitiesTaskResult": { - "type": "object", - "properties": { - "results": { - "$ref": "#/definitions/EntitiesResult" - } - }, - "allOf": [ - { - "$ref": "#/definitions/AnalyzeTextTaskResult" - } - ], - "required": [ - "results" - ], - "x-ms-discriminator-value": "EntityRecognitionResults" - }, "EntitiesResult": { "type": "object", + "description": "Contains the entity recognition task result.", "properties": { + "errors": { + "type": "array", + "description": "Errors by document id.", + "items": { + "$ref": "#/definitions/DocumentError" + } + }, + "statistics": { + "$ref": "#/definitions/RequestStatistics", + "description": "if showStats=true was specified in the request this field will contain information about the request payload." + }, + "modelVersion": { + "type": "string", + "description": "This field indicates which model is used for scoring." + }, "documents": { "type": "array", "description": "Response by document", "items": { - "allOf": [ - { - "$ref": "#/definitions/EntitiesDocumentResult" - } - ] + "$ref": "#/definitions/EntitiesDocumentResult" } } }, - "allOf": [ - { - "$ref": "#/definitions/PreBuiltResult" - } - ], "required": [ + "errors", + "modelVersion", "documents" ] }, - "EntitiesDocumentResult": { + "EntitiesTaskParameters": { "type": "object", + "description": "Supported parameters for an Entity Recognition task.", "properties": { - "entities": { - "type": "array", - "description": "Recognized entities in the document.", - "items": { - "$ref": "#/definitions/Entity" + "loggingOptOut": { + "type": "boolean", + "description": "logging opt out", + "default": false + }, + "modelVersion": { + "type": "string", + "description": "model version", + "default": "latest" + }, + "stringIndexType": { + "type": "string", + "description": "(Optional) parameter to provide the string index type used to interpret string offsets. Defaults to TextElements (Graphemes).", + "default": "TextElements_v8", + "enum": [ + "TextElements_v8", + "UnicodeCodePoint", + "Utf16CodeUnit" + ], + "x-ms-enum": { + "name": "StringIndexType", + "modelAsString": true, + "values": [ + { + "name": "TextElements_v8", + "value": "TextElements_v8", + "description": "Returned offset and length values will correspond to TextElements (Graphemes and Grapheme clusters) confirming to the Unicode 8.0.0 standard. Use this option if your application is written in .Net Framework or .Net Core and you will be using StringInfo." + }, + { + "name": "UnicodeCodePoint", + "value": "UnicodeCodePoint", + "description": "Returned offset and length values will correspond to Unicode code points. Use this option if your application is written in a language that support Unicode, for example Python." + }, + { + "name": "Utf16CodeUnit", + "value": "Utf16CodeUnit", + "description": "Returned offset and length values will correspond to UTF-16 code units. Use this option if your application is written in a language that support Unicode, for example Java, JavaScript." + } + ] } } + } + }, + "EntitiesTaskResult": { + "type": "object", + "description": "Contains the entity task", + "properties": { + "results": { + "$ref": "#/definitions/EntitiesResult", + "description": "Results for entity recognition." + } }, + "required": [ + "results" + ], "allOf": [ { - "$ref": "#/definitions/DocumentResult" + "$ref": "#/definitions/AnalyzeTextTaskResult" } ], - "required": [ - "entities" - ] + "x-ms-discriminator-value": "EntityRecognitionResults" }, "Entity": { "type": "object", - "required": [ - "text", - "category", - "offset", - "length", - "confidenceScore" - ], + "description": "Defines the detected entity object containing the entity category and entity text detected, etc.", "properties": { "text": { "type": "string", @@ -1502,28 +1522,41 @@ "format": "double", "description": "Confidence score between 0 and 1 of the extracted entity." } - } + }, + "required": [ + "text", + "category", + "offset", + "length", + "confidenceScore" + ] }, - "EntityLinkingTaskParameters": { + "EntityLinkingLROResult": { "type": "object", - "description": "Supported parameters for an Entity Linking task.", + "description": "Contains the analyze text Entity linking task LRO result.", "properties": { - "stringIndexType": { - "$ref": "common.json#/definitions/StringIndexType" + "results": { + "$ref": "#/definitions/EntityLinkingResult", + "description": "Entity linking result." } }, + "required": [ + "results" + ], "allOf": [ { - "$ref": "#/definitions/PreBuiltTaskParameters" + "$ref": "#/definitions/AnalyzeTextLROResult" } - ] + ], + "x-ms-discriminator-value": "EntityLinkingLROResults" }, "EntityLinkingLROTask": { "type": "object", - "description": "An object representing the task definition for an Entity Linking task.", + "description": "Contains the analyze text Entity linking LRO task.", "properties": { "parameters": { - "$ref": "#/definitions/EntityLinkingTaskParameters" + "$ref": "#/definitions/EntityLinkingTaskParameters", + "description": "Task parameters." } }, "allOf": [ @@ -1533,964 +1566,863 @@ ], "x-ms-discriminator-value": "EntityLinking" }, - "EntityLinkingTaskResult": { - "type": "object", - "properties": { - "results": { - "$ref": "#/definitions/EntityLinkingResult" - } - }, - "allOf": [ - { - "$ref": "#/definitions/AnalyzeTextTaskResult" - } - ], - "required": [ - "results" - ], - "x-ms-discriminator-value": "EntityLinkingResults" - }, "EntityLinkingResult": { "type": "object", + "description": "Entity linking result.", "properties": { + "errors": { + "type": "array", + "description": "Errors by document id.", + "items": { + "$ref": "#/definitions/DocumentError" + } + }, + "statistics": { + "$ref": "#/definitions/RequestStatistics", + "description": "if showStats=true was specified in the request this field will contain information about the request payload." + }, + "modelVersion": { + "type": "string", + "description": "This field indicates which model is used for scoring." + }, "documents": { "type": "array", "description": "Response by document", "items": { - "allOf": [ - { - "$ref": "#/definitions/LinkedEntitiesDocumentResult" - } - ] + "$ref": "#/definitions/LinkedEntitiesDocumentResult" } } }, - "allOf": [ - { - "$ref": "#/definitions/PreBuiltResult" - } - ], "required": [ + "errors", + "modelVersion", "documents" ] }, - "LinkedEntitiesDocumentResult": { - "type": "object", - "required": [ - "entities" - ], - "properties": { - "entities": { - "type": "array", - "description": "Recognized well known entities in the document.", - "items": { - "$ref": "#/definitions/LinkedEntity" - } - } - }, - "allOf": [ - { - "$ref": "#/definitions/DocumentResult" - } - ] - }, - "LinkedEntity": { + "EntityLinkingTaskParameters": { "type": "object", - "required": [ - "name", - "matches", - "language", - "url", - "dataSource" - ], + "description": "Supported parameters for an Entity Linking task.", "properties": { - "name": { - "type": "string", - "description": "Entity Linking formal name." - }, - "matches": { - "type": "array", - "description": "List of instances this entity appears in the text.", - "items": { - "$ref": "#/definitions/Match" - } - }, - "language": { - "type": "string", - "description": "Language used in the data source." - }, - "id": { - "type": "string", - "description": "Unique identifier of the recognized entity from the data source." - }, - "url": { - "type": "string", - "description": "URL for the entity's page from the data source." - }, - "dataSource": { - "type": "string", - "description": "Data source used to extract entity linking, such as Wiki/Bing etc." + "loggingOptOut": { + "type": "boolean", + "description": "logging opt out", + "default": false }, - "bingId": { + "modelVersion": { "type": "string", - "description": "Bing Entity Search API unique identifier of the recognized entity." - } - } - }, - "Match": { - "type": "object", - "required": [ - "confidenceScore", - "text", - "offset", - "length" - ], - "properties": { - "confidenceScore": { - "type": "number", - "format": "double", - "description": "If a well known item is recognized, a decimal number denoting the confidence level between 0 and 1 will be returned." + "description": "model version", + "default": "latest" }, - "text": { + "stringIndexType": { "type": "string", - "description": "Entity text as appears in the request." - }, - "offset": { - "type": "integer", - "format": "int32", - "description": "Start position for the entity match text." - }, - "length": { - "type": "integer", - "format": "int32", - "description": "Length for the entity match text." + "description": "Optional parameter to provide the string index type used to interpret string offsets. Defaults to TextElements (Graphemes).", + "default": "TextElements_v8", + "enum": [ + "TextElements_v8", + "UnicodeCodePoint", + "Utf16CodeUnit" + ], + "x-ms-enum": { + "name": "StringIndexType", + "modelAsString": true, + "values": [ + { + "name": "TextElements_v8", + "value": "TextElements_v8", + "description": "Returned offset and length values will correspond to TextElements (Graphemes and Grapheme clusters) confirming to the Unicode 8.0.0 standard. Use this option if your application is written in .Net Framework or .Net Core and you will be using StringInfo." + }, + { + "name": "UnicodeCodePoint", + "value": "UnicodeCodePoint", + "description": "Returned offset and length values will correspond to Unicode code points. Use this option if your application is written in a language that support Unicode, for example Python." + }, + { + "name": "Utf16CodeUnit", + "value": "Utf16CodeUnit", + "description": "Returned offset and length values will correspond to UTF-16 code units. Use this option if your application is written in a language that support Unicode, for example Java, JavaScript." + } + ] + } } } }, - "PiiTaskParameters": { - "type": "object", - "description": "Supported parameters for a PII Entities Recognition task.", - "properties": { - "domain": { - "$ref": "#/definitions/PiiDomain" - }, - "piiCategories": { - "$ref": "#/definitions/PiiCategories" - }, - "stringIndexType": { - "$ref": "common.json#/definitions/StringIndexType" - } - }, - "allOf": [ - { - "$ref": "#/definitions/PreBuiltTaskParameters" - } - ] - }, - "PiiLROTask": { + "EntityLinkingTaskResult": { "type": "object", - "description": "An object representing the task definition for a PII Entities Recognition task.", + "description": "Contains the analyze text Entity linking task result.", "properties": { - "parameters": { - "$ref": "#/definitions/PiiTaskParameters" + "results": { + "$ref": "#/definitions/EntityLinkingResult", + "description": "Entity linking result." } }, + "required": [ + "results" + ], "allOf": [ { - "$ref": "#/definitions/AnalyzeTextLROTask" + "$ref": "#/definitions/AnalyzeTextTaskResult" } ], - "x-ms-discriminator-value": "PiiEntityRecognition" + "x-ms-discriminator-value": "EntityLinkingResults" }, - "PiiTaskResult": { + "EntityRecognitionLROResult": { "type": "object", + "description": "Contains the entity recognition job task result.", "properties": { "results": { - "$ref": "#/definitions/PiiResult" + "$ref": "#/definitions/EntitiesResult", + "description": "Results for the task." } }, + "required": [ + "results" + ], "allOf": [ { - "$ref": "#/definitions/AnalyzeTextTaskResult" + "$ref": "#/definitions/AnalyzeTextLROResult" } ], - "required": [ - "results" - ], - "x-ms-discriminator-value": "PiiEntityRecognitionResults" + "x-ms-discriminator-value": "EntityRecognitionLROResults" }, - "PiiResult": { + "Error": { "type": "object", + "description": "The error response object returned when the service encounters some errors during processing the request.", "properties": { - "documents": { + "code": { + "$ref": "#/definitions/ErrorCode", + "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": "The target of the error." + }, + "details": { "type": "array", - "description": "Response by document", + "description": "An array of details about specific errors that led to this reported error.", "items": { - "allOf": [ - { - "$ref": "#/definitions/PiiEntitiesDocumentResult" - } - ] - } + "$ref": "#/definitions/Error" + }, + "x-ms-identifiers": [] + }, + "innererror": { + "$ref": "#/definitions/InnerErrorModel", + "description": "An object containing more specific information than the current object about the error." } }, - "allOf": [ - { - "$ref": "#/definitions/PreBuiltResult" - } - ], "required": [ - "documents" + "code", + "message" ] }, - "PiiDomain": { + "ErrorCode": { "type": "string", - "description": "The PII domain used for PII Entity Recognition.", - "default": "none", + "description": "Human-readable error code.", "enum": [ - "phi", - "none" + "InvalidRequest", + "InvalidArgument", + "Unauthorized", + "Forbidden", + "NotFound", + "ProjectNotFound", + "OperationNotFound", + "AzureCognitiveSearchNotFound", + "AzureCognitiveSearchIndexNotFound", + "TooManyRequests", + "AzureCognitiveSearchThrottling", + "AzureCognitiveSearchIndexLimitReached", + "InternalServerError", + "ServiceUnavailable", + "Timeout", + "QuotaExceeded", + "Conflict", + "Warning" ], "x-ms-enum": { - "name": "PiiDomain", + "name": "ErrorCode", "modelAsString": true, "values": [ { - "name": "phi", - "description": "Indicates that entities in the Personal Health Information domain should be redacted.", - "value": "phi" + "name": "InvalidRequest", + "value": "InvalidRequest", + "description": "Invalid request error" + }, + { + "name": "InvalidArgument", + "value": "InvalidArgument", + "description": "Invalid argument error" + }, + { + "name": "Unauthorized", + "value": "Unauthorized", + "description": "Unauthorized access error" + }, + { + "name": "Forbidden", + "value": "Forbidden", + "description": "Forbidden access error" + }, + { + "name": "NotFound", + "value": "NotFound", + "description": "Not found error" + }, + { + "name": "ProjectNotFound", + "value": "ProjectNotFound", + "description": "Project not found error" + }, + { + "name": "OperationNotFound", + "value": "OperationNotFound", + "description": "Operation not found error" + }, + { + "name": "AzureCognitiveSearchNotFound", + "value": "AzureCognitiveSearchNotFound", + "description": "Azure Cognitive Search not found error" + }, + { + "name": "AzureCognitiveSearchIndexNotFound", + "value": "AzureCognitiveSearchIndexNotFound", + "description": "Azure Cognitive Search index not found error" + }, + { + "name": "TooManyRequests", + "value": "TooManyRequests", + "description": "Too many requests error" + }, + { + "name": "AzureCognitiveSearchThrottling", + "value": "AzureCognitiveSearchThrottling", + "description": "Azure Cognitive Search throttling error" + }, + { + "name": "AzureCognitiveSearchIndexLimitReached", + "value": "AzureCognitiveSearchIndexLimitReached", + "description": "Azure Cognitive Search index limit reached error" + }, + { + "name": "InternalServerError", + "value": "InternalServerError", + "description": "Internal server error" + }, + { + "name": "ServiceUnavailable", + "value": "ServiceUnavailable", + "description": "Service unavailable error" + }, + { + "name": "Timeout", + "value": "Timeout", + "description": "Timeout error" + }, + { + "name": "QuotaExceeded", + "value": "QuotaExceeded", + "description": "Quota exceeded error" + }, + { + "name": "Conflict", + "value": "Conflict", + "description": "Conflict error" }, { - "name": "none", - "description": "Indicates that no domain is specified.", - "value": "none" + "name": "Warning", + "value": "Warning", + "description": "Warning error" } ] } }, - "PiiEntitiesDocumentResult": { + "ErrorResponse": { "type": "object", + "description": "Error response.", "properties": { - "redactedText": { - "type": "string", - "description": "Returns redacted text." - }, - "entities": { - "type": "array", - "description": "Recognized entities in the document.", - "items": { - "$ref": "#/definitions/Entity" - } + "error": { + "$ref": "#/definitions/Error", + "description": "The error object." } }, - "allOf": [ - { - "$ref": "#/definitions/DocumentResult" - } - ], "required": [ - "redactedText", - "entities" - ] - }, - "PiiCategories": { - "description": "(Optional) describes the PII categories to return", - "items": { - "type": "string", - "x-ms-enum": { - "name": "PiiCategory", - "modelAsString": true - }, - "enum": [ - "ABARoutingNumber", - "ARNationalIdentityNumber", - "AUBankAccountNumber", - "AUDriversLicenseNumber", - "AUMedicalAccountNumber", - "AUPassportNumber", - "AUTaxFileNumber", - "AUBusinessNumber", - "AUCompanyNumber", - "ATIdentityCard", - "ATTaxIdentificationNumber", - "ATValueAddedTaxNumber", - "AzureDocumentDBAuthKey", - "AzureIAASDatabaseConnectionAndSQLString", - "AzureIoTConnectionString", - "AzurePublishSettingPassword", - "AzureRedisCacheString", - "AzureSAS", - "AzureServiceBusString", - "AzureStorageAccountKey", - "AzureStorageAccountGeneric", - "BENationalNumber", - "BENationalNumberV2", - "BEValueAddedTaxNumber", - "BRCPFNumber", - "BRLegalEntityNumber", - "BRNationalIDRG", - "BGUniformCivilNumber", - "CABankAccountNumber", - "CADriversLicenseNumber", - "CAHealthServiceNumber", - "CAPassportNumber", - "CAPersonalHealthIdentification", - "CASocialInsuranceNumber", - "CLIdentityCardNumber", - "CNResidentIdentityCardNumber", - "CreditCardNumber", - "HRIdentityCardNumber", - "HRNationalIDNumber", - "HRPersonalIdentificationNumber", - "HRPersonalIdentificationOIBNumberV2", - "CYIdentityCard", - "CYTaxIdentificationNumber", - "CZPersonalIdentityNumber", - "CZPersonalIdentityV2", - "DKPersonalIdentificationNumber", - "DKPersonalIdentificationV2", - "DrugEnforcementAgencyNumber", - "EEPersonalIdentificationCode", - "EUDebitCardNumber", - "EUDriversLicenseNumber", - "EUGPSCoordinates", - "EUNationalIdentificationNumber", - "EUPassportNumber", - "EUSocialSecurityNumber", - "EUTaxIdentificationNumber", - "FIEuropeanHealthNumber", - "FINationalID", - "FINationalIDV2", - "FIPassportNumber", - "FRDriversLicenseNumber", - "FRHealthInsuranceNumber", - "FRNationalID", - "FRPassportNumber", - "FRSocialSecurityNumber", - "FRTaxIdentificationNumber", - "FRValueAddedTaxNumber", - "DEDriversLicenseNumber", - "DEPassportNumber", - "DEIdentityCardNumber", - "DETaxIdentificationNumber", - "DEValueAddedNumber", - "GRNationalIDCard", - "GRNationalIDV2", - "GRTaxIdentificationNumber", - "HKIdentityCardNumber", - "HUValueAddedNumber", - "HUPersonalIdentificationNumber", - "HUTaxIdentificationNumber", - "INPermanentAccount", - "INUniqueIdentificationNumber", - "IDIdentityCardNumber", - "InternationalBankingAccountNumber", - "IEPersonalPublicServiceNumber", - "IEPersonalPublicServiceNumberV2", - "ILBankAccountNumber", - "ILNationalID", - "ITDriversLicenseNumber", - "ITFiscalCode", - "ITValueAddedTaxNumber", - "JPBankAccountNumber", - "JPDriversLicenseNumber", - "JPPassportNumber", - "JPResidentRegistrationNumber", - "JPSocialInsuranceNumber", - "JPMyNumberCorporate", - "JPMyNumberPersonal", - "JPResidenceCardNumber", - "LVPersonalCode", - "LTPersonalCode", - "LUNationalIdentificationNumberNatural", - "LUNationalIdentificationNumberNonNatural", - "MYIdentityCardNumber", - "MTIdentityCardNumber", - "MTTaxIDNumber", - "NLCitizensServiceNumber", - "NLCitizensServiceNumberV2", - "NLTaxIdentificationNumber", - "NLValueAddedTaxNumber", - "NZBankAccountNumber", - "NZDriversLicenseNumber", - "NZInlandRevenueNumber", - "NZMinistryOfHealthNumber", - "NZSocialWelfareNumber", - "NOIdentityNumber", - "PHUnifiedMultiPurposeIDNumber", - "PLIdentityCard", - "PLNationalID", - "PLNationalIDV2", - "PLPassportNumber", - "PLTaxIdentificationNumber", - "PLREGONNumber", - "PTCitizenCardNumber", - "PTCitizenCardNumberV2", - "PTTaxIdentificationNumber", - "ROPersonalNumericalCode", - "RUPassportNumberDomestic", - "RUPassportNumberInternational", - "SANationalID", - "SGNationalRegistrationIdentityCardNumber", - "SKPersonalNumber", - "SITaxIdentificationNumber", - "SIUniqueMasterCitizenNumber", - "ZAIdentificationNumber", - "KRResidentRegistrationNumber", - "ESDNI", - "ESSocialSecurityNumber", - "ESTaxIdentificationNumber", - "SQLServerConnectionString", - "SENationalID", - "SENationalIDV2", - "SEPassportNumber", - "SETaxIdentificationNumber", - "SWIFTCode", - "CHSocialSecurityNumber", - "TWNationalID", - "TWPassportNumber", - "TWResidentCertificate", - "THPopulationIdentificationCode", - "TRNationalIdentificationNumber", - "UKDriversLicenseNumber", - "UKElectoralRollNumber", - "UKNationalHealthNumber", - "UKNationalInsuranceNumber", - "UKUniqueTaxpayerNumber", - "USUKPassportNumber", - "USBankAccountNumber", - "USDriversLicenseNumber", - "USIndividualTaxpayerIdentification", - "USSocialSecurityNumber", - "UAPassportNumberDomestic", - "UAPassportNumberInternational", - "Organization", - "Email", - "URL", - "Age", - "PhoneNumber", - "IPAddress", - "Date", - "Person", - "Address", - "All", - "Default" - ] - }, - "type": "array", - "uniqueItems": true - }, - "KeyPhraseTaskParameters": { - "type": "object", - "description": "Supported parameters for a Key Phrase Extraction task.", - "allOf": [ - { - "$ref": "#/definitions/PreBuiltTaskParameters" - } + "error" ] }, - "KeyPhraseLROTask": { - "type": "object", - "description": "An object representing the task definition for a Key Phrase Extraction task.", - "properties": { - "parameters": { - "$ref": "#/definitions/KeyPhraseTaskParameters" - } - }, - "allOf": [ - { - "$ref": "#/definitions/AnalyzeTextLROTask" - } - ], - "x-ms-discriminator-value": "KeyPhraseExtraction" - }, - "KeyPhraseTaskResult": { + "HealthcareAssertion": { "type": "object", + "description": "Assertion of the entity.", "properties": { - "results": { - "$ref": "#/definitions/KeyPhraseResult" - } - }, - "allOf": [ - { - "$ref": "#/definitions/AnalyzeTextTaskResult" + "conditionality": { + "$ref": "#/definitions/Conditionality", + "description": "Describes any conditionality on the entity." + }, + "certainty": { + "$ref": "#/definitions/Certainty", + "description": "Describes the entities certainty and polarity." + }, + "association": { + "$ref": "#/definitions/Association", + "description": "Describes if the entity is the subject of the text or if it describes someone else." } - ], - "required": [ - "results" - ], - "x-ms-discriminator-value": "KeyPhraseExtractionResults" + } }, - "KeyPhraseResult": { + "HealthcareEntitiesDocumentResult": { "type": "object", + "description": "Result object for the processed Healthcare document.", "properties": { - "documents": { + "id": { + "type": "string", + "description": "Unique, non-empty document identifier." + }, + "warnings": { "type": "array", - "description": "Response by document", + "description": "Warnings encountered while processing document.", "items": { - "allOf": [ - { - "$ref": "#/definitions/KeyPhrasesDocumentResult" - } - ] - } + "$ref": "#/definitions/DocumentWarning" + }, + "x-ms-identifiers": [] + }, + "statistics": { + "$ref": "#/definitions/DocumentStatistics", + "description": "if showStats=true was specified in the request this field will contain information about the document payload." + }, + "entities": { + "type": "array", + "description": "Healthcare entities.", + "items": { + "$ref": "#/definitions/HealthcareEntity" + }, + "x-ms-identifiers": [] + }, + "relations": { + "type": "array", + "description": "Healthcare entity relations.", + "items": { + "$ref": "#/definitions/HealthcareRelation" + }, + "x-ms-identifiers": [] } }, - "allOf": [ - { - "$ref": "#/definitions/PreBuiltResult" - } - ], "required": [ - "documents" + "id", + "warnings", + "entities", + "relations" ] }, - "KeyPhrasesDocumentResult": { + "HealthcareEntity": { "type": "object", + "description": "Healthcare entity extracted from the document", "properties": { - "keyPhrases": { + "text": { + "type": "string", + "description": "Entity text as appears in the request." + }, + "category": { + "$ref": "#/definitions/healthcareEntityCategory", + "description": "Healthcare Entity Category." + }, + "subcategory": { + "type": "string", + "description": "(Optional) Entity sub type." + }, + "offset": { + "type": "integer", + "format": "int32", + "description": "Start position for the entity text. Use of different 'stringIndexType' values can affect the offset returned." + }, + "length": { + "type": "integer", + "format": "int32", + "description": "Length for the entity text. Use of different 'stringIndexType' values can affect the length returned." + }, + "confidenceScore": { + "type": "number", + "format": "double", + "description": "Confidence score between 0 and 1 of the extracted entity." + }, + "assertion": { + "$ref": "#/definitions/HealthcareAssertion", + "description": "Assertion of the entity." + }, + "name": { + "type": "string", + "description": "Preferred name for the entity. Example: 'histologically' would have a 'name' of 'histologic'." + }, + "links": { "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.", + "description": "Entity references in known data sources.", "items": { - "type": "string" + "$ref": "#/definitions/HealthcareEntityLink" } } }, - "allOf": [ - { - "$ref": "#/definitions/DocumentResult" - } - ], "required": [ - "keyPhrases" + "text", + "category", + "offset", + "length", + "confidenceScore" ] }, - "LanguageDetectionTaskParameters": { + "HealthcareEntityLink": { "type": "object", - "description": "Supported parameters for a Language Detection task.", - "allOf": [ - { - "$ref": "#/definitions/PreBuiltTaskParameters" + "description": "Reference to an entity in known data sources.", + "properties": { + "dataSource": { + "type": "string", + "description": "Entity Catalog. Examples include: UMLS, CHV, MSH, etc." + }, + "id": { + "type": "string", + "description": "Entity id in the given source catalog." } + }, + "required": [ + "dataSource", + "id" ] }, - "LanguageDetectionTaskResult": { + "HealthcareLROResult": { "type": "object", + "description": "Healthcare Analyze Text long tunning operation result object.", "properties": { "results": { - "$ref": "#/definitions/LanguageDetectionResult" + "$ref": "#/definitions/HealthcareResult", + "description": "Results of the task." } }, + "required": [ + "results" + ], "allOf": [ { - "$ref": "#/definitions/AnalyzeTextTaskResult" + "$ref": "#/definitions/AnalyzeTextLROResult" } ], - "required": [ - "results" - ], - "x-ms-discriminator-value": "LanguageDetectionResults" + "x-ms-discriminator-value": "HealthcareLROResults" }, - "LanguageDetectionResult": { + "HealthcareLROTask": { "type": "object", + "description": "The long running task to be performed by the service on the Healthcare input documents.", "properties": { - "documents": { - "type": "array", - "description": "Response by document", - "items": { - "$ref": "#/definitions/LanguageDetectionDocumentResult" - } + "parameters": { + "$ref": "#/definitions/HealthcareTaskParameters", + "description": "Parameters for the Healthcare task." } }, "allOf": [ { - "$ref": "#/definitions/PreBuiltResult" + "$ref": "#/definitions/AnalyzeTextLROTask" } ], - "required": [ - "documents" - ] + "x-ms-discriminator-value": "Healthcare" }, - "LanguageDetectionDocumentResult": { + "HealthcareRelation": { "type": "object", + "description": "Every relation is an entity graph of a certain relationType, where all entities are connected and have specific roles within the relation context.", "properties": { - "detectedLanguage": { - "description": "Detected Language.", - "$ref": "#/definitions/DetectedLanguage" + "relationType": { + "$ref": "#/definitions/relationType", + "description": "Type of relation. Examples include: `DosageOfMedication` or 'FrequencyOfMedication', etc." + }, + "entities": { + "type": "array", + "description": "The entities in the relation.", + "items": { + "$ref": "#/definitions/HealthcareRelationEntity" + }, + "x-ms-identifiers": [] } }, - "allOf": [ - { - "$ref": "#/definitions/DocumentResult" - } - ], "required": [ - "detectedLanguage" + "relationType", + "entities" ] }, - "DetectedLanguage": { + "HealthcareRelationEntity": { "type": "object", - "required": [ - "name", - "iso6391Name", - "confidenceScore" - ], + "description": "Entity in the relation.", "properties": { - "name": { + "ref": { "type": "string", - "description": "Long name of a detected language (e.g. English, French)." + "description": "Reference link object, using a JSON pointer RFC 6901 (URI Fragment Identifier Representation), pointing to the entity ." }, - "iso6391Name": { + "role": { "type": "string", - "description": "A two letter representation of the detected language according to the ISO 639-1 standard (e.g. en, fr)." - }, - "confidenceScore": { - "type": "number", - "format": "double", - "description": "A confidence score between 0 and 1. Scores close to 1 indicate 100% certainty that the identified language is true." - } - } - }, - "AnalyzeTextJobState": { - "allOf": [ - { - "$ref": "#/definitions/JobState" - }, - { - "$ref": "#/definitions/TasksState" - }, - { - "$ref": "#/definitions/AnalyzeTextJobStatistics" - } - ] - }, - "Pagination": { - "properties": { - "nextLink": { - "type": "string" + "description": "Role of entity in the relationship. For example: 'CD20-positive diffuse large B-cell lymphoma' has the following entities with their roles in parenthesis: CD20 (GeneOrProtein), Positive (Expression), diffuse large B-cell lymphoma (Diagnosis)." } }, - "type": "object" + "required": [ + "ref", + "role" + ] }, - "JobState": { + "HealthcareResult": { + "type": "object", + "description": "Result object for the processed Healthcare task.", "properties": { - "displayName": { - "type": "string" - }, - "createdDateTime": { - "format": "date-time", - "type": "string" - }, - "expirationDateTime": { - "format": "date-time", - "type": "string" - }, - "jobId": { - "type": "string" + "errors": { + "type": "array", + "description": "Errors by document id.", + "items": { + "$ref": "#/definitions/DocumentError" + } }, - "lastUpdatedDateTime": { - "format": "date-time", - "type": "string" + "statistics": { + "$ref": "#/definitions/RequestStatistics", + "description": "if showStats=true was specified in the request this field will contain information about the request payload." }, - "status": { - "enum": [ - "notStarted", - "running", - "succeeded", - "partiallyCompleted", - "failed", - "cancelled", - "cancelling" - ], + "modelVersion": { "type": "string", - "x-ms-enum": { - "modelAsString": true, - "name": "State" - } + "description": "This field indicates which model is used for scoring." }, - "errors": { + "documents": { + "type": "array", + "description": "List of result objects for the processed Healthcare documents.", "items": { - "$ref": "common.json#/definitions/Error" - }, - "type": "array" - }, - "nextLink": { - "type": "string" + "$ref": "#/definitions/HealthcareEntitiesDocumentResult" + } } }, "required": [ - "jobId", - "lastUpdatedDateTime", - "createdDateTime", - "status" + "errors", + "modelVersion", + "documents" ] }, - "JobErrors": { - "properties": { - "errors": { - "items": { - "$ref": "common.json#/definitions/Error" - }, - "type": "array" - } - }, - "type": "object" - }, - "AnalyzeTextJobStatistics": { - "properties": { - "statistics": { - "$ref": "#/definitions/RequestStatistics" - } - }, - "type": "object" - }, - "TasksState": { - "properties": { - "tasks": { - "properties": { - "completed": { - "type": "integer" - }, - "failed": { - "type": "integer" - }, - "inProgress": { - "type": "integer" - }, - "total": { - "type": "integer" - }, - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/AnalyzeTextLROResult" - } - } - }, - "required": [ - "total", - "completed", - "failed", - "inProgress" - ], - "type": "object" - } - }, - "required": [ - "tasks" - ], - "type": "object" - }, - "TaskState": { + "HealthcareTaskParameters": { + "type": "object", + "description": "Supported parameters for a Healthcare task.", "properties": { - "lastUpdateDateTime": { - "format": "date-time", - "type": "string" + "loggingOptOut": { + "type": "boolean", + "description": "logging opt out", + "default": false }, - "status": { + "modelVersion": { + "type": "string", + "description": "model version", + "default": "latest" + }, + "stringIndexType": { + "type": "string", + "description": "Specifies the method used to interpret string offsets.", + "default": "TextElements_v8", "enum": [ - "notStarted", - "running", - "succeeded", - "failed", - "cancelled", - "cancelling" + "TextElements_v8", + "UnicodeCodePoint", + "Utf16CodeUnit" ], "x-ms-enum": { + "name": "StringIndexType", "modelAsString": true, - "name": "State" + "values": [ + { + "name": "TextElements_v8", + "value": "TextElements_v8", + "description": "Returned offset and length values will correspond to TextElements (Graphemes and Grapheme clusters) confirming to the Unicode 8.0.0 standard. Use this option if your application is written in .Net Framework or .Net Core and you will be using StringInfo." + }, + { + "name": "UnicodeCodePoint", + "value": "UnicodeCodePoint", + "description": "Returned offset and length values will correspond to Unicode code points. Use this option if your application is written in a language that support Unicode, for example Python." + }, + { + "name": "Utf16CodeUnit", + "value": "Utf16CodeUnit", + "description": "Returned offset and length values will correspond to UTF-16 code units. Use this option if your application is written in a language that support Unicode, for example Java, JavaScript." + } + ] } } - }, - "required": [ - "status", - "lastUpdateDateTime" + } + }, + "InnerErrorCode": { + "type": "string", + "description": "Human-readable error code.", + "enum": [ + "InvalidRequest", + "InvalidParameterValue", + "KnowledgeBaseNotFound", + "AzureCognitiveSearchNotFound", + "AzureCognitiveSearchThrottling", + "ExtractionFailure", + "InvalidRequestBodyFormat", + "EmptyRequest", + "MissingInputDocuments", + "InvalidDocument", + "ModelVersionIncorrect", + "InvalidDocumentBatch", + "UnsupportedLanguageCode", + "InvalidCountryHint" ], - "type": "object" + "x-ms-enum": { + "name": "InnerErrorCode", + "modelAsString": true, + "values": [ + { + "name": "InvalidRequest", + "value": "InvalidRequest", + "description": "Invalid request error" + }, + { + "name": "InvalidParameterValue", + "value": "InvalidParameterValue", + "description": "Invalid parameter value error" + }, + { + "name": "KnowledgeBaseNotFound", + "value": "KnowledgeBaseNotFound", + "description": "Knowledge base not found error" + }, + { + "name": "AzureCognitiveSearchNotFound", + "value": "AzureCognitiveSearchNotFound", + "description": "Azure Cognitive Search not found error" + }, + { + "name": "AzureCognitiveSearchThrottling", + "value": "AzureCognitiveSearchThrottling", + "description": "Azure Cognitive Search throttling error" + }, + { + "name": "ExtractionFailure", + "value": "ExtractionFailure", + "description": "Extraction failure error" + }, + { + "name": "InvalidRequestBodyFormat", + "value": "InvalidRequestBodyFormat", + "description": "Invalid request body format error" + }, + { + "name": "EmptyRequest", + "value": "EmptyRequest", + "description": "Empty request error" + }, + { + "name": "MissingInputDocuments", + "value": "MissingInputDocuments", + "description": "Missing input documents error" + }, + { + "name": "InvalidDocument", + "value": "InvalidDocument", + "description": "Invalid document error" + }, + { + "name": "ModelVersionIncorrect", + "value": "ModelVersionIncorrect", + "description": "Model version incorrect error" + }, + { + "name": "InvalidDocumentBatch", + "value": "InvalidDocumentBatch", + "description": "Invalid document batch error" + }, + { + "name": "UnsupportedLanguageCode", + "value": "UnsupportedLanguageCode", + "description": "Unsupported language code error" + }, + { + "name": "InvalidCountryHint", + "value": "InvalidCountryHint", + "description": "Invalid country hint error" + } + ] + } }, - "AnalyzeTextLROResult": { + "InnerErrorModel": { "type": "object", - "discriminator": "kind", + "description": "An object containing more specific information about the error. As per Microsoft One API guidelines - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses.", "properties": { - "kind": { - "$ref": "#/definitions/AnalyzeTextLROResultsKind" - } - }, - "allOf": [ - { - "$ref": "#/definitions/TaskState" + "code": { + "$ref": "#/definitions/InnerErrorCode", + "description": "One of a server-defined set of error codes." }, - { - "$ref": "#/definitions/TaskIdentifier" + "message": { + "type": "string", + "description": "Error message." + }, + "details": { + "type": "object", + "description": "Error details.", + "additionalProperties": { + "type": "string" + } + }, + "target": { + "type": "string", + "description": "Error target." + }, + "innererror": { + "$ref": "#/definitions/InnerErrorModel", + "description": "An object containing more specific information than the current object about the error." } - ], + }, "required": [ - "kind" + "code", + "message" ] }, - "EntityRecognitionLROResult": { + "KeyPhraseExtractionLROResult": { "type": "object", + "description": "Contains the analyze text KeyPhraseExtraction LRO task.", "properties": { "results": { - "$ref": "#/definitions/EntitiesResult" + "$ref": "#/definitions/KeyPhraseResult", + "description": "The list of Key phrase extraction results" } }, - "allOf": [ - { - "$ref": "#/definitions/AnalyzeTextLROResult" - } - ], "required": [ "results" ], - "x-ms-discriminator-value": "EntityRecognitionLROResults" - }, - "CustomEntityRecognitionLROResult": { - "type": "object", - "properties": { - "results": { - "$ref": "#/definitions/CustomEntitiesResult" - } - }, "allOf": [ { "$ref": "#/definitions/AnalyzeTextLROResult" } ], - "required": [ - "results" - ], - "x-ms-discriminator-value": "CustomEntityRecognitionLROResults" + "x-ms-discriminator-value": "KeyPhraseExtractionLROResults" }, - "CustomSingleLabelClassificationLROResult": { + "KeyPhraseLROTask": { "type": "object", + "description": "An object representing the task definition for a Key Phrase Extraction task.", "properties": { - "results": { - "$ref": "#/definitions/CustomLabelClassificationResult" + "parameters": { + "$ref": "#/definitions/KeyPhraseTaskParameters", + "description": "Key phrase extraction task parameters." } }, "allOf": [ { - "$ref": "#/definitions/AnalyzeTextLROResult" + "$ref": "#/definitions/AnalyzeTextLROTask" } ], - "required": [ - "results" - ], - "x-ms-discriminator-value": "CustomSingleLabelClassificationLROResults" + "x-ms-discriminator-value": "KeyPhraseExtraction" }, - "CustomMultiLabelClassificationLROResult": { + "KeyPhraseResult": { "type": "object", + "description": "Contains the KeyPhraseResult.", "properties": { - "results": { - "$ref": "#/definitions/CustomLabelClassificationResult" + "errors": { + "type": "array", + "description": "Errors by document id.", + "items": { + "$ref": "#/definitions/DocumentError" + } + }, + "statistics": { + "$ref": "#/definitions/RequestStatistics", + "description": "if showStats=true was specified in the request this field will contain information about the request payload." + }, + "modelVersion": { + "type": "string", + "description": "This field indicates which model is used for scoring." + }, + "documents": { + "type": "array", + "description": "Response by document", + "items": { + "$ref": "#/definitions/KeyPhrasesDocumentResult" + } } }, - "allOf": [ - { - "$ref": "#/definitions/AnalyzeTextLROResult" - } - ], "required": [ - "results" - ], - "x-ms-discriminator-value": "CustomMultiLabelClassificationLROResults" + "errors", + "modelVersion", + "documents" + ] }, - "EntityLinkingLROResult": { + "KeyPhraseTaskParameters": { "type": "object", + "description": "Supported parameters for a Key Phrase Extraction task.", "properties": { - "results": { - "$ref": "#/definitions/EntityLinkingResult" - } - }, - "allOf": [ - { - "$ref": "#/definitions/AnalyzeTextLROResult" + "loggingOptOut": { + "type": "boolean", + "description": "logging opt out", + "default": false + }, + "modelVersion": { + "type": "string", + "description": "model version", + "default": "latest" } - ], - "required": [ - "results" - ], - "x-ms-discriminator-value": "EntityLinkingLROResults" + } }, - "PiiEntityRecognitionLROResult": { + "KeyPhraseTaskResult": { "type": "object", + "description": "Contains the analyze text KeyPhraseExtraction task result.", "properties": { "results": { - "$ref": "#/definitions/PiiResult" + "$ref": "#/definitions/KeyPhraseResult", + "description": "The list of Key phrase extraction results" } }, - "allOf": [ - { - "$ref": "#/definitions/AnalyzeTextLROResult" - } - ], "required": [ "results" ], - "x-ms-discriminator-value": "PiiEntityRecognitionLROResults" - }, - "HealthcareLROResult": { - "type": "object", - "properties": { - "results": { - "$ref": "#/definitions/HealthcareResult" - } - }, "allOf": [ { - "$ref": "#/definitions/AnalyzeTextLROResult" + "$ref": "#/definitions/AnalyzeTextTaskResult" } ], - "required": [ - "results" - ], - "x-ms-discriminator-value": "HealthcareLROResults" + "x-ms-discriminator-value": "KeyPhraseExtractionResults" }, - "SentimentLROResult": { + "KeyPhrasesDocumentResult": { "type": "object", + "description": "Contains the Key phrase extraction results for a document.", "properties": { - "results": { - "$ref": "#/definitions/SentimentResponse" + "id": { + "type": "string", + "description": "Unique, non-empty document identifier." + }, + "warnings": { + "type": "array", + "description": "Warnings encountered while processing document.", + "items": { + "$ref": "#/definitions/DocumentWarning" + }, + "x-ms-identifiers": [] + }, + "statistics": { + "$ref": "#/definitions/DocumentStatistics", + "description": "if showStats=true was specified in the request this field will contain information about the document payload." + }, + "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" + } } }, - "allOf": [ - { - "$ref": "#/definitions/AnalyzeTextLROResult" - } - ], "required": [ - "results" - ], - "x-ms-discriminator-value": "SentimentAnalysisLROResults" + "id", + "warnings", + "keyPhrases" + ] }, - "KeyPhraseExtractionLROResult": { + "LanguageDetectionAnalysisInput": { "type": "object", + "description": "Contains the language detection document analysis input.", "properties": { - "results": { - "$ref": "#/definitions/KeyPhraseResult" - } - }, - "allOf": [ - { - "$ref": "#/definitions/AnalyzeTextLROResult" + "documents": { + "type": "array", + "description": "List of documents to be analyzed.", + "items": { + "$ref": "#/definitions/LanguageInput" + } } - ], - "required": [ - "results" - ], - "x-ms-discriminator-value": "KeyPhraseExtractionLROResults" - }, - "DocumentResponse": { - "type": "object", - "properties": {} + } }, - "DocumentResult": { + "LanguageDetectionDocumentResult": { "type": "object", - "required": [ - "id", - "warnings" - ], + "description": "Contains the language detection for a document.", "properties": { "id": { "type": "string", @@ -2501,120 +2433,95 @@ "description": "Warnings encountered while processing document.", "items": { "$ref": "#/definitions/DocumentWarning" - } + }, + "x-ms-identifiers": [] }, "statistics": { - "description": "if showStats=true was specified in the request this field will contain information about the document payload.", - "$ref": "#/definitions/DocumentStatistics" + "$ref": "#/definitions/DocumentStatistics", + "description": "if showStats=true was specified in the request this field will contain information about the document payload." + }, + "detectedLanguage": { + "$ref": "#/definitions/DetectedLanguage", + "description": "Detected Language." } - } - }, - "DocumentError": { - "type": "object", + }, "required": [ "id", - "error" - ], + "warnings", + "detectedLanguage" + ] + }, + "LanguageDetectionResult": { + "type": "object", + "description": "Contains the language detection result for the request.", "properties": { - "id": { + "errors": { + "type": "array", + "description": "Errors by document id.", + "items": { + "$ref": "#/definitions/DocumentError" + } + }, + "statistics": { + "$ref": "#/definitions/RequestStatistics", + "description": "if showStats=true was specified in the request this field will contain information about the request payload." + }, + "modelVersion": { "type": "string", - "description": "Document Id." + "description": "This field indicates which model is used for scoring." }, - "error": { - "type": "object", - "description": "Document Error.", - "$ref": "common.json#/definitions/Error" + "documents": { + "type": "array", + "description": "Enumeration of language detection results for each input document.", + "items": { + "$ref": "#/definitions/LanguageDetectionDocumentResult" + } } - } + }, + "required": [ + "errors", + "modelVersion", + "documents" + ] }, - "DocumentWarning": { + "LanguageDetectionTaskParameters": { "type": "object", - "required": [ - "code", - "message" - ], + "description": "Supported parameters for a Language Detection task.", "properties": { - "code": { - "type": "string", - "enum": [ - "LongWordsInDocument", - "DocumentTruncated" - ], - "x-ms-enum": { - "name": "WarningCodeValue", - "modelAsString": true - }, - "description": "Error code." - }, - "message": { - "type": "string", - "description": "Warning message." + "loggingOptOut": { + "type": "boolean", + "description": "logging opt out", + "default": false }, - "targetRef": { + "modelVersion": { "type": "string", - "description": "A JSON pointer reference indicating the target object." + "description": "model version", + "default": "latest" } } }, - "DocumentStatistics": { + "LanguageDetectionTaskResult": { "type": "object", - "required": [ - "charactersCount", - "transactionsCount" - ], + "description": "Contains the language detection task result for the request.", "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." + "results": { + "$ref": "#/definitions/LanguageDetectionResult", + "description": "Contains the language detection results." } }, - "description": "if showStats=true was specified in the request this field will contain information about the document payload." - }, - "RequestStatistics": { - "type": "object", "required": [ - "documentsCount", - "validDocumentsCount", - "erroneousDocumentsCount", - "transactionsCount" + "results" ], - "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." + "allOf": [ + { + "$ref": "#/definitions/AnalyzeTextTaskResult" } - }, - "description": "if showStats=true was specified in the request this field will contain information about the request payload." + ], + "x-ms-discriminator-value": "LanguageDetectionResults" }, - "MultiLanguageInput": { + "LanguageInput": { "type": "object", - "description": "Contains an input document to be analyzed by the service.", - "required": [ - "id", - "text" - ], + "description": "Contains the language detection input.", "properties": { "id": { "type": "string", @@ -2624,49 +2531,2349 @@ "type": "string", "description": "The input text to process." }, - "language": { + "countryHint": { "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": "The country hint to help with language detection of the text." } - } - }, - "LanguageInput": { - "type": "object", + }, "required": [ "id", "text" - ], + ] + }, + "LinkedEntitiesDocumentResult": { + "type": "object", + "description": "Entity linking document result.", "properties": { "id": { "type": "string", "description": "Unique, non-empty document identifier." }, - "text": { - "type": "string" + "warnings": { + "type": "array", + "description": "Warnings encountered while processing document.", + "items": { + "$ref": "#/definitions/DocumentWarning" + }, + "x-ms-identifiers": [] }, - "countryHint": { - "type": "string" + "statistics": { + "$ref": "#/definitions/DocumentStatistics", + "description": "if showStats=true was specified in the request this field will contain information about the document payload." + }, + "entities": { + "type": "array", + "description": "Recognized well known entities in the document.", + "items": { + "$ref": "#/definitions/LinkedEntity" + } } - } - } - }, - "parameters": { - "ShowStats": { - "name": "showStats", - "in": "query", - "description": "(Optional) if set to true, response will contain request and document level statistics.", - "type": "boolean", - "required": false, - "x-ms-parameter-location": "method" + }, + "required": [ + "id", + "warnings", + "entities" + ] }, - "JobId": { - "description": "Job ID", - "format": "uuid", - "in": "path", - "name": "jobId", + "LinkedEntity": { + "type": "object", + "description": "The LinkedEntity object containing the detected entity with the associated sources/links.", + "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" + }, + "x-ms-identifiers": [] + }, + "language": { + "type": "string", + "description": "Language used in the data source." + }, + "id": { + "type": "string", + "description": "Unique identifier of the recognized entity from the data source." + }, + "url": { + "type": "string", + "description": "URL for the entity's page from the data source." + }, + "dataSource": { + "type": "string", + "description": "Data source used to extract entity linking, such as Wiki/Bing etc." + }, + "bingId": { + "type": "string", + "description": "Bing Entity Search API unique identifier of the recognized entity." + } + }, + "required": [ + "name", + "matches", + "language", + "url", + "dataSource" + ] + }, + "Match": { + "type": "object", + "description": "The Match object containing the detected entity text with the offset and the length.", + "properties": { + "confidenceScore": { + "type": "number", + "format": "double", + "description": "If a well known item is recognized, a decimal number denoting the confidence level between 0 and 1 will be returned." + }, + "text": { + "type": "string", + "description": "Entity text as appears in the request." + }, + "offset": { + "type": "integer", + "format": "int32", + "description": "Start position for the entity match text." + }, + "length": { + "type": "integer", + "format": "int32", + "description": "Length for the entity match text." + } + }, + "required": [ + "confidenceScore", + "text", + "offset", + "length" + ] + }, + "MultiLanguageAnalysisInput": { + "type": "object", + "description": "Collection of input documents to be analyzed by the service.", + "properties": { + "documents": { + "type": "array", + "description": "The input documents to be analyzed.", + "items": { + "$ref": "#/definitions/MultiLanguageInput" + } + } + } + }, + "MultiLanguageInput": { + "type": "object", + "description": "Contains an input document to be analyzed by the service.", + "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. (Following only applies to 2023-04-15-preview and above) For Auto Language Detection, use \\\"auto\\\". If not set, use \\\"en\\\" for English as default." + } + }, + "required": [ + "id", + "text" + ] + }, + "PiiCategory": { + "type": "string", + "description": "(Optional) describes the PII categories to return", + "enum": [ + "ABARoutingNumber", + "ARNationalIdentityNumber", + "AUBankAccountNumber", + "AUDriversLicenseNumber", + "AUMedicalAccountNumber", + "AUPassportNumber", + "AUTaxFileNumber", + "AUBusinessNumber", + "AUCompanyNumber", + "ATIdentityCard", + "ATTaxIdentificationNumber", + "ATValueAddedTaxNumber", + "AzureDocumentDBAuthKey", + "AzureIAASDatabaseConnectionAndSQLString", + "AzureIoTConnectionString", + "AzurePublishSettingPassword", + "AzureRedisCacheString", + "AzureSAS", + "AzureServiceBusString", + "AzureStorageAccountKey", + "AzureStorageAccountGeneric", + "BENationalNumber", + "BENationalNumberV2", + "BEValueAddedTaxNumber", + "BRCPFNumber", + "BRLegalEntityNumber", + "BRNationalIDRG", + "BGUniformCivilNumber", + "CABankAccountNumber", + "CADriversLicenseNumber", + "CAHealthServiceNumber", + "CAPassportNumber", + "CAPersonalHealthIdentification", + "CASocialInsuranceNumber", + "CLIdentityCardNumber", + "CNResidentIdentityCardNumber", + "CreditCardNumber", + "HRIdentityCardNumber", + "HRNationalIDNumber", + "HRPersonalIdentificationNumber", + "HRPersonalIdentificationOIBNumberV2", + "CYIdentityCard", + "CYTaxIdentificationNumber", + "CZPersonalIdentityNumber", + "CZPersonalIdentityV2", + "DKPersonalIdentificationNumber", + "DKPersonalIdentificationV2", + "DrugEnforcementAgencyNumber", + "EEPersonalIdentificationCode", + "EUDebitCardNumber", + "EUDriversLicenseNumber", + "EUGPSCoordinates", + "EUNationalIdentificationNumber", + "EUPassportNumber", + "EUSocialSecurityNumber", + "EUTaxIdentificationNumber", + "FIEuropeanHealthNumber", + "FINationalID", + "FINationalIDV2", + "FIPassportNumber", + "FRDriversLicenseNumber", + "FRHealthInsuranceNumber", + "FRNationalID", + "FRPassportNumber", + "FRSocialSecurityNumber", + "FRTaxIdentificationNumber", + "FRValueAddedTaxNumber", + "DEDriversLicenseNumber", + "DEPassportNumber", + "DEIdentityCardNumber", + "DETaxIdentificationNumber", + "DEValueAddedNumber", + "GRNationalIDCard", + "GRNationalIDV2", + "GRTaxIdentificationNumber", + "HKIdentityCardNumber", + "HUValueAddedNumber", + "HUPersonalIdentificationNumber", + "HUTaxIdentificationNumber", + "INPermanentAccount", + "INUniqueIdentificationNumber", + "IDIdentityCardNumber", + "InternationalBankingAccountNumber", + "IEPersonalPublicServiceNumber", + "IEPersonalPublicServiceNumberV2", + "ILBankAccountNumber", + "ILNationalID", + "ITDriversLicenseNumber", + "ITFiscalCode", + "ITValueAddedTaxNumber", + "JPBankAccountNumber", + "JPDriversLicenseNumber", + "JPPassportNumber", + "JPResidentRegistrationNumber", + "JPSocialInsuranceNumber", + "JPMyNumberCorporate", + "JPMyNumberPersonal", + "JPResidenceCardNumber", + "LVPersonalCode", + "LTPersonalCode", + "LUNationalIdentificationNumberNatural", + "LUNationalIdentificationNumberNonNatural", + "MYIdentityCardNumber", + "MTIdentityCardNumber", + "MTTaxIDNumber", + "NLCitizensServiceNumber", + "NLCitizensServiceNumberV2", + "NLTaxIdentificationNumber", + "NLValueAddedTaxNumber", + "NZBankAccountNumber", + "NZDriversLicenseNumber", + "NZInlandRevenueNumber", + "NZMinistryOfHealthNumber", + "NZSocialWelfareNumber", + "NOIdentityNumber", + "PHUnifiedMultiPurposeIDNumber", + "PLIdentityCard", + "PLNationalID", + "PLNationalIDV2", + "PLPassportNumber", + "PLTaxIdentificationNumber", + "PLREGONNumber", + "PTCitizenCardNumber", + "PTCitizenCardNumberV2", + "PTTaxIdentificationNumber", + "ROPersonalNumericalCode", + "RUPassportNumberDomestic", + "RUPassportNumberInternational", + "SANationalID", + "SGNationalRegistrationIdentityCardNumber", + "SKPersonalNumber", + "SITaxIdentificationNumber", + "SIUniqueMasterCitizenNumber", + "ZAIdentificationNumber", + "KRResidentRegistrationNumber", + "ESDNI", + "ESSocialSecurityNumber", + "ESTaxIdentificationNumber", + "SQLServerConnectionString", + "SENationalID", + "SENationalIDV2", + "SEPassportNumber", + "SETaxIdentificationNumber", + "SWIFTCode", + "CHSocialSecurityNumber", + "TWNationalID", + "TWPassportNumber", + "TWResidentCertificate", + "THPopulationIdentificationCode", + "TRNationalIdentificationNumber", + "UKDriversLicenseNumber", + "UKElectoralRollNumber", + "UKNationalHealthNumber", + "UKNationalInsuranceNumber", + "UKUniqueTaxpayerNumber", + "USUKPassportNumber", + "USBankAccountNumber", + "USDriversLicenseNumber", + "USIndividualTaxpayerIdentification", + "USSocialSecurityNumber", + "UAPassportNumberDomestic", + "UAPassportNumberInternational", + "Organization", + "Email", + "URL", + "Age", + "PhoneNumber", + "IPAddress", + "Date", + "Person", + "Address", + "All", + "Default" + ], + "x-ms-enum": { + "name": "PiiCategory", + "modelAsString": true, + "values": [ + { + "name": "ABARoutingNumber", + "value": "ABARoutingNumber", + "description": "ABA Routing number" + }, + { + "name": "ARNationalIdentityNumber", + "value": "ARNationalIdentityNumber", + "description": "AR National Identity Number" + }, + { + "name": "AUBankAccountNumber", + "value": "AUBankAccountNumber", + "description": "AT Identity Card" + }, + { + "name": "AUDriversLicenseNumber", + "value": "AUDriversLicenseNumber", + "description": "AU Driver's License Number" + }, + { + "name": "AUMedicalAccountNumber", + "value": "AUMedicalAccountNumber", + "description": "AU Medical Account Number" + }, + { + "name": "AUPassportNumber", + "value": "AUPassportNumber", + "description": "AU Passport Number" + }, + { + "name": "AUTaxFileNumber", + "value": "AUTaxFileNumber", + "description": "AU Tax File Number" + }, + { + "name": "AUBusinessNumber", + "value": "AUBusinessNumber", + "description": "AU Business Number" + }, + { + "name": "AUCompanyNumber", + "value": "AUCompanyNumber", + "description": "AU Company Number" + }, + { + "name": "ATIdentityCard", + "value": "ATIdentityCard", + "description": "AT Identity Card" + }, + { + "name": "ATTaxIdentificationNumber", + "value": "ATTaxIdentificationNumber", + "description": "AT Tax Identification Number" + }, + { + "name": "ATValueAddedTaxNumber", + "value": "ATValueAddedTaxNumber", + "description": "AT Value Added Tax Number" + }, + { + "name": "AzureDocumentDBAuthKey", + "value": "AzureDocumentDBAuthKey", + "description": "Azure Document DB Auth Key" + }, + { + "name": "AzureIAASDatabaseConnectionAndSQLString", + "value": "AzureIAASDatabaseConnectionAndSQLString", + "description": "Azure IAAS Database Connection And SQL String" + }, + { + "name": "AzureIoTConnectionString", + "value": "AzureIoTConnectionString", + "description": "Azure IoT Connection String" + }, + { + "name": "AzurePublishSettingPassword", + "value": "AzurePublishSettingPassword", + "description": "Azure Publish Setting Password" + }, + { + "name": "AzureRedisCacheString", + "value": "AzureRedisCacheString", + "description": "Azure Redis Cache String" + }, + { + "name": "AzureSAS", + "value": "AzureSAS", + "description": "Azure SAS" + }, + { + "name": "AzureServiceBusString", + "value": "AzureServiceBusString", + "description": "Azure Service Bus String" + }, + { + "name": "AzureStorageAccountKey", + "value": "AzureStorageAccountKey", + "description": "Azure Storage Account Key" + }, + { + "name": "AzureStorageAccountGeneric", + "value": "AzureStorageAccountGeneric", + "description": "Azure Storage Account Generic" + }, + { + "name": "BENationalNumber", + "value": "BENationalNumber", + "description": "BE National Number" + }, + { + "name": "BENationalNumberV2", + "value": "BENationalNumberV2", + "description": "BE National Number V2" + }, + { + "name": "BEValueAddedTaxNumber", + "value": "BEValueAddedTaxNumber", + "description": "BE Value Added Tax Number" + }, + { + "name": "BRCPFNumber", + "value": "BRCPFNumber", + "description": "BR CPF Number" + }, + { + "name": "BRLegalEntityNumber", + "value": "BRLegalEntityNumber", + "description": "BR Legal Entity Number" + }, + { + "name": "BRNationalIDRG", + "value": "BRNationalIDRG", + "description": "BR National ID RG" + }, + { + "name": "BGUniformCivilNumber", + "value": "BGUniformCivilNumber", + "description": "BG Uniform Civil Number" + }, + { + "name": "CABankAccountNumber", + "value": "CABankAccountNumber", + "description": "CA Bank Account Number" + }, + { + "name": "CADriversLicenseNumber", + "value": "CADriversLicenseNumber", + "description": "CA Driver's License Number" + }, + { + "name": "CAHealthServiceNumber", + "value": "CAHealthServiceNumber", + "description": "CA Health Service Number" + }, + { + "name": "CAPassportNumber", + "value": "CAPassportNumber", + "description": "CA Passport Number" + }, + { + "name": "CAPersonalHealthIdentification", + "value": "CAPersonalHealthIdentification", + "description": "CA Personal Health Identification" + }, + { + "name": "CASocialInsuranceNumber", + "value": "CASocialInsuranceNumber", + "description": "CA Social Insurance Number" + }, + { + "name": "CLIdentityCardNumber", + "value": "CLIdentityCardNumber", + "description": "CL Identity Card Number" + }, + { + "name": "CNResidentIdentityCardNumber", + "value": "CNResidentIdentityCardNumber", + "description": "CN Resident Identity Card Number" + }, + { + "name": "CreditCardNumber", + "value": "CreditCardNumber", + "description": "Credit Card Number" + }, + { + "name": "HRIdentityCardNumber", + "value": "HRIdentityCardNumber", + "description": "HR Identity Card Number" + }, + { + "name": "HRNationalIDNumber", + "value": "HRNationalIDNumber", + "description": "HR National ID Number" + }, + { + "name": "HRPersonalIdentificationNumber", + "value": "HRPersonalIdentificationNumber", + "description": "HR Personal Identification Number" + }, + { + "name": "HRPersonalIdentificationOIBNumberV2", + "value": "HRPersonalIdentificationOIBNumberV2", + "description": "HR Personal Identification OIB Number V2" + }, + { + "name": "CYIdentityCard", + "value": "CYIdentityCard", + "description": "CY Identity Card" + }, + { + "name": "CYTaxIdentificationNumber", + "value": "CYTaxIdentificationNumber", + "description": "CY Tax Identification Number" + }, + { + "name": "CZPersonalIdentityNumber", + "value": "CZPersonalIdentityNumber", + "description": "CZ Personal Identity Number" + }, + { + "name": "CZPersonalIdentityV2", + "value": "CZPersonalIdentityV2", + "description": "CZ Personal Identity V2" + }, + { + "name": "DKPersonalIdentificationNumber", + "value": "DKPersonalIdentificationNumber", + "description": "DK Personal Identification Number" + }, + { + "name": "DKPersonalIdentificationV2", + "value": "DKPersonalIdentificationV2", + "description": "DK Personal Identification V2" + }, + { + "name": "DrugEnforcementAgencyNumber", + "value": "DrugEnforcementAgencyNumber", + "description": "Drug Enforcement Agency Number" + }, + { + "name": "EEPersonalIdentificationCode", + "value": "EEPersonalIdentificationCode", + "description": "EE Personal Identification Code" + }, + { + "name": "EUDebitCardNumber", + "value": "EUDebitCardNumber", + "description": "EU Debit Card Number" + }, + { + "name": "EUDriversLicenseNumber", + "value": "EUDriversLicenseNumber", + "description": "EU Driver's License Number" + }, + { + "name": "EUGPSCoordinates", + "value": "EUGPSCoordinates", + "description": "EU GPS Coordinates" + }, + { + "name": "EUNationalIdentificationNumber", + "value": "EUNationalIdentificationNumber", + "description": "EU National Identification Number" + }, + { + "name": "EUPassportNumber", + "value": "EUPassportNumber", + "description": "EU Passport Number" + }, + { + "name": "EUSocialSecurityNumber", + "value": "EUSocialSecurityNumber", + "description": "EU Social Security Number" + }, + { + "name": "EUTaxIdentificationNumber", + "value": "EUTaxIdentificationNumber", + "description": "EU Tax Identification Number" + }, + { + "name": "FIEuropeanHealthNumber", + "value": "FIEuropeanHealthNumber", + "description": "FI European Health Number" + }, + { + "name": "FINationalID", + "value": "FINationalID", + "description": "FI National ID" + }, + { + "name": "FINationalIDV2", + "value": "FINationalIDV2", + "description": "FI National ID V2" + }, + { + "name": "FIPassportNumber", + "value": "FIPassportNumber", + "description": "FI Passport Number" + }, + { + "name": "FRDriversLicenseNumber", + "value": "FRDriversLicenseNumber", + "description": "FR Driver's License Number" + }, + { + "name": "FRHealthInsuranceNumber", + "value": "FRHealthInsuranceNumber", + "description": "FR Health Insurance Number" + }, + { + "name": "FRNationalID", + "value": "FRNationalID", + "description": "FR National ID" + }, + { + "name": "FRPassportNumber", + "value": "FRPassportNumber", + "description": "FR Passport Number" + }, + { + "name": "FRSocialSecurityNumber", + "value": "FRSocialSecurityNumber", + "description": "FR Social Security Number" + }, + { + "name": "FRTaxIdentificationNumber", + "value": "FRTaxIdentificationNumber", + "description": "FR Tax Identification Number" + }, + { + "name": "FRValueAddedTaxNumber", + "value": "FRValueAddedTaxNumber", + "description": "FR Value Added Tax Number" + }, + { + "name": "DEDriversLicenseNumber", + "value": "DEDriversLicenseNumber", + "description": "DE Driver's License Number" + }, + { + "name": "DEPassportNumber", + "value": "DEPassportNumber", + "description": "DE Passport Number" + }, + { + "name": "DEIdentityCardNumber", + "value": "DEIdentityCardNumber", + "description": "DE Identity Card Number" + }, + { + "name": "DETaxIdentificationNumber", + "value": "DETaxIdentificationNumber", + "description": "DE Tax Identification Number" + }, + { + "name": "DEValueAddedNumber", + "value": "DEValueAddedNumber", + "description": "DE Value Added Number" + }, + { + "name": "GRNationalIDCard", + "value": "GRNationalIDCard", + "description": "GR National ID Card" + }, + { + "name": "GRNationalIDV2", + "value": "GRNationalIDV2", + "description": "GR National ID V2" + }, + { + "name": "GRTaxIdentificationNumber", + "value": "GRTaxIdentificationNumber", + "description": "GR Tax Identification Number" + }, + { + "name": "HKIdentityCardNumber", + "value": "HKIdentityCardNumber", + "description": "HK Identity Card Number" + }, + { + "name": "HUValueAddedNumber", + "value": "HUValueAddedNumber", + "description": "HU Value Added Number" + }, + { + "name": "HUPersonalIdentificationNumber", + "value": "HUPersonalIdentificationNumber", + "description": "HU Personal Identification Number" + }, + { + "name": "HUTaxIdentificationNumber", + "value": "HUTaxIdentificationNumber", + "description": "HU Tax Identification Number" + }, + { + "name": "INPermanentAccount", + "value": "INPermanentAccount", + "description": "IN Permanent Account" + }, + { + "name": "INUniqueIdentificationNumber", + "value": "INUniqueIdentificationNumber", + "description": "IN Unique Identification Number" + }, + { + "name": "IDIdentityCardNumber", + "value": "IDIdentityCardNumber", + "description": "ID Identity Card Number" + }, + { + "name": "InternationalBankingAccountNumber", + "value": "InternationalBankingAccountNumber", + "description": "International Banking Account Number" + }, + { + "name": "IEPersonalPublicServiceNumber", + "value": "IEPersonalPublicServiceNumber", + "description": "IE Personal Public Service Number" + }, + { + "name": "IEPersonalPublicServiceNumberV2", + "value": "IEPersonalPublicServiceNumberV2", + "description": "IE Personal Public Service Number V2" + }, + { + "name": "ILBankAccountNumber", + "value": "ILBankAccountNumber", + "description": "IL Bank Account Number" + }, + { + "name": "ILNationalID", + "value": "ILNationalID", + "description": "IL National ID" + }, + { + "name": "ITDriversLicenseNumber", + "value": "ITDriversLicenseNumber", + "description": "IT Driver's License Number" + }, + { + "name": "ITFiscalCode", + "value": "ITFiscalCode", + "description": "IT Fiscal Code" + }, + { + "name": "ITValueAddedTaxNumber", + "value": "ITValueAddedTaxNumber", + "description": "IT Value Added Tax Number" + }, + { + "name": "JPBankAccountNumber", + "value": "JPBankAccountNumber", + "description": "JP Bank Account Number" + }, + { + "name": "JPDriversLicenseNumber", + "value": "JPDriversLicenseNumber", + "description": "JP Driver's License Number" + }, + { + "name": "JPPassportNumber", + "value": "JPPassportNumber", + "description": "JP Passport Number" + }, + { + "name": "JPResidentRegistrationNumber", + "value": "JPResidentRegistrationNumber", + "description": "JP Resident Registration Number" + }, + { + "name": "JPSocialInsuranceNumber", + "value": "JPSocialInsuranceNumber", + "description": "JP Social Insurance Number" + }, + { + "name": "JPMyNumberCorporate", + "value": "JPMyNumberCorporate", + "description": "JP My Number Corporate" + }, + { + "name": "JPMyNumberPersonal", + "value": "JPMyNumberPersonal", + "description": "JP My Number Personal" + }, + { + "name": "JPResidenceCardNumber", + "value": "JPResidenceCardNumber", + "description": "JP Residence Card Number" + }, + { + "name": "LVPersonalCode", + "value": "LVPersonalCode", + "description": "LV Personal Code" + }, + { + "name": "LTPersonalCode", + "value": "LTPersonalCode", + "description": "LT Personal Code" + }, + { + "name": "LUNationalIdentificationNumberNatural", + "value": "LUNationalIdentificationNumberNatural", + "description": "LU National Identification Number Natural" + }, + { + "name": "LUNationalIdentificationNumberNonNatural", + "value": "LUNationalIdentificationNumberNonNatural", + "description": "LU National Identification Number Non Natural" + }, + { + "name": "MYIdentityCardNumber", + "value": "MYIdentityCardNumber", + "description": "MY Identity Card Number" + }, + { + "name": "MTIdentityCardNumber", + "value": "MTIdentityCardNumber", + "description": "MT Identity Card Number" + }, + { + "name": "MTTaxIDNumber", + "value": "MTTaxIDNumber", + "description": "MT Tax ID Number" + }, + { + "name": "NLCitizensServiceNumber", + "value": "NLCitizensServiceNumber", + "description": "NL Citizens Service Number" + }, + { + "name": "NLCitizensServiceNumberV2", + "value": "NLCitizensServiceNumberV2", + "description": "NL Citizens Service Number V2" + }, + { + "name": "NLTaxIdentificationNumber", + "value": "NLTaxIdentificationNumber", + "description": "NL Tax Identification Number" + }, + { + "name": "NLValueAddedTaxNumber", + "value": "NLValueAddedTaxNumber", + "description": "NL Value Added Tax Number" + }, + { + "name": "NZBankAccountNumber", + "value": "NZBankAccountNumber", + "description": "NZ Bank Account Number" + }, + { + "name": "NZDriversLicenseNumber", + "value": "NZDriversLicenseNumber", + "description": "NZ Driver's License Number" + }, + { + "name": "NZInlandRevenueNumber", + "value": "NZInlandRevenueNumber", + "description": "NZ Inland Revenue Number" + }, + { + "name": "NZMinistryOfHealthNumber", + "value": "NZMinistryOfHealthNumber", + "description": "NZ Ministry Of Health Number" + }, + { + "name": "NZSocialWelfareNumber", + "value": "NZSocialWelfareNumber", + "description": "NZ Social Welfare Number" + }, + { + "name": "NOIdentityNumber", + "value": "NOIdentityNumber", + "description": "NO Identity Number" + }, + { + "name": "PHUnifiedMultiPurposeIDNumber", + "value": "PHUnifiedMultiPurposeIDNumber", + "description": "PH Unified Multi Purpose ID Number" + }, + { + "name": "PLIdentityCard", + "value": "PLIdentityCard", + "description": "PL Identity Card" + }, + { + "name": "PLNationalID", + "value": "PLNationalID", + "description": "PL National ID" + }, + { + "name": "PLNationalIDV2", + "value": "PLNationalIDV2", + "description": "PL National ID V2" + }, + { + "name": "PLPassportNumber", + "value": "PLPassportNumber", + "description": "PL Passport Number" + }, + { + "name": "PLTaxIdentificationNumber", + "value": "PLTaxIdentificationNumber", + "description": "PL Tax Identification Number" + }, + { + "name": "PLREGONNumber", + "value": "PLREGONNumber", + "description": "PL REGON Number" + }, + { + "name": "PTCitizenCardNumber", + "value": "PTCitizenCardNumber", + "description": "PT Citizen Card Number" + }, + { + "name": "PTCitizenCardNumberV2", + "value": "PTCitizenCardNumberV2", + "description": "PT Citizen Card Number V2" + }, + { + "name": "PTTaxIdentificationNumber", + "value": "PTTaxIdentificationNumber", + "description": "PT Tax Identification Number" + }, + { + "name": "ROPersonalNumericalCode", + "value": "ROPersonalNumericalCode", + "description": "RO Personal Numerical Code" + }, + { + "name": "RUPassportNumberDomestic", + "value": "RUPassportNumberDomestic", + "description": "RU Passport Number Domestic" + }, + { + "name": "RUPassportNumberInternational", + "value": "RUPassportNumberInternational", + "description": "RU Passport Number International" + }, + { + "name": "SANationalID", + "value": "SANationalID", + "description": "SA National ID" + }, + { + "name": "SGNationalRegistrationIdentityCardNumber", + "value": "SGNationalRegistrationIdentityCardNumber", + "description": "SG National Registration Identity Card Number" + }, + { + "name": "SKPersonalNumber", + "value": "SKPersonalNumber", + "description": "SK Personal Number" + }, + { + "name": "SITaxIdentificationNumber", + "value": "SITaxIdentificationNumber", + "description": "SI Tax Identification Number" + }, + { + "name": "SIUniqueMasterCitizenNumber", + "value": "SIUniqueMasterCitizenNumber", + "description": "SI Unique Master Citizen Number" + }, + { + "name": "ZAIdentificationNumber", + "value": "ZAIdentificationNumber", + "description": "ZA Identification Number" + }, + { + "name": "KRResidentRegistrationNumber", + "value": "KRResidentRegistrationNumber", + "description": "KR Resident Registration Number" + }, + { + "name": "ESDNI", + "value": "ESDNI", + "description": "ES DNI" + }, + { + "name": "ESSocialSecurityNumber", + "value": "ESSocialSecurityNumber", + "description": "ES Social Security Number" + }, + { + "name": "ESTaxIdentificationNumber", + "value": "ESTaxIdentificationNumber", + "description": "ES Tax Identification Number" + }, + { + "name": "SQLServerConnectionString", + "value": "SQLServerConnectionString", + "description": "SQL Server Connection String" + }, + { + "name": "SENationalID", + "value": "SENationalID", + "description": "SE National ID" + }, + { + "name": "SENationalIDV2", + "value": "SENationalIDV2", + "description": "SE National ID V2" + }, + { + "name": "SEPassportNumber", + "value": "SEPassportNumber", + "description": "SE Passport Number" + }, + { + "name": "SETaxIdentificationNumber", + "value": "SETaxIdentificationNumber", + "description": "SE Tax Identification Number" + }, + { + "name": "SWIFTCode", + "value": "SWIFTCode", + "description": "SWIFT Code" + }, + { + "name": "CHSocialSecurityNumber", + "value": "CHSocialSecurityNumber", + "description": "CH Social Security Number" + }, + { + "name": "TWNationalID", + "value": "TWNationalID", + "description": "TW National ID" + }, + { + "name": "TWPassportNumber", + "value": "TWPassportNumber", + "description": "TW Passport Number" + }, + { + "name": "TWResidentCertificate", + "value": "TWResidentCertificate", + "description": "TW Resident Certificate" + }, + { + "name": "THPopulationIdentificationCode", + "value": "THPopulationIdentificationCode", + "description": "TH Population Identification Code" + }, + { + "name": "TRNationalIdentificationNumber", + "value": "TRNationalIdentificationNumber", + "description": "TR National Identification Number" + }, + { + "name": "UKDriversLicenseNumber", + "value": "UKDriversLicenseNumber", + "description": "UK Driver's License Number" + }, + { + "name": "UKElectoralRollNumber", + "value": "UKElectoralRollNumber", + "description": "UK Electoral Roll Number" + }, + { + "name": "UKNationalHealthNumber", + "value": "UKNationalHealthNumber", + "description": "UK National Health Number" + }, + { + "name": "UKNationalInsuranceNumber", + "value": "UKNationalInsuranceNumber", + "description": "UK National Insurance Number" + }, + { + "name": "UKUniqueTaxpayerNumber", + "value": "UKUniqueTaxpayerNumber", + "description": "UK Unique Taxpayer Number" + }, + { + "name": "USUKPassportNumber", + "value": "USUKPassportNumber", + "description": "US UK Passport Number" + }, + { + "name": "USBankAccountNumber", + "value": "USBankAccountNumber", + "description": "US Bank Account Number" + }, + { + "name": "USDriversLicenseNumber", + "value": "USDriversLicenseNumber", + "description": "US Driver's License Number" + }, + { + "name": "USIndividualTaxpayerIdentification", + "value": "USIndividualTaxpayerIdentification", + "description": "US Individual Taxpayer Identification" + }, + { + "name": "USSocialSecurityNumber", + "value": "USSocialSecurityNumber", + "description": "US Social Security Number" + }, + { + "name": "UAPassportNumberDomestic", + "value": "UAPassportNumberDomestic", + "description": "UA Passport Number Domestic" + }, + { + "name": "UAPassportNumberInternational", + "value": "UAPassportNumberInternational", + "description": "UA Passport Number International" + }, + { + "name": "Organization", + "value": "Organization", + "description": "Organization" + }, + { + "name": "Email", + "value": "Email", + "description": "Email" + }, + { + "name": "URL", + "value": "URL", + "description": "URL" + }, + { + "name": "Age", + "value": "Age", + "description": "Age" + }, + { + "name": "PhoneNumber", + "value": "PhoneNumber", + "description": "Phone Number" + }, + { + "name": "IPAddress", + "value": "IPAddress", + "description": "IP Address" + }, + { + "name": "Date", + "value": "Date", + "description": "Date" + }, + { + "name": "Person", + "value": "Person", + "description": "Person" + }, + { + "name": "Address", + "value": "Address", + "description": "Address" + }, + { + "name": "All", + "value": "All", + "description": "All PII categories." + }, + { + "name": "Default", + "value": "Default", + "description": "Default PII categories for the language." + } + ] + } + }, + "PiiEntitiesDocumentResult": { + "type": "object", + "description": "Contains the PII results.", + "properties": { + "id": { + "type": "string", + "description": "Unique, non-empty document identifier." + }, + "warnings": { + "type": "array", + "description": "Warnings encountered while processing document.", + "items": { + "$ref": "#/definitions/DocumentWarning" + }, + "x-ms-identifiers": [] + }, + "statistics": { + "$ref": "#/definitions/DocumentStatistics", + "description": "if showStats=true was specified in the request this field will contain information about the document payload." + }, + "redactedText": { + "type": "string", + "description": "Returns redacted text." + }, + "entities": { + "type": "array", + "description": "Recognized entities in the document.", + "items": { + "$ref": "#/definitions/Entity" + }, + "x-ms-identifiers": [] + } + }, + "required": [ + "id", + "warnings", + "redactedText", + "entities" + ] + }, + "PiiEntityRecognitionLROResult": { + "type": "object", + "description": "Contains the PII LRO results.", + "properties": { + "results": { + "$ref": "#/definitions/PiiResult", + "description": "The list of pii results" + } + }, + "required": [ + "results" + ], + "allOf": [ + { + "$ref": "#/definitions/AnalyzeTextLROResult" + } + ], + "x-ms-discriminator-value": "PiiEntityRecognitionLROResults" + }, + "PiiLROTask": { + "type": "object", + "description": "Contains the analyze text PIIEntityRecognition LRO task.", + "properties": { + "parameters": { + "$ref": "#/definitions/PiiTaskParameters", + "description": "Pii task parameters." + } + }, + "allOf": [ + { + "$ref": "#/definitions/AnalyzeTextLROTask" + } + ], + "x-ms-discriminator-value": "PiiEntityRecognition" + }, + "PiiResult": { + "type": "object", + "description": "Contains the PiiResult.", + "properties": { + "errors": { + "type": "array", + "description": "Errors by document id.", + "items": { + "$ref": "#/definitions/DocumentError" + } + }, + "statistics": { + "$ref": "#/definitions/RequestStatistics", + "description": "if showStats=true was specified in the request this field will contain information about the request payload." + }, + "modelVersion": { + "type": "string", + "description": "This field indicates which model is used for scoring." + }, + "documents": { + "type": "array", + "description": "Response by document", + "items": { + "$ref": "#/definitions/PiiEntitiesDocumentResult" + } + } + }, + "required": [ + "errors", + "modelVersion", + "documents" + ] + }, + "PiiTaskParameters": { + "type": "object", + "description": "Supported parameters for a PII Entities Recognition task.", + "properties": { + "loggingOptOut": { + "type": "boolean", + "description": "logging opt out", + "default": false + }, + "modelVersion": { + "type": "string", + "description": "model version", + "default": "latest" + }, + "domain": { + "type": "string", + "description": "Domain for PII task", + "default": "none", + "enum": [ + "phi", + "none" + ], + "x-ms-enum": { + "name": "PiiDomain", + "modelAsString": true, + "values": [ + { + "name": "phi", + "value": "phi", + "description": "Indicates that entities in the Personal Health Information domain should be redacted." + }, + { + "name": "none", + "value": "none", + "description": "Indicates that no domain is specified." + } + ] + } + }, + "piiCategories": { + "type": "array", + "description": "Enumeration of PII categories to be returned in the response.", + "items": { + "$ref": "#/definitions/PiiCategory" + } + }, + "stringIndexType": { + "type": "string", + "description": "StringIndexType to be used for analysis.", + "default": "TextElements_v8", + "enum": [ + "TextElements_v8", + "UnicodeCodePoint", + "Utf16CodeUnit" + ], + "x-ms-enum": { + "name": "StringIndexType", + "modelAsString": true, + "values": [ + { + "name": "TextElements_v8", + "value": "TextElements_v8", + "description": "Returned offset and length values will correspond to TextElements (Graphemes and Grapheme clusters) confirming to the Unicode 8.0.0 standard. Use this option if your application is written in .Net Framework or .Net Core and you will be using StringInfo." + }, + { + "name": "UnicodeCodePoint", + "value": "UnicodeCodePoint", + "description": "Returned offset and length values will correspond to Unicode code points. Use this option if your application is written in a language that support Unicode, for example Python." + }, + { + "name": "Utf16CodeUnit", + "value": "Utf16CodeUnit", + "description": "Returned offset and length values will correspond to UTF-16 code units. Use this option if your application is written in a language that support Unicode, for example Java, JavaScript." + } + ] + } + } + } + }, + "PiiTaskResult": { + "type": "object", + "description": "Contains the analyze text PIIEntityRecognition LRO task.", + "properties": { + "results": { + "$ref": "#/definitions/PiiResult", + "description": "The list of pii results" + } + }, + "required": [ + "results" + ], + "allOf": [ + { + "$ref": "#/definitions/AnalyzeTextTaskResult" + } + ], + "x-ms-discriminator-value": "PiiEntityRecognitionResults" + }, + "RequestStatistics": { + "type": "object", + "description": "if showStats=true was specified in the request this field will contain information about the request payload.", + "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." + } + }, + "required": [ + "documentsCount", + "validDocumentsCount", + "erroneousDocumentsCount", + "transactionsCount" + ] + }, + "SentenceAssessment": { + "type": "object", + "description": "Represents a sentence assessment and the assessments or target objects related to it.", + "properties": { + "sentiment": { + "$ref": "#/definitions/TokenSentimentValue", + "description": "The sentiment of the sentence." + }, + "confidenceScores": { + "$ref": "#/definitions/TargetConfidenceScoreLabel", + "description": "Represents the confidence scores across all sentiment classes: positive and negative." + }, + "offset": { + "type": "integer", + "format": "int32", + "description": "The target offset from the start of the sentence." + }, + "length": { + "type": "integer", + "format": "int32", + "description": "The length of the target." + }, + "text": { + "type": "string", + "description": "The target text detected." + }, + "isNegated": { + "type": "boolean", + "description": "The indicator representing if the assessment is negated." + } + }, + "required": [ + "sentiment", + "confidenceScores", + "offset", + "length", + "text", + "isNegated" + ] + }, + "SentenceSentiment": { + "type": "object", + "description": "A document's sentence sentiment.", + "properties": { + "text": { + "type": "string", + "description": "The sentence text." + }, + "sentiment": { + "$ref": "#/definitions/SentenceSentimentValue", + "description": "The predicted Sentiment for the sentence." + }, + "confidenceScores": { + "$ref": "#/definitions/SentimentConfidenceScores", + "description": "The sentiment confidence score between 0 and 1 for the sentence for all classes." + }, + "offset": { + "type": "integer", + "format": "int32", + "description": "The target offset from the start of the sentence." + }, + "length": { + "type": "integer", + "format": "int32", + "description": "The length of the target." + }, + "targets": { + "type": "array", + "description": "The array of sentence targets for the sentence.", + "items": { + "$ref": "#/definitions/SentenceTarget" + }, + "x-ms-identifiers": [] + }, + "assessments": { + "type": "array", + "description": "The array of assessments for the sentence.", + "items": { + "$ref": "#/definitions/SentenceAssessment" + }, + "x-ms-identifiers": [] + } + }, + "required": [ + "text", + "sentiment", + "confidenceScores", + "offset", + "length" + ] + }, + "SentenceSentimentValue": { + "type": "string", + "description": "The predicted Sentiment for the sentence.", + "enum": [ + "positive", + "neutral", + "negative" + ], + "x-ms-enum": { + "name": "SentenceSentimentValue", + "modelAsString": false, + "values": [ + { + "name": "positive", + "value": "positive", + "description": "Positive sentiment" + }, + { + "name": "neutral", + "value": "neutral", + "description": "Neutral sentiment" + }, + { + "name": "negative", + "value": "negative", + "description": "Negative sentiment" + } + ] + } + }, + "SentenceTarget": { + "type": "object", + "description": "Represents a sentence target and the assessments or target objects related to it.", + "properties": { + "sentiment": { + "$ref": "#/definitions/TokenSentimentValue", + "description": "The sentiment of the sentence." + }, + "confidenceScores": { + "$ref": "#/definitions/TargetConfidenceScoreLabel", + "description": "Represents the confidence scores across all sentiment classes: positive and negative." + }, + "offset": { + "type": "integer", + "format": "int32", + "description": "The target offset from the start of the sentence." + }, + "length": { + "type": "integer", + "format": "int32", + "description": "The length of the target." + }, + "text": { + "type": "string", + "description": "The target text detected." + }, + "relations": { + "type": "array", + "description": "The array of either assessment or target objects which is related to the target.", + "items": { + "$ref": "#/definitions/TargetRelation" + }, + "x-ms-identifiers": [] + } + }, + "required": [ + "sentiment", + "confidenceScores", + "offset", + "length", + "text", + "relations" + ] + }, + "SentimentAnalysisLROTask": { + "type": "object", + "description": "An object representing the task definition for a Sentiment Analysis task.", + "properties": { + "parameters": { + "$ref": "#/definitions/SentimentAnalysisTaskParameters", + "description": "Parameters for the Sentiment Analysis task." + } + }, + "allOf": [ + { + "$ref": "#/definitions/AnalyzeTextLROTask" + } + ], + "x-ms-discriminator-value": "SentimentAnalysis" + }, + "SentimentAnalysisTaskParameters": { + "type": "object", + "description": "Supported parameters for a Sentiment Analysis task.", + "properties": { + "loggingOptOut": { + "type": "boolean", + "description": "logging opt out", + "default": false + }, + "modelVersion": { + "type": "string", + "description": "model version", + "default": "latest" + }, + "opinionMining": { + "type": "boolean", + "description": "Whether to use opinion mining in the request or not.", + "default": false + }, + "stringIndexType": { + "type": "string", + "description": "Specifies the method used to interpret string offsets.", + "default": "TextElements_v8", + "enum": [ + "TextElements_v8", + "UnicodeCodePoint", + "Utf16CodeUnit" + ], + "x-ms-enum": { + "name": "StringIndexType", + "modelAsString": true, + "values": [ + { + "name": "TextElements_v8", + "value": "TextElements_v8", + "description": "Returned offset and length values will correspond to TextElements (Graphemes and Grapheme clusters) confirming to the Unicode 8.0.0 standard. Use this option if your application is written in .Net Framework or .Net Core and you will be using StringInfo." + }, + { + "name": "UnicodeCodePoint", + "value": "UnicodeCodePoint", + "description": "Returned offset and length values will correspond to Unicode code points. Use this option if your application is written in a language that support Unicode, for example Python." + }, + { + "name": "Utf16CodeUnit", + "value": "Utf16CodeUnit", + "description": "Returned offset and length values will correspond to UTF-16 code units. Use this option if your application is written in a language that support Unicode, for example Java, JavaScript." + } + ] + } + } + } + }, + "SentimentConfidenceScores": { + "type": "object", + "description": "Represents the confidence scores between 0 and 1 across all sentiment classes: positive, neutral, negative.", + "properties": { + "positive": { + "type": "number", + "format": "double", + "description": "Confidence score for positive sentiment" + }, + "neutral": { + "type": "number", + "format": "double", + "description": "Confidence score for neutral sentiment" + }, + "negative": { + "type": "number", + "format": "double", + "description": "Confidence score for negative sentiment" + } + }, + "required": [ + "positive", + "neutral", + "negative" + ] + }, + "SentimentDocumentResult": { + "type": "object", + "description": "An object representing the pre-built Sentiment Analysis results of each document.", + "properties": { + "id": { + "type": "string", + "description": "Unique, non-empty document identifier." + }, + "warnings": { + "type": "array", + "description": "Warnings encountered while processing document.", + "items": { + "$ref": "#/definitions/DocumentWarning" + }, + "x-ms-identifiers": [] + }, + "statistics": { + "$ref": "#/definitions/DocumentStatistics", + "description": "if showStats=true was specified in the request this field will contain information about the document payload." + }, + "sentiment": { + "$ref": "#/definitions/DocumentSentimentValue", + "description": "Predicted sentiment for document (Negative, Neutral, Positive, or Mixed)." + }, + "confidenceScores": { + "$ref": "#/definitions/SentimentConfidenceScores", + "description": "The sentiment confidence score between 0 and 1 for the sentence for all classes." + }, + "sentences": { + "type": "array", + "description": "The document's sentences sentiment.", + "items": { + "$ref": "#/definitions/SentenceSentiment" + }, + "x-ms-identifiers": [] + } + }, + "required": [ + "id", + "warnings", + "sentiment", + "confidenceScores", + "sentences" + ] + }, + "SentimentLROResult": { + "type": "object", + "description": "Contains the Sentiment Analysis LRO results.", + "properties": { + "results": { + "$ref": "#/definitions/SentimentResponse", + "description": "The sentiment analysis results" + } + }, + "required": [ + "results" + ], + "allOf": [ + { + "$ref": "#/definitions/AnalyzeTextLROResult" + } + ], + "x-ms-discriminator-value": "SentimentAnalysisLROResults" + }, + "SentimentResponse": { + "type": "object", + "description": "Sentiment analysis results for the input documents.", + "properties": { + "errors": { + "type": "array", + "description": "Errors by document id.", + "items": { + "$ref": "#/definitions/DocumentError" + } + }, + "statistics": { + "$ref": "#/definitions/RequestStatistics", + "description": "if showStats=true was specified in the request this field will contain information about the request payload." + }, + "modelVersion": { + "type": "string", + "description": "This field indicates which model is used for scoring." + }, + "documents": { + "type": "array", + "description": "The sentiment analysis results for each document in the input.", + "items": { + "$ref": "#/definitions/SentimentDocumentResult" + } + } + }, + "required": [ + "errors", + "modelVersion", + "documents" + ] + }, + "SentimentTaskResult": { + "type": "object", + "description": "Contains the analyze text SentimentAnalysis LRO task result.", + "properties": { + "results": { + "$ref": "#/definitions/SentimentResponse", + "description": "The sentiment analysis results" + } + }, + "required": [ + "results" + ], + "allOf": [ + { + "$ref": "#/definitions/AnalyzeTextTaskResult" + } + ], + "x-ms-discriminator-value": "SentimentAnalysisResults" + }, + "State": { + "type": "string", + "description": "The status of the task at the mentioned last update time.", + "enum": [ + "notStarted", + "running", + "succeeded", + "partiallyCompleted", + "failed", + "cancelled", + "cancelling" + ], + "x-ms-enum": { + "name": "State", + "modelAsString": true, + "values": [ + { + "name": "notStarted", + "value": "notStarted", + "description": "Not started status" + }, + { + "name": "running", + "value": "running", + "description": "Running status" + }, + { + "name": "succeeded", + "value": "succeeded", + "description": "Succeeded status" + }, + { + "name": "partiallyCompleted", + "value": "partiallyCompleted", + "description": "Partially completed status" + }, + { + "name": "failed", + "value": "failed", + "description": "Failed status" + }, + { + "name": "cancelled", + "value": "cancelled", + "description": "Cancelled status" + }, + { + "name": "cancelling", + "value": "cancelling", + "description": "Cancelling status" + } + ] + } + }, + "TargetConfidenceScoreLabel": { + "type": "object", + "description": "Represents the confidence scores across all sentiment classes: positive and negative.", + "properties": { + "positive": { + "type": "number", + "format": "double", + "description": "Confidence score for positive sentiment" + }, + "negative": { + "type": "number", + "format": "double", + "description": "Confidence score for negative sentiment" + } + }, + "required": [ + "positive", + "negative" + ] + }, + "TargetRelation": { + "type": "object", + "description": "Represents the relation between assessments and/or targets.", + "properties": { + "ref": { + "type": "string", + "description": "The JSON pointer indicating the linked object." + }, + "relationType": { + "$ref": "#/definitions/TargetRelationType", + "description": "The type related to the target." + } + }, + "required": [ + "ref", + "relationType" + ] + }, + "TargetRelationType": { + "type": "string", + "description": "The type related to the target.", + "enum": [ + "assessment", + "target" + ], + "x-ms-enum": { + "name": "TargetRelationType", + "modelAsString": false, + "values": [ + { + "name": "assessment", + "value": "assessment" + }, + { + "name": "target", + "value": "target" + } + ] + } + }, + "Tasks": { + "type": "object", + "description": "Container for the tasks status for the LRO job.", + "properties": { + "completed": { + "type": "integer", + "format": "int32", + "description": "Count of completed tasks." + }, + "failed": { + "type": "integer", + "format": "int32", + "description": "Count of failed tasks." + }, + "inProgress": { + "type": "integer", + "format": "int32", + "description": "Count of inprogress tasks." + }, + "total": { + "type": "integer", + "format": "int32", + "description": "Count of total tasks." + }, + "items": { + "type": "array", + "description": "Enumerable of Analyze text job results.", + "items": { + "$ref": "#/definitions/AnalyzeTextLROResult" + }, + "x-ms-identifiers": [] + } + }, + "required": [ + "completed", + "failed", + "inProgress", + "total" + ] + }, + "TokenSentimentValue": { + "type": "string", + "description": "The predicted Sentiment for the sentence.", + "enum": [ + "positive", + "mixed", + "negative" + ], + "x-ms-enum": { + "name": "TokenSentimentValue", + "modelAsString": false, + "values": [ + { + "name": "positive", + "value": "positive", + "description": "Positive sentiment" + }, + { + "name": "mixed", + "value": "mixed", + "description": "Mixed sentiment" + }, + { + "name": "negative", + "value": "negative", + "description": "Negative sentiment" + } + ] + } + }, + "WarningCodeValue": { + "type": "string", + "description": "Defines the list of the warning codes.", + "enum": [ + "LongWordsInDocument", + "DocumentTruncated" + ], + "x-ms-enum": { + "name": "WarningCodeValue", + "modelAsString": true, + "values": [ + { + "name": "LongWordsInDocument", + "value": "LongWordsInDocument", + "description": "Long words in document warning" + }, + { + "name": "DocumentTruncated", + "value": "DocumentTruncated", + "description": "Document truncated warning" + } + ] + } + }, + "healthcareEntityCategory": { + "type": "string", + "description": "Healthcare Entity Category.", + "enum": [ + "BodyStructure", + "Age", + "Gender", + "ExaminationName", + "Date", + "Direction", + "Frequency", + "MeasurementValue", + "MeasurementUnit", + "RelationalOperator", + "Time", + "GeneOrProtein", + "Variant", + "AdministrativeEvent", + "CareEnvironment", + "HealthcareProfession", + "Diagnosis", + "SymptomOrSign", + "ConditionQualifier", + "MedicationClass", + "MedicationName", + "Dosage", + "MedicationForm", + "MedicationRoute", + "FamilyRelation", + "TreatmentName" + ], + "x-ms-enum": { + "name": "healthcareEntityCategory", + "modelAsString": true, + "values": [ + { + "name": "BodyStructure", + "value": "BodyStructure", + "description": "Body structure" + }, + { + "name": "Age", + "value": "Age", + "description": "Age" + }, + { + "name": "Gender", + "value": "Gender", + "description": "Gender" + }, + { + "name": "ExaminationName", + "value": "ExaminationName", + "description": "Examination name" + }, + { + "name": "Date", + "value": "Date", + "description": "Date" + }, + { + "name": "Direction", + "value": "Direction", + "description": "Direction" + }, + { + "name": "Frequency", + "value": "Frequency", + "description": "Frequency" + }, + { + "name": "MeasurementValue", + "value": "MeasurementValue", + "description": "Measurement value" + }, + { + "name": "MeasurementUnit", + "value": "MeasurementUnit", + "description": "Measurement unit" + }, + { + "name": "RelationalOperator", + "value": "RelationalOperator", + "description": "Relational operator" + }, + { + "name": "Time", + "value": "Time", + "description": "Time" + }, + { + "name": "GeneOrProtein", + "value": "GeneOrProtein", + "description": "Gene or protein" + }, + { + "name": "Variant", + "value": "Variant", + "description": "Variant" + }, + { + "name": "AdministrativeEvent", + "value": "AdministrativeEvent", + "description": "Administrative event" + }, + { + "name": "CareEnvironment", + "value": "CareEnvironment", + "description": "Care environment" + }, + { + "name": "HealthcareProfession", + "value": "HealthcareProfession", + "description": "Healthcare profession" + }, + { + "name": "Diagnosis", + "value": "Diagnosis", + "description": "Diagnosis" + }, + { + "name": "SymptomOrSign", + "value": "SymptomOrSign", + "description": "Symptom or sign" + }, + { + "name": "ConditionQualifier", + "value": "ConditionQualifier", + "description": "Condition qualifier" + }, + { + "name": "MedicationClass", + "value": "MedicationClass", + "description": "Medication class" + }, + { + "name": "MedicationName", + "value": "MedicationName", + "description": "Medication name" + }, + { + "name": "Dosage", + "value": "Dosage", + "description": "Dosage" + }, + { + "name": "MedicationForm", + "value": "MedicationForm", + "description": "Medication form" + }, + { + "name": "MedicationRoute", + "value": "MedicationRoute", + "description": "Medication route" + }, + { + "name": "FamilyRelation", + "value": "FamilyRelation", + "description": "Family relation" + }, + { + "name": "TreatmentName", + "value": "TreatmentName", + "description": "Treatment name" + } + ] + } + }, + "relationType": { + "type": "string", + "description": "Type of relation. Examples include: `DosageOfMedication` or 'FrequencyOfMedication', etc.", + "enum": [ + "Abbreviation", + "DirectionOfBodyStructure", + "DirectionOfCondition", + "DirectionOfExamination", + "DirectionOfTreatment", + "DosageOfMedication", + "FormOfMedication", + "FrequencyOfMedication", + "FrequencyOfTreatment", + "QualifierOfCondition", + "RelationOfExamination", + "RouteOfMedication", + "TimeOfCondition", + "TimeOfEvent", + "TimeOfExamination", + "TimeOfMedication", + "TimeOfTreatment", + "UnitOfCondition", + "UnitOfExamination", + "ValueOfCondition", + "ValueOfExamination" + ], + "x-ms-enum": { + "name": "relationType", + "modelAsString": true, + "values": [ + { + "name": "Abbreviation", + "value": "Abbreviation", + "description": "Abbreviation" + }, + { + "name": "DirectionOfBodyStructure", + "value": "DirectionOfBodyStructure", + "description": "Direction of body structure" + }, + { + "name": "DirectionOfCondition", + "value": "DirectionOfCondition", + "description": "Direction of condition" + }, + { + "name": "DirectionOfExamination", + "value": "DirectionOfExamination", + "description": "Direction of examination" + }, + { + "name": "DirectionOfTreatment", + "value": "DirectionOfTreatment", + "description": "Direction of treatment" + }, + { + "name": "DosageOfMedication", + "value": "DosageOfMedication", + "description": "Dosage of medication" + }, + { + "name": "FormOfMedication", + "value": "FormOfMedication", + "description": "Form of medication" + }, + { + "name": "FrequencyOfMedication", + "value": "FrequencyOfMedication", + "description": "Frequency of medication" + }, + { + "name": "FrequencyOfTreatment", + "value": "FrequencyOfTreatment", + "description": "Frequency of treatment" + }, + { + "name": "QualifierOfCondition", + "value": "QualifierOfCondition", + "description": "Qualifier of condition" + }, + { + "name": "RelationOfExamination", + "value": "RelationOfExamination", + "description": "Relation of examination" + }, + { + "name": "RouteOfMedication", + "value": "RouteOfMedication", + "description": "Route of medication" + }, + { + "name": "TimeOfCondition", + "value": "TimeOfCondition", + "description": "Time of condition" + }, + { + "name": "TimeOfEvent", + "value": "TimeOfEvent", + "description": "Time of event" + }, + { + "name": "TimeOfExamination", + "value": "TimeOfExamination", + "description": "Time of examination" + }, + { + "name": "TimeOfMedication", + "value": "TimeOfMedication", + "description": "Time of medication" + }, + { + "name": "TimeOfTreatment", + "value": "TimeOfTreatment", + "description": "Time of treatment" + }, + { + "name": "UnitOfCondition", + "value": "UnitOfCondition", + "description": "Unit of condition" + }, + { + "name": "UnitOfExamination", + "value": "UnitOfExamination", + "description": "Unit of examination" + }, + { + "name": "ValueOfCondition", + "value": "ValueOfCondition", + "description": "Value of condition" + }, + { + "name": "ValueOfExamination", + "value": "ValueOfExamination", + "description": "Value of examination" + } + ] + } + } + }, + "parameters": { + "Azure.Core.Foundations.ApiVersionParameter": { + "name": "api-version", + "in": "query", + "description": "The API version to use for this operation.", "required": true, "type": "string", - "x-ms-parameter-location": "method" + "minLength": 1, + "x-ms-parameter-location": "method", + "x-ms-client-name": "apiVersion" } } } diff --git a/specification/cognitiveservices/data-plane/Language/stable/2022-05-01/examples/SuccessfulAnalyzeConversations.json b/specification/cognitiveservices/data-plane/Language/stable/2022-05-01/examples/SuccessfulAnalyzeConversations.json new file mode 100644 index 000000000000..9aa899d5320d --- /dev/null +++ b/specification/cognitiveservices/data-plane/Language/stable/2022-05-01/examples/SuccessfulAnalyzeConversations.json @@ -0,0 +1,63 @@ +{ + "operationId": "AnalyzeConversations", + "title": "SuccessfulAnalyzeConversations", + "parameters": { + "Endpoint": "{Endpoint}", + "Ocp-Apim-Subscription-Key": "{API key}", + "Content-Type": "application/json", + "api-version": "2022-05-01", + "body": { + "kind": "Conversation", + "analysisInput": { + "conversationItem": { + "id": "1", + "participantId": "1", + "text": "play In the air tonight from Phil Collins" + } + }, + "parameters": { + "projectName": "{project-name}", + "deploymentName": "{deployment-name}", + "stringIndexType": "TextElement_V8" + } + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "kind": "ConversationResult", + "result": { + "query": "play In the air tonight from Phil Collins", + "prediction": { + "topIntent": "PlayMusic", + "projectKind": "Conversation", + "intents": [ + { + "category": "PlayMusic", + "confidenceScore": 1 + }, + { + "category": "SearchCreativeWork", + "confidenceScore": 0 + }, + { + "category": "AddToPlaylist", + "confidenceScore": 0 + } + ], + "entities": [ + { + "category": "Media.Artist", + "text": "Phil Collins", + "offset": 29, + "length": 12, + "confidenceScore": 1 + } + ] + } + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Language/stable/2022-05-01/examples/SuccessfulAnalyzeConversationsArbitration.json b/specification/cognitiveservices/data-plane/Language/stable/2022-05-01/examples/SuccessfulAnalyzeConversationsArbitration.json new file mode 100644 index 000000000000..19f20be27a49 --- /dev/null +++ b/specification/cognitiveservices/data-plane/Language/stable/2022-05-01/examples/SuccessfulAnalyzeConversationsArbitration.json @@ -0,0 +1,76 @@ +{ + "operationId": "AnalyzeConversations", + "title": "SuccessfulAnalyzeConversationsArbitration", + "parameters": { + "Endpoint": "{Endpoint}", + "Ocp-Apim-Subscription-Key": "{API key}", + "Content-Type": "application/json", + "api-version": "2022-05-01", + "body": { + "kind": "Conversation", + "analysisInput": { + "conversationItem": { + "participantId": "1", + "id": "1", + "modality": "text", + "language": "en-GB", + "text": "How do I integrate QnA Maker and LUIS?" + } + }, + "parameters": { + "projectName": "{project-name}", + "deploymentName": "{deployment-name}", + "verbose": true, + "isLoggingEnabled": false, + "stringIndexType": "TextElement_V8" + } + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "kind": "ConversationResult", + "result": { + "query": "trains from London", + "prediction": { + "topIntent": "Rail", + "projectKind": "Orchestration", + "intents": { + "Rail": { + "confidenceScore": 1, + "targetProjectKind": "Conversation", + "result": { + "query": "trains from London", + "prediction": { + "topIntent": "Timetable", + "projectKind": "Conversation", + "intents": [ + { + "category": "Timetable", + "confidenceScore": 0.99968535 + }, + { + "category": "Locomotive", + "confidenceScore": 0.000314623 + } + ], + "entities": [] + } + } + }, + "Tree": { + "confidenceScore": 0.2641529, + "targetProjectKind": "QuestionAnswering" + }, + "None": { + "confidenceScore": 0, + "targetProjectKind": "NonLinked" + } + } + } + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Language/stable/2022-05-01/examples/SuccessfulAnalyzeConversationsArbitrationDirectTarget.json b/specification/cognitiveservices/data-plane/Language/stable/2022-05-01/examples/SuccessfulAnalyzeConversationsArbitrationDirectTarget.json new file mode 100644 index 000000000000..0d0f70f6b8bd --- /dev/null +++ b/specification/cognitiveservices/data-plane/Language/stable/2022-05-01/examples/SuccessfulAnalyzeConversationsArbitrationDirectTarget.json @@ -0,0 +1,77 @@ +{ + "operationId": "AnalyzeConversations", + "title": "SuccessfulAnalyzeConversationsArbitrationDirectTarget", + "parameters": { + "Endpoint": "{Endpoint}", + "Ocp-Apim-Subscription-Key": "{API key}", + "Content-Type": "application/json", + "api-version": "2022-05-01", + "body": { + "kind": "Conversation", + "analysisInput": { + "conversationItem": { + "text": "Ports and connectors", + "participantId": "1", + "id": "1" + } + }, + "parameters": { + "projectName": "prj1", + "deploymentName": "dep1", + "directTarget": "qnaProject", + "targetProjectParameters": { + "qnaProject": { + "targetProjectKind": "QuestionAnswering", + "callingOptions": { + "context": { + "previousUserQuery": "Meet Surface Pro 4", + "previousQnaId": 4 + }, + "top": 1, + "question": "App Service overview" + } + } + } + } + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "kind": "ConversationResult", + "result": { + "query": "App Service overview", + "prediction": { + "projectKind": "Orchestration", + "topIntent": "qnaTargetApp", + "intents": { + "qnaTargetApp": { + "targetProjectKind": "QuestionAnswering", + "confidenceScore": 1, + "result": { + "answers": [ + { + "questions": [ + "App Service overview" + ], + "answer": "The compute resources you use are determined by the *App Service plan* that you run your apps on.", + "confidenceScore": 0.7384000000000001, + "id": 1, + "source": "https://docs.microsoft.com/en-us/azure/app-service/overview", + "metadata": {}, + "dialog": { + "isContextOnly": false, + "prompts": [] + } + } + ] + } + } + } + } + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Language/stable/2022-05-01/examples/SuccessfulAnalyzeTextJobsCancelRequest.json b/specification/cognitiveservices/data-plane/Language/stable/2022-05-01/examples/SuccessfulAnalyzeTextJobsCancelRequest.json index 305dc1c4a152..69adf9388b3a 100644 --- a/specification/cognitiveservices/data-plane/Language/stable/2022-05-01/examples/SuccessfulAnalyzeTextJobsCancelRequest.json +++ b/specification/cognitiveservices/data-plane/Language/stable/2022-05-01/examples/SuccessfulAnalyzeTextJobsCancelRequest.json @@ -1,4 +1,6 @@ { + "operationId": "AnalyzeTextCancelJob", + "title": "SuccessfulAnalyzeTextJobsCancelRequest", "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", "api-version": "2022-05-01", diff --git a/specification/cognitiveservices/data-plane/Language/stable/2022-05-01/examples/SuccessfulAnalyzeTextJobsMultipleTaskStatusRequest.json b/specification/cognitiveservices/data-plane/Language/stable/2022-05-01/examples/SuccessfulAnalyzeTextJobsMultipleTaskStatusRequest.json index 666554f36257..ea5dc4f97527 100644 --- a/specification/cognitiveservices/data-plane/Language/stable/2022-05-01/examples/SuccessfulAnalyzeTextJobsMultipleTaskStatusRequest.json +++ b/specification/cognitiveservices/data-plane/Language/stable/2022-05-01/examples/SuccessfulAnalyzeTextJobsMultipleTaskStatusRequest.json @@ -1,4 +1,6 @@ { + "operationId": "AnalyzeTextJobStatus", + "title": "SuccessfulAnalyzeTextJobsMultipleTaskStatusRequest", "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", "api-version": "2022-05-01", diff --git a/specification/cognitiveservices/data-plane/Language/stable/2022-05-01/examples/SuccessfulAnalyzeTextJobsMultipleTaskSubmitRequest.json b/specification/cognitiveservices/data-plane/Language/stable/2022-05-01/examples/SuccessfulAnalyzeTextJobsMultipleTaskSubmitRequest.json index abe71f94bb2b..656d0a39d301 100644 --- a/specification/cognitiveservices/data-plane/Language/stable/2022-05-01/examples/SuccessfulAnalyzeTextJobsMultipleTaskSubmitRequest.json +++ b/specification/cognitiveservices/data-plane/Language/stable/2022-05-01/examples/SuccessfulAnalyzeTextJobsMultipleTaskSubmitRequest.json @@ -1,4 +1,6 @@ { + "operationId": "AnalyzeTextSubmitJob", + "title": "SuccessfulAnalyzeTextJobsMultipleTaskSubmitRequest", "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", "api-version": "2022-05-01", @@ -42,7 +44,7 @@ "responses": { "202": { "headers": { - "Operation-Location": "{endpoint}/language/analyze-text/jobs/{jobId}" + "Operation-Location": "{endpoint}/language/analyze-text/jobs/{jobId}?api-version=2022-05-01" } } } diff --git a/specification/cognitiveservices/data-plane/Language/stable/2022-05-01/examples/SuccessfulEntityLinkingRequest.json b/specification/cognitiveservices/data-plane/Language/stable/2022-05-01/examples/SuccessfulEntityLinkingRequest.json index d5df598b293d..265362cb48f2 100644 --- a/specification/cognitiveservices/data-plane/Language/stable/2022-05-01/examples/SuccessfulEntityLinkingRequest.json +++ b/specification/cognitiveservices/data-plane/Language/stable/2022-05-01/examples/SuccessfulEntityLinkingRequest.json @@ -1,4 +1,6 @@ { + "operationId": "AnalyzeText", + "title": "SuccessfulEntityLinkingRequest", "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", "api-version": "2022-05-01", diff --git a/specification/cognitiveservices/data-plane/Language/stable/2022-05-01/examples/SuccessfulEntityRecognitionRequest.json b/specification/cognitiveservices/data-plane/Language/stable/2022-05-01/examples/SuccessfulEntityRecognitionRequest.json index 9c147e0235f4..3814c7d842b1 100644 --- a/specification/cognitiveservices/data-plane/Language/stable/2022-05-01/examples/SuccessfulEntityRecognitionRequest.json +++ b/specification/cognitiveservices/data-plane/Language/stable/2022-05-01/examples/SuccessfulEntityRecognitionRequest.json @@ -1,4 +1,6 @@ { + "operationId": "AnalyzeText", + "title": "SuccessfulEntityRecognitionRequest", "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", "api-version": "2022-05-01", diff --git a/specification/cognitiveservices/data-plane/Language/stable/2022-05-01/examples/SuccessfulKeyPhraseExtractionRequest.json b/specification/cognitiveservices/data-plane/Language/stable/2022-05-01/examples/SuccessfulKeyPhraseExtractionRequest.json index 51f349ea396a..52db4fd214b9 100644 --- a/specification/cognitiveservices/data-plane/Language/stable/2022-05-01/examples/SuccessfulKeyPhraseExtractionRequest.json +++ b/specification/cognitiveservices/data-plane/Language/stable/2022-05-01/examples/SuccessfulKeyPhraseExtractionRequest.json @@ -1,4 +1,6 @@ { + "operationId": "AnalyzeText", + "title": "SuccessfulKeyPhraseExtractionRequest", "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", "api-version": "2022-05-01", @@ -63,7 +65,7 @@ } ], "errors": [], - "modelVersion": "2019-10-01" + "modelVersion": "2021-06-01" } } } diff --git a/specification/cognitiveservices/data-plane/Language/stable/2022-05-01/examples/SuccessfulLanguageDetectionRequest.json b/specification/cognitiveservices/data-plane/Language/stable/2022-05-01/examples/SuccessfulLanguageDetectionRequest.json index 530d4add09e1..bd9ebe6febfb 100644 --- a/specification/cognitiveservices/data-plane/Language/stable/2022-05-01/examples/SuccessfulLanguageDetectionRequest.json +++ b/specification/cognitiveservices/data-plane/Language/stable/2022-05-01/examples/SuccessfulLanguageDetectionRequest.json @@ -1,4 +1,6 @@ { + "operationId": "AnalyzeText", + "title": "SuccessfulLanguageDetectionRequest", "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", "api-version": "2022-05-01", @@ -21,6 +23,10 @@ { "id": "3", "text": "Hola mundo" + }, + { + "id": "4", + "text": "Tumhara naam kya hai?" } ] } @@ -59,10 +65,19 @@ }, "id": "3", "warnings": [] + }, + { + "detectedLanguage": { + "confidenceScore": 1, + "iso6391Name": "hi", + "name": "Hindi" + }, + "id": "4", + "warnings": [] } ], "errors": [], - "modelVersion": "2020-04-01" + "modelVersion": "2021-01-05" } } } diff --git a/specification/cognitiveservices/data-plane/Language/stable/2022-05-01/examples/SuccessfulPiiEntityRecognitionRequest.json b/specification/cognitiveservices/data-plane/Language/stable/2022-05-01/examples/SuccessfulPiiEntityRecognitionRequest.json index e6c01e0a4940..5845bce24cea 100644 --- a/specification/cognitiveservices/data-plane/Language/stable/2022-05-01/examples/SuccessfulPiiEntityRecognitionRequest.json +++ b/specification/cognitiveservices/data-plane/Language/stable/2022-05-01/examples/SuccessfulPiiEntityRecognitionRequest.json @@ -1,4 +1,6 @@ { + "operationId": "AnalyzeText", + "title": "SuccessfulPiiEntityRecognitionRequest", "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", "api-version": "2022-05-01", @@ -41,7 +43,7 @@ "redactedText": "My SSN is ***********", "entities": [ { - "category": "U.S. Social Security Number (SSN)", + "category": "USSocialSecurityNumber", "confidenceScore": 0.65, "length": 11, "offset": 28, @@ -55,7 +57,7 @@ "redactedText": "Your ABA number - ********* - is the first 9 digits in the lower left hand corner of your personal check.", "entities": [ { - "category": "ABA Routing Number", + "category": "ABARoutingNumber", "confidenceScore": 0.75, "length": 9, "offset": 18, @@ -69,7 +71,7 @@ "redactedText": "Is ************** your Brazilian CPF number?", "entities": [ { - "category": "Brazil CPF Number", + "category": "BRCPFNumber", "confidenceScore": 0.85, "length": 14, "offset": 3, @@ -80,7 +82,7 @@ } ], "errors": [], - "modelVersion": "2019-10-01" + "modelVersion": "2021-01-15" } } } diff --git a/specification/cognitiveservices/data-plane/Language/stable/2022-05-01/examples/SuccessfulSentimentAnalysisRequest.json b/specification/cognitiveservices/data-plane/Language/stable/2022-05-01/examples/SuccessfulSentimentAnalysisRequest.json index 9c0df829cdc9..fffc73a4fcc4 100644 --- a/specification/cognitiveservices/data-plane/Language/stable/2022-05-01/examples/SuccessfulSentimentAnalysisRequest.json +++ b/specification/cognitiveservices/data-plane/Language/stable/2022-05-01/examples/SuccessfulSentimentAnalysisRequest.json @@ -1,4 +1,6 @@ { + "operationId": "AnalyzeText", + "title": "SuccessfulSentimentAnalysisRequest", "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", "api-version": "2022-05-01", @@ -140,7 +142,7 @@ } ], "errors": [], - "modelVersion": "2020-04-01" + "modelVersion": "2021-10-01" } } } diff --git a/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/analyzeconversations.json b/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/analyzeconversations.json index bce20f237502..75e6fb46f69f 100644 --- a/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/analyzeconversations.json +++ b/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/analyzeconversations.json @@ -2,150 +2,147 @@ "swagger": "2.0", "info": { "title": "Microsoft Cognitive Language Service - Analyze Conversations", - "description": "The language service conversations API is a suite of natural language processing (NLP) skills that can be used to analyze structured conversations (textual or spoken). The synchronous API in this suite accepts a request and mediates among multiple language projects, such as LUIS Generally Available, Question Answering, Conversational Language Understanding, and then calls the best candidate service to handle the request. At last, it returns a response with the candidate service's response as a payload.\n\n In some cases, this API needs to forward requests and responses between the caller and an upstream service. The asynchronous APIs in this suite enable tasks like Conversation Summarization and Conversational PII detection.", - "version": "2023-04-01" - }, - "securityDefinitions": { - "AADToken": { - "type": "oauth2", - "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", - "flow": "implicit", - "description": "These are the [Azure Active Directory OAuth2](https://docs.microsoft.com/azure/active-directory/develop/v1-overview) Flows. When paired with [Azure role-based access](https://docs.microsoft.com/azure/role-based-access-control/overview) control it can be used to control access to Azure Maps REST APIs. Azure role-based access controls are used to designate access to one or more Azure Maps resource account or sub-resources. Any user, group, or service principal can be granted access via a built-in role or a custom role composed of one or more permissions to Azure Maps REST APIs.\n\nTo implement scenarios, we recommend viewing [authentication concepts](https://aka.ms/amauth). In summary, this security definition provides a solution for modeling application(s) via objects capable of access control on specific APIs and scopes.\n\n#### Notes\n* This security definition **requires** the use of the `x-ms-client-id` header to indicate which Azure Maps resource the application is requesting access to. This can be acquired from the [Maps management API](https://aka.ms/amauthdetails).\n* \nThe `Authorization URL` is specific to the Azure public cloud instance. Sovereign clouds have unique Authorization URLs and Azure Active directory configurations. \n* \nThe Azure role-based access control is configured from the [Azure management plane](https://aka.ms/amrbac) via Azure portal, PowerShell, CLI, Azure SDKs, or REST APIs.\n* \nUsage of the [Azure Maps Web SDK](https://aka.ms/amaadmc) allows for configuration based setup of an application for multiple use cases.\n* Currently, Azure Active Directory [v1.0 or v2.0](https://docs.microsoft.com/azure/active-directory/develop/azure-ad-endpoint-comparison) supports Work, School, and Guests but does not support Personal accounts.", - "scopes": { - "https://cognitiveservices.azure.com/.default": "https://cognitiveservices.azure.com/.default" + "version": "2023-04-01", + "description": "The language service conversations API is a suite of natural language processing (NLP) skills that can be used to analyze structured conversations (textual or spoken). The synchronous API in this suite accepts a request and mediates among multiple language projects, such as LUIS Generally Available, Question Answering, Conversational Language Understanding, and then calls the best candidate service to handle the request. At last, it returns a response with the candidate service's response as a payload.\\n\\n In some cases, this API needs to forward requests and responses between the caller and an upstream service. The asynchronous APIs in this suite enable tasks like Conversation Summarization and Conversational PII detection.", + "x-typespec-generated": [ + { + "emitter": "@azure-tools/typespec-autorest" } - }, - "apim_key": { - "type": "apiKey", - "description": "A subscription key for a Language service resource.", - "name": "Ocp-Apim-Subscription-Key", - "in": "header" - } + ] }, - "security": [ - { - "AADToken": [ - "https://cognitiveservices.azure.com/.default" - ] - }, - { - "apim_key": [] - } + "schemes": [ + "https" ], "x-ms-parameterized-host": { "hostTemplate": "{Endpoint}/language", "useSchemePrefix": false, "parameters": [ { - "$ref": "common.json#/parameters/Endpoint" + "name": "Endpoint", + "in": "path", + "description": "Supported Cognitive Services endpoint (e.g., https://.api.cognitiveservices.azure.com).", + "required": true, + "type": "string" } ] }, + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ], + "security": [ + { + "ApiKeyAuth": [] + } + ], + "securityDefinitions": { + "ApiKeyAuth": { + "type": "apiKey", + "name": "Ocp-Apim-Subscription-Key", + "in": "header" + } + }, + "tags": [], "paths": { "/:analyze-conversations": { "post": { - "operationId": "ConversationAnalysis_AnalyzeConversation", + "operationId": "AnalyzeConversations", "description": "Analyzes the input conversation utterance.", "parameters": [ { - "$ref": "common.json#/parameters/ApiVersionParameter" + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { - "description": "A single conversational task to execute.", - "in": "body", "name": "body", + "in": "body", + "required": true, "schema": { "$ref": "#/definitions/AnalyzeConversationTask" - }, - "required": true + } } ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], "responses": { "200": { - "description": "The conversation analysis response.", + "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/AnalyzeConversationTaskResult" } }, "default": { - "description": "Error response.", + "description": "An unexpected error response.", "schema": { - "$ref": "common.json#/definitions/ErrorResponse" + "$ref": "#/definitions/ErrorResponse" }, "headers": { "x-ms-error-code": { - "description": "The error code for specific error that occurred.", - "type": "string" + "type": "string", + "description": "String error code indicating what went wrong." } } } }, "x-ms-examples": { - "Conversation project result": { - "$ref": "./examples/conversations/SuccessfulAnalyzeConversations.json" + "SuccessfulAnalyzeConversations": { + "$ref": "./examples/SuccessfulAnalyzeConversations.json" }, - "Arbitration result": { - "$ref": "./examples/conversations/SuccessfulAnalyzeConversationsArbitration.json" + "SuccessfulAnalyzeConversationsArbitration": { + "$ref": "./examples/SuccessfulAnalyzeConversationsArbitration.json" }, - "Orchestrator direct target result": { - "$ref": "./examples/conversations/SuccessfulAnalyzeConversationsArbitrationDirectTarget.json" + "SuccessfulAnalyzeConversationsArbitrationDirectTarget": { + "$ref": "./examples/SuccessfulAnalyzeConversationsArbitrationDirectTarget.json" } } } }, "/analyze-conversations/jobs": { "post": { - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "description": "Submit a collection of conversations for analysis. Specify one or more unique tasks to be executed.", - "operationId": "AnalyzeConversation_SubmitJob", - "summary": "Submit analysis job for conversations", + "operationId": "AnalyzeConversationsSubmitJob", + "description": "Analyzes the input conversation utterance.", "parameters": [ { - "$ref": "common.json#/parameters/ApiVersionParameter" + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { - "description": "Collection of conversations to analyze and one or more tasks to execute.", - "in": "body", "name": "body", + "in": "body", + "required": true, "schema": { "$ref": "#/definitions/AnalyzeConversationJobsInput" - }, - "required": true + } } ], "responses": { "202": { - "description": "A successful call results in an Operation-Location header that's used to check the status of the analysis job.", + "description": "The request has been accepted for processing, but processing has not yet completed.", "headers": { "Operation-Location": { - "type": "string" + "type": "string", + "format": "uri", + "description": "The location for monitoring the operation state." } } }, "default": { - "description": "Error response.", + "description": "An unexpected error response.", "schema": { - "$ref": "common.json#/definitions/ErrorResponse" + "$ref": "#/definitions/ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } } } }, "x-ms-examples": { - "Successful Conversation Summarization Analysis Job Request": { - "$ref": "./examples/conversations/SuccessfulConversationSummarySubmit.json" + "SuccessfulConversationSummarizationTaskSubmit": { + "$ref": "./examples/SuccessfulConversationSummarizationTaskSubmit.json" }, - "Successful Conversation Summarization Task Submit": { - "$ref": "./examples/conversations/SuccessfulConversationSummarizationTaskSubmit.json" + "SuccessfulConversationSummarySubmit": { + "$ref": "./examples/SuccessfulConversationSummarySubmit.json" } }, "x-ms-long-running-operation": true @@ -153,82 +150,104 @@ }, "/analyze-conversations/jobs/{jobId}": { "get": { - "produces": [ - "application/json" - ], - "description": "Get the status of an analysis job. A job can consist of one or more tasks. After all tasks succeed, the job transitions to the succeeded state and results are available for each task.", - "operationId": "AnalyzeConversation_JobStatus", + "operationId": "AnalyzeConversationsJobStatus", "summary": "Get analysis status and results", + "description": "Get the status of an analysis job. A job can consist of one or more tasks. After all tasks succeed, the job transitions to the succeeded state and results are available for each task.", "parameters": [ { - "$ref": "common.json#/parameters/ApiVersionParameter" + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { - "$ref": "common.json#/parameters/JobId" + "name": "jobId", + "in": "path", + "description": "job ID", + "required": true, + "type": "string", + "format": "uuid" }, { - "$ref": "common.json#/parameters/ShowStats" + "name": "showStats", + "in": "query", + "description": "(Optional) if set to true, response will contain request and document level statistics.", + "required": false, + "type": "boolean" } ], "responses": { "200": { - "description": "Analysis job status and metadata.", + "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/AnalyzeConversationJobState" } }, "default": { - "description": "Error encountered.", + "description": "An unexpected error response.", "schema": { - "$ref": "common.json#/definitions/ErrorResponse" + "$ref": "#/definitions/ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } } } }, "x-ms-examples": { - "Successful Get Text Conversation Analysis Job Status Request": { - "$ref": "./examples/conversations/SuccessfulConversationSummarizationTaskStatusRequest.json" + "SuccessfulConversationSummarizationTaskResult": { + "$ref": "./examples/SuccessfulConversationSummarizationTaskResult.json" }, - "Successful Get Conversation Summarization Result": { - "$ref": "./examples/conversations/SuccessfulConversationSummarizationTaskResult.json" + "SuccessfulConversationSummarizationTaskStatusRequest": { + "$ref": "./examples/SuccessfulConversationSummarizationTaskStatusRequest.json" } } } }, "/analyze-conversations/jobs/{jobId}:cancel": { "post": { - "produces": [ - "application/json" - ], + "operationId": "AnalyzeConversationsCancelJob", + "summary": "Cancel a long-running Text Analysis conversations job.", "description": "Cancel a long-running job for text analysis of conversations.", - "operationId": "AnalyzeConversation_CancelJob", - "summary": "Cancel a long-running Text Analysis conversations job", "parameters": [ { - "$ref": "common.json#/parameters/ApiVersionParameter" + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { - "$ref": "common.json#/parameters/JobId" + "name": "jobId", + "in": "path", + "description": "The job ID to cancel.", + "required": true, + "type": "string", + "format": "uuid" } ], "responses": { "202": { - "description": "The request to cancel a job has been received.", + "description": "The request has been accepted for processing, but processing has not yet completed.", "headers": { "Operation-Location": { - "type": "string" + "type": "string", + "format": "uri", + "description": "The location for monitoring the operation state." } } }, "default": { - "description": "Unexpected error.", + "description": "An unexpected error response.", "schema": { - "$ref": "common.json#/definitions/ErrorResponse" + "$ref": "#/definitions/ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } } } }, "x-ms-examples": { - "Successful Job Delete Request": { - "$ref": "./examples/conversations/SuccessfulAnalyzeConversationsJobsCancelRequest.json" + "SuccessfulAnalyzeConversationsJobsCancelRequest": { + "$ref": "./examples/SuccessfulAnalyzeConversationsJobsCancelRequest.json" } }, "x-ms-long-running-operation": true @@ -236,1980 +255,3964 @@ } }, "definitions": { - "AnalyzeConversationTaskKind": { - "type": "string", - "description": "Enumeration of supported Conversation tasks.", - "enum": [ - "Conversation" + "AgeResolution": { + "type": "object", + "description": "Represents the Age entity resolution model.", + "properties": { + "value": { + "type": "number", + "format": "double", + "description": "The numeric value that the extracted text denotes." + }, + "unit": { + "$ref": "#/definitions/AgeUnit", + "description": "The Age Unit of measurement" + } + }, + "required": [ + "value", + "unit" ], - "x-ms-enum": { - "name": "AnalyzeConversationTaskKind", - "modelAsString": true - } + "allOf": [ + { + "$ref": "#/definitions/BaseResolution" + } + ], + "x-ms-discriminator-value": "AgeResolution" }, - "AnalyzeConversationTaskResultsKind": { + "AgeUnit": { "type": "string", - "description": "Enumeration of supported conversational task results", + "description": "The Age Unit of measurement", "enum": [ - "ConversationResult" + "Unspecified", + "Year", + "Month", + "Week", + "Day" ], "x-ms-enum": { - "name": "AnalyzeConversationTaskResultsKind", - "modelAsString": true + "name": "AgeUnit", + "modelAsString": true, + "values": [ + { + "name": "Unspecified", + "value": "Unspecified", + "description": "Unspecified age unit" + }, + { + "name": "Year", + "value": "Year", + "description": "Year age unit" + }, + { + "name": "Month", + "value": "Month", + "description": "Month age unit" + }, + { + "name": "Week", + "value": "Week", + "description": "Week age unit" + }, + { + "name": "Day", + "value": "Day", + "description": "Day age unit" + } + ] } }, - "AnalyzeConversationTask": { + "AnalysisParameters": { "type": "object", - "description": "The base class of a conversation input task.", - "discriminator": "kind", - "required": [ - "kind" - ], + "description": "This is the parameter set of either the Orchestration project itself or one of the target services.", "properties": { - "kind": { - "$ref": "#/definitions/AnalyzeConversationTaskKind" + "targetProjectKind": { + "$ref": "#/definitions/targetProjectKind", + "description": "The type of a target service" + }, + "apiVersion": { + "type": "string", + "description": "The API version to use when call a specific target service." } - } - }, - "AnalyzeConversationTaskResult": { - "type": "object", - "description": "The base class of a conversation task result.", - "discriminator": "kind", + }, + "discriminator": "targetProjectKind", "required": [ - "kind" - ], - "properties": { - "kind": { - "$ref": "#/definitions/AnalyzeConversationTaskResultsKind" - } - } + "targetProjectKind" + ] }, - "ConversationalTask": { + "AnalyzeConversationJobResult": { "type": "object", - "description": "The input for a custom conversation task.", - "allOf": [ - { - "$ref": "#/definitions/AnalyzeConversationTask" - } - ], + "description": "Container for results of all tasks in the conversation job.", "properties": { - "analysisInput": { - "$ref": "#/definitions/ConversationAnalysisOptions" + "lastUpdateDateTime": { + "type": "string", + "format": "date-time", + "description": "The last updated time in UTC for the task." }, - "parameters": { - "$ref": "#/definitions/ConversationTaskParameters" + "status": { + "$ref": "#/definitions/State", + "description": "The status of the task at the mentioned last update time." + }, + "taskName": { + "type": "string", + "description": "task name" + }, + "kind": { + "$ref": "#/definitions/AnalyzeConversationResultsKind", + "description": "discriminator kind" } }, - "x-ms-discriminator-value": "Conversation", + "discriminator": "kind", "required": [ - "analysisInput", - "parameters" + "lastUpdateDateTime", + "status", + "kind" ] }, - "ConversationTaskParameters": { + "AnalyzeConversationJobState": { "type": "object", - "description": "Input parameters necessary for a Conversation task.", + "description": "Contains the status of the submitted job for analyzing a conversation, along with related statistics.", "properties": { - "projectName": { + "displayName": { "type": "string", - "description": "The name of the project to use." + "description": "display name" }, - "deploymentName": { + "createdDateTime": { "type": "string", - "description": "The name of the deployment to use." + "format": "date-time", + "description": "Date and time job created" }, - "verbose": { - "type": "boolean", - "description": "If true, the service will return more detailed information in the response." + "expirationDateTime": { + "type": "string", + "format": "date-time", + "description": "Date and time job expires" }, - "isLoggingEnabled": { - "type": "boolean", - "description": "If true, the service will keep the query for further review." + "jobId": { + "$ref": "#/definitions/Azure.Core.uuid", + "description": "job ID", + "readOnly": true }, - "stringIndexType": { - "$ref": "common.json#/definitions/StringIndexType" + "lastUpdatedDateTime": { + "type": "string", + "format": "date-time", + "description": "last updated date and time" }, - "directTarget": { + "status": { + "$ref": "#/definitions/State", + "description": "status" + }, + "errors": { + "type": "array", + "description": "errors", + "items": { + "$ref": "#/definitions/Error" + }, + "x-ms-identifiers": [] + }, + "nextLink": { "type": "string", - "description": "The name of a target project to forward the request to." + "description": "next link" }, - "targetProjectParameters": { - "type": "object", - "description": "A dictionary representing the parameters for each target project.", - "additionalProperties": { - "$ref": "#/definitions/AnalysisParameters" - } + "tasks": { + "$ref": "#/definitions/Tasks", + "description": "Contains the state for the tasks that are being executed as part of the submitted job for analyzing a conversation." + }, + "statistics": { + "$ref": "#/definitions/ConversationRequestStatistics", + "description": "Contains the statistics for the submitted job." } }, "required": [ - "projectName", - "deploymentName" + "createdDateTime", + "jobId", + "lastUpdatedDateTime", + "status", + "tasks" ] }, - "ConversationalTaskResult": { - "description": "The results of a Conversation task.", - "allOf": [ - { - "$ref": "#/definitions/AnalyzeConversationTaskResult" - } - ], - "type": "object", - "properties": { - "result": { - "$ref": "#/definitions/AnalyzeConversationResult" - } - }, - "required": [ - "result" - ], - "x-ms-discriminator-value": "ConversationResult" - }, - "ConversationItemBase": { + "AnalyzeConversationJobsInput": { "type": "object", - "description": "The abstract base for a user input formatted conversation (e.g., Text, Transcript).", + "description": "It is a wrap up a Question Answering KB response.", "properties": { - "id": { - "description": "The ID of a conversation item.", - "type": "string" - }, - "participantId": { - "description": "The participant ID of a conversation item.", - "type": "string" - }, - "language": { - "description": "The override language of a conversation item in BCP 47 language representation.", - "type": "string" + "displayName": { + "type": "string", + "description": "Display name for the analysis job." }, - "modality": { - "$ref": "#/definitions/Modality" + "analysisInput": { + "$ref": "#/definitions/MultiLanguageConversationAnalysisInput", + "description": "Analysis Input", + "x-ms-mutability": [ + "read", + "create" + ] }, - "role": { - "type": "string", - "description": "Role of the participant.", - "enum": [ - "agent", - "customer", - "generic" - ], - "x-ms-enum": { - "name": "role", - "modelAsString": true - } + "tasks": { + "type": "array", + "description": "Set of tasks to execute on the input conversation.", + "items": { + "$ref": "#/definitions/AnalyzeConversationLROTask" + }, + "x-ms-identifiers": [] } }, "required": [ - "participantId", - "id" - ], - "additionalProperties": true + "analysisInput", + "tasks" + ] }, - "TextConversationItem": { + "AnalyzeConversationLROTask": { "type": "object", - "description": "The text modality of an input conversation.", - "allOf": [ - { - "$ref": "#/definitions/ConversationItemBase" - } - ], + "description": "Base class for a long-running conversation input task.", "properties": { - "text": { - "description": "The text input", - "type": "string" + "taskName": { + "type": "string", + "description": "task name" + }, + "kind": { + "$ref": "#/definitions/AnalyzeConversationLROTaskKind", + "description": "Enumeration of supported analysis tasks on a collection of conversations." } }, + "discriminator": "kind", "required": [ - "text" + "kind" ] }, - "ConversationAnalysisOptions": { - "type": "object", - "description": "The input ConversationItem and its optional parameters", - "required": [ - "conversationItem" + "AnalyzeConversationLROTaskKind": { + "type": "string", + "description": "Enumeration of supported analysis tasks on a collection of conversations.", + "enum": [ + "ConversationalSummarizationTask" ], - "properties": { - "conversationItem": { - "$ref": "#/definitions/ConversationItemBase" - } + "x-ms-enum": { + "name": "AnalyzeConversationLROTaskKind", + "modelAsString": true, + "values": [ + { + "name": "ConversationalSummarizationTask", + "value": "ConversationalSummarizationTask", + "description": "Conversational Summarization Task" + } + ] } }, - "AnalysisParameters": { + "AnalyzeConversationResult": { "type": "object", - "description": "This is the parameter set of either the Orchestration project itself or one of the target services.", - "required": [ - "targetProjectKind" - ], - "discriminator": "targetProjectKind", + "description": "Represents a conversation analysis response.", "properties": { - "targetProjectKind": { + "query": { "type": "string", - "description": "The type of a target service.", - "enum": [ - "Luis", - "Conversation", - "QuestionAnswering", - "NonLinked" - ], - "x-ms-enum": { - "name": "targetProjectKind", - "modelAsString": true - } + "description": "The conversation utterance given by the caller." }, - "apiVersion": { + "detectedLanguage": { "type": "string", - "description": "The API version to use when call a specific target service." + "description": "The system detected language for the query in BCP 47 language representation.." + }, + "prediction": { + "$ref": "#/definitions/BasePrediction", + "description": "The prediction result of a conversation project." } - } + }, + "required": [ + "query", + "prediction" + ] }, - "NoneLinkedTargetIntentResult": { - "type": "object", - "description": "A wrap up of non-linked intent response.", - "x-ms-discriminator-value": "NonLinked", - "allOf": [ - { - "$ref": "#/definitions/TargetIntentResult" - } + "AnalyzeConversationResultsKind": { + "type": "string", + "description": "Enumeration of results for supported conversation analysis Results.", + "enum": [ + "ConversationalSummarizationResults" ], - "properties": { - "result": { - "$ref": "#/definitions/ConversationResult", - "description": "The actual response from a Conversation project." - } + "x-ms-enum": { + "name": "AnalyzeConversationResultsKind", + "modelAsString": true, + "values": [ + { + "name": "ConversationalSummarizationResults", + "value": "ConversationalSummarizationResults", + "description": "Conversational Summarization Results" + } + ] } }, - "LuisParameters": { - "description": "This is a set of request parameters for LUIS Generally Available projects.", - "x-ms-discriminator-value": "Luis", + "AnalyzeConversationSummarizationResult": { "type": "object", + "description": "Result for the summarization task on the conversation.", + "properties": { + "results": { + "$ref": "#/definitions/SummaryResult", + "description": "results" + } + }, + "required": [ + "results" + ], "allOf": [ { - "$ref": "#/definitions/AnalysisParameters" + "$ref": "#/definitions/AnalyzeConversationJobResult" } ], - "properties": { - "query": { - "type": "string", - "maxLength": 500, - "description": "The utterance to predict." - }, - "callingOptions": { - "type": "object", - "description": "This customizes how the service calls LUIS Generally Available projects.", - "$ref": "#/definitions/LuisCallingOptions" - } - }, - "additionalProperties": true + "x-ms-discriminator-value": "ConversationalSummarizationResults" }, - "LuisCallingOptions": { - "description": "This customizes how the service calls LUIS Generally Available projects.", + "AnalyzeConversationSummarizationTask": { "type": "object", + "description": "Task definition for conversational summarization.", "properties": { - "verbose": { - "description": "Enable verbose response.", - "type": "boolean" - }, - "log": { - "description": "Save log to add in training utterances later.", - "type": "boolean" - }, - "show-all-intents": { - "description": "Set true to show all intents.", - "type": "boolean" - }, - "timezoneOffset": { - "type": "number", - "description": "The timezone offset for the location of the request." - }, - "spellCheck": { - "type": "boolean", - "description": "Enable spell checking." - }, - "bing-spell-check-subscription-key": { - "description": "The subscription key to use when enabling Bing spell check", - "type": "string" + "parameters": { + "$ref": "#/definitions/ConversationSummarizationTaskParameters", + "description": "parameters" } - } - }, - "ConversationParameters": { - "type": "object", - "description": "This is a set of request parameters for Customized Conversation projects.", - "x-ms-discriminator-value": "Conversation", + }, "allOf": [ { - "$ref": "#/definitions/AnalysisParameters" + "$ref": "#/definitions/AnalyzeConversationLROTask" } ], - "properties": { - "callingOptions": { - "type": "object", - "$ref": "#/definitions/ConversationCallingOptions" - } - } + "x-ms-discriminator-value": "ConversationalSummarizationTask" }, - "ConversationCallingOptions": { + "AnalyzeConversationTask": { "type": "object", - "description": "The option to set to call a Conversation project.", + "description": "The base class of a conversation input task.", "properties": { - "language": { - "description": "The language of the query in BCP 47 language representation..", - "type": "string" - }, - "verbose": { - "description": "If true, the service will return more detailed information.", - "type": "boolean" - }, - "isLoggingEnabled": { - "description": "If true, the query will be saved for customers to further review in authoring, to improve the model quality.", - "type": "boolean" + "kind": { + "$ref": "#/definitions/AnalyzeConversationTaskKind", + "description": "The base class of a conversation input task.", + "x-ms-mutability": [ + "read", + "create" + ] } + }, + "discriminator": "kind", + "required": [ + "kind" + ] + }, + "AnalyzeConversationTaskKind": { + "type": "string", + "description": "Enumeration of supported Conversation tasks.", + "enum": [ + "Conversation" + ], + "x-ms-enum": { + "name": "AnalyzeConversationTaskKind", + "modelAsString": true, + "values": [ + { + "name": "Conversation", + "value": "Conversation", + "description": "Conversation task kind" + } + ] } }, - "QuestionAnsweringParameters": { + "AnalyzeConversationTaskResult": { "type": "object", - "description": "This is a set of request parameters for Question Answering knowledge bases.", - "x-ms-discriminator-value": "QuestionAnswering", - "allOf": [ - { - "$ref": "#/definitions/AnalysisParameters" - } - ], + "description": "The base class of a conversation input task result.", "properties": { - "callingOptions": { - "description": "The options sent to a Question Answering KB.", - "$ref": "common.json#/definitions/AnswersOptions" + "kind": { + "$ref": "#/definitions/AnalyzeConversationTaskResultsKind", + "description": "The base class of a conversation input task result." } + }, + "discriminator": "kind", + "required": [ + "kind" + ] + }, + "AnalyzeConversationTaskResultsKind": { + "type": "string", + "description": "Enumeration of supported conversational task results.", + "enum": [ + "ConversationResult" + ], + "x-ms-enum": { + "name": "AnalyzeConversationTaskResultsKind", + "modelAsString": true, + "values": [ + { + "name": "ConversationResult", + "value": "ConversationResult", + "description": "Conversation result task kind" + } + ] } }, - "AnalyzeConversationResult": { + "AnswerSpan": { "type": "object", - "description": "Represents a conversation analysis response.", - "required": [ - "query", - "prediction" - ], + "description": "Answer span object of QnA.", "properties": { - "query": { + "text": { "type": "string", - "description": "The conversation utterance given by the caller." + "description": "Predicted text of answer span." }, - "detectedLanguage": { - "type": "string", - "description": "The system detected language for the query in BCP 47 language representation.." + "confidenceScore": { + "type": "number", + "format": "double", + "description": "Predicted score of answer span, value ranges from 0 to 1.", + "minimum": 0, + "maximum": 1 }, - "prediction": { - "description": "The prediction result of a conversation project.", - "$ref": "#/definitions/BasePrediction" + "offset": { + "type": "integer", + "format": "int32", + "description": "The answer span offset from the start of answer." + }, + "length": { + "type": "integer", + "format": "int32", + "description": "The length of the answer span." } } }, - "BasePrediction": { + "AnswersOptions": { "type": "object", - "description": "This is the base class of prediction", - "required": [ - "projectKind" - ], - "discriminator": "projectKind", + "description": "Parameters to query a knowledge base.", "properties": { - "projectKind": { + "qnaId": { + "type": "integer", + "format": "int32", + "description": "Exact QnA ID to fetch from the knowledge base, this field takes priority over question." + }, + "question": { "type": "string", - "description": "The type of the project.", - "enum": [ - "Conversation", - "Orchestration" - ], - "x-ms-enum": { - "name": "projectKind", - "modelAsString": true - } + "description": "User question to query against the knowledge base." }, - "topIntent": { + "top": { + "type": "integer", + "format": "int32", + "description": "Max number of answers to be returned for the question." + }, + "userId": { "type": "string", - "description": "The intent with the highest score." + "description": "Unique identifier for the user." + }, + "confidenceScoreThreshold": { + "type": "number", + "format": "double", + "description": "Minimum threshold score for answers, value ranges from 0 to 1.", + "minimum": 0, + "maximum": 1 + }, + "context": { + "$ref": "#/definitions/KnowledgeBaseAnswerContext", + "description": "Context object with previous QnA's information." + }, + "rankerType": { + "$ref": "#/definitions/RankerKind", + "description": "Type of ranker to be used." + }, + "filters": { + "$ref": "#/definitions/QueryFilters", + "description": "Filter QnAs based on given metadata list and knowledge base sources." + }, + "answerSpanRequest": { + "$ref": "#/definitions/ShortAnswerOptions", + "description": "To configure Answer span prediction feature." + }, + "includeUnstructuredSources": { + "type": "boolean", + "description": "(Optional) Flag to enable Query over Unstructured Sources." } } }, - "OrchestrationPrediction": { + "AnswersResult": { "type": "object", - "description": "This represents the prediction result of an Orchestration project.", - "x-ms-discriminator-value": "Orchestration", - "required": [ - "intents" - ], - "allOf": [ - { - "$ref": "#/definitions/BasePrediction" - } - ], + "description": "Represents List of Question Answers.", "properties": { - "intents": { - "description": "A dictionary that contains all intents. A key is an intent name and a value is its confidence score and target type. The top intent's value also contains the actual response from the target project.", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/TargetIntentResult" + "answers": { + "type": "array", + "description": "Represents Answer Result list.", + "items": { + "$ref": "#/definitions/KnowledgeBaseAnswer" } } } }, - "TargetIntentResult": { + "AreaResolution": { "type": "object", - "description": "This is the base class of an intent prediction", - "discriminator": "targetProjectKind", - "required": [ - "confidenceScore", - "targetProjectKind" - ], + "description": "Represents the area entity resolution model.", "properties": { - "targetProjectKind": { - "type": "string", - "description": "This discriminator property specifies the type of the target project that returns the response.", - "enum": [ - "Luis", - "Conversation", - "QuestionAnswering", - "NonLinked" - ], - "x-ms-enum": { - "name": "targetProjectKind", - "modelAsString": true - } - }, - "apiVersion": { - "type": "string", - "description": "The API version used to call a target service." - }, - "confidenceScore": { + "value": { "type": "number", "format": "double", - "x-ms-client-name": "confidence", - "description": "The prediction score and it ranges from 0.0 to 1.0.", - "minimum": 0, - "maximum": 1 + "description": "The numeric value that the extracted text denotes." + }, + "unit": { + "$ref": "#/definitions/AreaUnit", + "description": "The area Unit of measurement" } - } - }, - "ConversationTargetIntentResult": { - "type": "object", - "description": "A wrap up of Conversation project response.", - "x-ms-discriminator-value": "Conversation", + }, + "required": [ + "value", + "unit" + ], "allOf": [ { - "$ref": "#/definitions/TargetIntentResult" + "$ref": "#/definitions/BaseResolution" } ], - "properties": { - "result": { - "type": "object", - "$ref": "#/definitions/ConversationResult", - "description": "The actual response from a Conversation project." - } + "x-ms-discriminator-value": "AreaResolution" + }, + "AreaUnit": { + "type": "string", + "description": "The area unit of measurement.", + "enum": [ + "Unspecified", + "SquareKilometer", + "SquareHectometer", + "SquareDecameter", + "SquareDecimeter", + "SquareMeter", + "SquareCentimeter", + "SquareMillimeter", + "SquareInch", + "SquareFoot", + "SquareMile", + "SquareYard", + "Acre" + ], + "x-ms-enum": { + "name": "AreaUnit", + "modelAsString": true, + "values": [ + { + "name": "Unspecified", + "value": "Unspecified", + "description": "Unspecified area unit" + }, + { + "name": "SquareKilometer", + "value": "SquareKilometer", + "description": "Square kilometer area unit" + }, + { + "name": "SquareHectometer", + "value": "SquareHectometer", + "description": "Square hectometer area unit" + }, + { + "name": "SquareDecameter", + "value": "SquareDecameter", + "description": "Square decameter area unit" + }, + { + "name": "SquareDecimeter", + "value": "SquareDecimeter", + "description": "Square decimeter area unit" + }, + { + "name": "SquareMeter", + "value": "SquareMeter", + "description": "Square meter area unit" + }, + { + "name": "SquareCentimeter", + "value": "SquareCentimeter", + "description": "Square centimeter area unit" + }, + { + "name": "SquareMillimeter", + "value": "SquareMillimeter", + "description": "Square millimeter area unit" + }, + { + "name": "SquareInch", + "value": "SquareInch", + "description": "Square inch area unit" + }, + { + "name": "SquareFoot", + "value": "SquareFoot", + "description": "Square foot area unit" + }, + { + "name": "SquareMile", + "value": "SquareMile", + "description": "Square mile area unit" + }, + { + "name": "SquareYard", + "value": "SquareYard", + "description": "Square yard area unit" + }, + { + "name": "Acre", + "value": "Acre", + "description": "Acre area unit" + } + ] } }, - "ConversationResult": { + "Azure.Core.uuid": { + "type": "string", + "format": "uuid", + "description": "Universally Unique Identifier" + }, + "BaseExtraInformation": { "type": "object", - "description": "The response returned by a Conversation project.", + "description": "The abstract base object for entity extra information.", + "properties": { + "extraInformationKind": { + "$ref": "#/definitions/ExtraInformationKind", + "description": "The extra information object kind." + } + }, + "discriminator": "extraInformationKind", "required": [ - "query" - ], + "extraInformationKind" + ] + }, + "BasePrediction": { + "type": "object", + "description": "This is the base class of prediction", "properties": { - "query": { - "description": "The same query given in request.", - "type": "string" - }, - "detectedLanguage": { - "description": "The detected language from the query in BCP 47 language representation..", - "type": "string" + "projectKind": { + "$ref": "#/definitions/projectKind", + "description": "The type of the project." }, - "prediction": { - "description": "The predicted result for the query.", - "$ref": "#/definitions/ConversationPrediction" + "topIntent": { + "type": "string", + "description": "The intent with the highest score." } - } + }, + "discriminator": "projectKind", + "required": [ + "projectKind" + ] }, - "ConversationPrediction": { + "BaseResolution": { "type": "object", - "description": "Represents the prediction section of a Conversation project.", - "x-ms-discriminator-value": "Conversation", + "description": "The abstract base class for entity resolutions.", + "properties": { + "resolutionKind": { + "$ref": "#/definitions/ResolutionKind", + "description": "The entity resolution object kind." + } + }, + "discriminator": "resolutionKind", "required": [ - "intents", - "entities" + "resolutionKind" + ] + }, + "BooleanResolution": { + "type": "object", + "description": "A resolution for boolean expressions", + "properties": { + "value": { + "type": "boolean", + "description": "A resolution for boolean expressions" + } + }, + "required": [ + "value" ], "allOf": [ { - "$ref": "#/definitions/BasePrediction" + "$ref": "#/definitions/BaseResolution" } ], + "x-ms-discriminator-value": "BooleanResolution" + }, + "Conversation": { + "type": "object", + "description": "Complete ordered set of utterances (spoken or written) by one or more speakers to be used for analysis.", "properties": { - "intents": { - "description": "The intent classification results.", - "type": "array", - "items": { - "$ref": "#/definitions/ConversationIntent" - } + "id": { + "type": "string", + "description": "Unique identifier for the conversation." }, - "entities": { - "description": "The entity extraction results.", - "type": "array", - "items": { - "$ref": "#/definitions/ConversationEntity" - } + "language": { + "type": "string", + "description": "Language of the conversation item in BCP-47 format." + }, + "modality": { + "$ref": "#/definitions/InputModality", + "description": "modality" + }, + "domain": { + "$ref": "#/definitions/ConversationDomain", + "description": "domain" } - } + }, + "discriminator": "modality", + "required": [ + "id", + "language", + "modality" + ] }, - "ConversationIntent": { + "ConversationAnalysisOptions": { "type": "object", - "description": "The intent classification result of a Conversation project.", + "description": "The input ConversationItem and its optional parameters", + "properties": { + "conversationItem": { + "$ref": "#/definitions/TextConversationItem", + "description": "The abstract base for a user input formatted conversation (e.g., Text, Transcript)." + } + }, "required": [ - "category", - "confidenceScore" - ], + "conversationItem" + ] + }, + "ConversationCallingOptions": { + "type": "object", + "description": "The option to set to call a Conversation project.", "properties": { - "category": { - "description": "A predicted class.", - "type": "string" + "language": { + "type": "string", + "description": "The language of the query in BCP 47 language representation." }, - "confidenceScore": { - "format": "float", - "x-ms-client-name": "confidence", - "description": "The confidence score of the class from 0.0 to 1.0.", - "type": "number", - "minimum": 0, - "maximum": 1 + "verbose": { + "type": "boolean", + "description": "If true, the service will return more detailed information." + }, + "isLoggingEnabled": { + "type": "boolean", + "description": "If true, the query will be saved for customers to further review in authoring, to improve the model quality." } } }, + "ConversationDomain": { + "type": "string", + "description": "Enumeration of supported conversational domains.", + "enum": [ + "finance", + "healthcare", + "generic" + ], + "x-ms-enum": { + "name": "ConversationDomain", + "modelAsString": true, + "values": [ + { + "name": "finance", + "value": "finance", + "description": "Enumeration of supported conversational domains." + }, + { + "name": "healthcare", + "value": "healthcare", + "description": "Enumeration of supported conversational domains." + }, + { + "name": "generic", + "value": "generic", + "description": "Enumeration of supported conversational domains." + } + ] + } + }, "ConversationEntity": { "type": "object", "description": "The entity extraction result of a Conversation project.", - "required": [ - "category", - "text", - "offset", - "length", - "confidenceScore" - ], "properties": { "category": { - "description": "The entity category.", - "type": "string" + "type": "string", + "description": "The entity category." }, "text": { - "description": "The predicted entity text.", - "type": "string" + "type": "string", + "description": "The predicted entity text." }, "offset": { + "type": "integer", "format": "int32", - "description": "The starting index of this entity in the query.", - "type": "integer" + "description": "The starting index of this entity in the query." }, "length": { + "type": "integer", "format": "int32", - "description": "The length of the text.", - "type": "integer" + "description": "The length of the text." }, "confidenceScore": { + "type": "number", "format": "float", - "x-ms-client-name": "confidence", - "description": "The entity confidence score.", - "type": "number" + "description": "The entity confidence score." }, "resolutions": { - "description": "The collection of entity resolution objects.", "type": "array", + "description": "The collection of entity resolution objects.", "items": { "$ref": "#/definitions/BaseResolution" - } + }, + "x-ms-identifiers": [] }, "extraInformation": { - "description": "The collection of entity extra information objects.", "type": "array", + "description": "The collection of entity extra information objects.", "items": { "$ref": "#/definitions/BaseExtraInformation" - } - } - } - }, - "BaseResolution": { - "description": "The abstract base class for entity resolutions.", - "type": "object", - "discriminator": "resolutionKind", - "properties": { - "resolutionKind": { - "description": "The entity resolution object kind.", - "type": "string", - "enum": [ - "BooleanResolution", - "DateTimeResolution", - "NumberResolution", - "OrdinalResolution", - "SpeedResolution", - "WeightResolution", - "LengthResolution", - "VolumeResolution", - "AreaResolution", - "AgeResolution", - "InformationResolution", - "TemperatureResolution", - "CurrencyResolution", - "NumericRangeResolution", - "TemporalSpanResolution" - ], - "x-ms-enum": { - "name": "ResolutionKind", - "modelAsString": true - } + }, + "x-ms-identifiers": [] } }, "required": [ - "resolutionKind" + "category", + "text", + "offset", + "length", + "confidenceScore" ] }, - "QuantityResolution": { - "description": "Represents resolutions for quantities.", + "ConversationIntent": { "type": "object", + "description": "The intent classification result of a Conversation project.", "properties": { - "value": { + "category": { + "type": "string", + "description": "A predicted class." + }, + "confidenceScore": { "type": "number", - "format": "double", - "description": "The numeric value that the extracted text denotes." + "format": "float", + "description": "The confidence score of the class from 0.0 to 1.0.", + "minimum": 0, + "maximum": 1 } }, "required": [ - "value" + "category", + "confidenceScore" ] }, - "AgeResolution": { - "description": "Represents the Age entity resolution model.", - "allOf": [ - { - "$ref": "#/definitions/BaseResolution" + "ConversationItemLevelTiming": { + "type": "object", + "description": "Audio timing at the conversation item level.", + "properties": { + "offset": { + "type": "integer", + "format": "int64", + "description": "Offset from the start of speech audio, in ticks. 1 tick = 100 nanoseconds." }, - { - "$ref": "#/definitions/QuantityResolution" + "duration": { + "type": "integer", + "format": "int64", + "description": "Duration of word articulation, in ticks. 1 tick = 100 nanoseconds." } - ], + } + }, + "ConversationParameters": { "type": "object", - "x-ms-discriminator-value": "AgeResolution", + "description": "This is a set of request parameters for Customized Conversation projects.", "properties": { - "unit": { - "type": "string", - "enum": [ - "Unspecified", - "Year", - "Month", - "Week", - "Day" - ], - "x-ms-enum": { - "name": "AgeUnit", - "modelAsString": true - }, - "description": "The Age Unit of measurement" + "callingOptions": { + "$ref": "#/definitions/ConversationCallingOptions", + "description": "The option to set to call a Conversation project." } }, - "required": [ - "unit" - ] - }, - "VolumeResolution": { - "description": "Represents the volume entity resolution model.", "allOf": [ { - "$ref": "#/definitions/BaseResolution" - }, - { - "$ref": "#/definitions/QuantityResolution" + "$ref": "#/definitions/AnalysisParameters" } ], + "x-ms-discriminator-value": "Conversation" + }, + "ConversationPrediction": { "type": "object", - "x-ms-discriminator-value": "VolumeResolution", + "description": "Represents the prediction section of a Conversation project.", "properties": { - "unit": { - "type": "string", - "enum": [ - "Unspecified", - "CubicMeter", - "CubicCentimeter", - "CubicMillimeter", - "Hectoliter", - "Decaliter", - "Liter", - "Centiliter", - "Milliliter", - "CubicYard", - "CubicInch", - "CubicFoot", - "CubicMile", - "FluidOunce", - "Teaspoon", - "Tablespoon", - "Pint", - "Quart", - "Cup", - "Gill", - "Pinch", - "FluidDram", - "Barrel", - "Minim", - "Cord", - "Peck", - "Bushel", - "Hogshead" - ], - "x-ms-enum": { - "name": "VolumeUnit", - "modelAsString": true + "intents": { + "type": "array", + "description": "The intent classification results.", + "items": { + "$ref": "#/definitions/ConversationIntent" }, - "description": "The Volume Unit of measurement" + "x-ms-identifiers": [] + }, + "entities": { + "type": "array", + "description": "The entity extraction results.", + "items": { + "$ref": "#/definitions/ConversationEntity" + }, + "x-ms-identifiers": [] } }, "required": [ - "unit" - ] - }, - "SpeedResolution": { - "description": "Represents the speed entity resolution model.", + "intents", + "entities" + ], "allOf": [ { - "$ref": "#/definitions/BaseResolution" - }, - { - "$ref": "#/definitions/QuantityResolution" + "$ref": "#/definitions/BasePrediction" } ], + "x-ms-discriminator-value": "Conversation" + }, + "ConversationRequestStatistics": { "type": "object", - "x-ms-discriminator-value": "SpeedResolution", + "description": "if showStats=true was specified in the request, this field contains information about the request payload.", "properties": { - "unit": { - "type": "string", - "enum": [ - "Unspecified", - "MetersPerSecond", - "KilometersPerHour", - "KilometersPerMinute", - "KilometersPerSecond", - "MilesPerHour", - "Knot", - "FootPerSecond", - "FootPerMinute", - "YardsPerMinute", - "YardsPerSecond", - "MetersPerMillisecond", - "CentimetersPerMillisecond", - "KilometersPerMillisecond" - ], - "x-ms-enum": { - "name": "SpeedUnit", - "modelAsString": true - }, - "description": "The speed Unit of measurement" + "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." + }, + "conversationsCount": { + "type": "integer", + "format": "int32", + "description": "Number of conversations submitted in the request." + }, + "validConversationsCount": { + "type": "integer", + "format": "int32", + "description": "Number of conversation documents. This excludes documents that are empty, over the size limit, or in unsupported languages." + }, + "erroneousConversationsCount": { + "type": "integer", + "format": "int32", + "description": "Number of invalid documents. This includes documents that are empty, over the size limit, or in unsupported languages." } }, "required": [ - "unit" + "documentsCount", + "validDocumentsCount", + "erroneousDocumentsCount", + "transactionsCount", + "conversationsCount", + "validConversationsCount", + "erroneousConversationsCount" ] }, - "AreaResolution": { - "description": "Represents the area entity resolution model.", - "allOf": [ - { - "$ref": "#/definitions/BaseResolution" - }, - { - "$ref": "#/definitions/QuantityResolution" - } - ], + "ConversationResult": { "type": "object", - "x-ms-discriminator-value": "AreaResolution", + "description": "The response returned by a Conversation project.", "properties": { - "unit": { + "query": { "type": "string", - "enum": [ - "Unspecified", - "SquareKilometer", - "SquareHectometer", - "SquareDecameter", - "SquareDecimeter", - "SquareMeter", - "SquareCentimeter", - "SquareMillimeter", - "SquareInch", - "SquareFoot", - "SquareMile", - "SquareYard", - "Acre" - ], - "x-ms-enum": { - "name": "AreaUnit", - "modelAsString": true - }, - "description": "The area Unit of measurement" + "description": "The same query given in request." + }, + "detectedLanguage": { + "type": "string", + "description": "The detected language from the query in BCP 47 language representation." + }, + "prediction": { + "$ref": "#/definitions/ConversationPrediction", + "description": "The predicted result for the query." } }, "required": [ - "unit" + "query" ] }, - "LengthResolution": { - "description": "Represents the length entity resolution model.", - "allOf": [ - { - "$ref": "#/definitions/BaseResolution" - }, - { - "$ref": "#/definitions/QuantityResolution" - } - ], + "ConversationStatistics": { "type": "object", - "x-ms-discriminator-value": "LengthResolution", + "description": "If showStats=true was specified in the request, this field contains information about the conversation payload.", "properties": { - "unit": { - "type": "string", - "enum": [ - "Unspecified", - "Kilometer", - "Hectometer", - "Decameter", - "Meter", - "Decimeter", - "Centimeter", - "Millimeter", - "Micrometer", - "Nanometer", - "Picometer", - "Mile", - "Yard", - "Inch", - "Foot", - "LightYear", - "Pt" - ], - "x-ms-enum": { - "name": "LengthUnit", - "modelAsString": true - }, - "description": "The length Unit of measurement" + "transactionsCount": { + "type": "integer", + "format": "int32", + "description": "Number of text units for the request." } }, "required": [ - "unit" + "transactionsCount" ] }, - "InformationResolution": { - "description": "Represents the information (data) entity resolution model.", - "allOf": [ - { - "$ref": "#/definitions/BaseResolution" - }, - { - "$ref": "#/definitions/QuantityResolution" - } - ], + "ConversationSummarizationTaskParameters": { "type": "object", - "x-ms-discriminator-value": "InformationResolution", + "description": "Supported parameters for pre-build conversational summarization task.", "properties": { - "unit": { + "loggingOptOut": { + "type": "boolean", + "description": "logging opt out", + "default": false + }, + "modelVersion": { + "type": "string", + "description": "model version", + "default": "latest" + }, + "sentenceCount": { + "type": "integer", + "format": "int32", + "description": "It controls the approximate number of sentences in the output summaries." + }, + "stringIndexType": { "type": "string", + "description": "String index type", + "default": "TextElements_v8", "enum": [ - "Unspecified", - "Bit", - "Kilobit", - "Megabit", - "Gigabit", - "Terabit", - "Petabit", - "Byte", - "Kilobyte", - "Megabyte", - "Gigabyte", - "Terabyte", - "Petabyte" + "TextElements_v8", + "UnicodeCodePoint", + "Utf16CodeUnit" ], "x-ms-enum": { - "name": "InformationUnit", - "modelAsString": true - }, - "description": "The information (data) Unit of measurement." + "name": "StringIndexType", + "modelAsString": true, + "values": [ + { + "name": "TextElements_v8", + "value": "TextElements_v8", + "description": "Returned offset and length values will correspond to TextElements (Graphemes and Grapheme clusters) confirming to the Unicode 8.0.0 standard. Use this option if your application is written in .Net Framework or .Net Core and you will be using StringInfo." + }, + { + "name": "UnicodeCodePoint", + "value": "UnicodeCodePoint", + "description": "Returned offset and length values will correspond to Unicode code points. Use this option if your application is written in a language that support Unicode, for example Python." + }, + { + "name": "Utf16CodeUnit", + "value": "Utf16CodeUnit", + "description": "Returned offset and length values will correspond to UTF-16 code units. Use this option if your application is written in a language that support Unicode, for example Java, JavaScript." + } + ] + } + }, + "summaryAspects": { + "type": "array", + "description": "Array of Summary Aspects", + "items": { + "$ref": "#/definitions/SummaryAspect" + } } }, "required": [ - "unit" + "summaryAspects" ] }, - "TemperatureResolution": { - "description": "Represents the temperature entity resolution model.", - "allOf": [ - { - "$ref": "#/definitions/BaseResolution" - }, - { - "$ref": "#/definitions/QuantityResolution" - } - ], + "ConversationTargetIntentResult": { "type": "object", - "x-ms-discriminator-value": "TemperatureResolution", + "description": "A wrap up of Conversation project response.", "properties": { - "unit": { - "type": "string", - "enum": [ - "Unspecified", - "Fahrenheit", - "Kelvin", - "Rankine", - "Celsius" - ], - "x-ms-enum": { - "name": "TemperatureUnit", - "modelAsString": true - }, - "description": "The temperature Unit of measurement." + "result": { + "$ref": "#/definitions/ConversationResult", + "description": "The actual response from a Conversation project." } }, - "required": [ - "unit" - ] - }, - "WeightResolution": { - "description": "Represents the weight entity resolution model.", "allOf": [ { - "$ref": "#/definitions/BaseResolution" - }, - { - "$ref": "#/definitions/QuantityResolution" + "$ref": "#/definitions/TargetIntentResult" } ], + "x-ms-discriminator-value": "Conversation" + }, + "ConversationTaskParameters": { "type": "object", - "x-ms-discriminator-value": "WeightResolution", + "description": "Input parameters necessary for a Conversation task.", "properties": { - "unit": { + "projectName": { + "type": "string", + "description": "The name of the project to use." + }, + "deploymentName": { "type": "string", + "description": "The name of the deployment to use." + }, + "verbose": { + "type": "boolean", + "description": "If true, the service will return more detailed information in the response." + }, + "isLoggingEnabled": { + "type": "boolean", + "description": "If true, the service will keep the query for further review." + }, + "stringIndexType": { + "type": "string", + "description": "Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see https://aka.ms/text-analytics-offsets.", + "default": "TextElements_v8", "enum": [ - "Unspecified", - "Kilogram", - "Gram", - "Milligram", - "Gallon", - "MetricTon", - "Ton", - "Pound", - "Ounce", - "Grain", - "PennyWeight", - "LongTonBritish", - "ShortTonUS", - "ShortHundredWeightUS", - "Stone", - "Dram" + "TextElements_v8", + "UnicodeCodePoint", + "Utf16CodeUnit" ], "x-ms-enum": { - "name": "WeightUnit", - "modelAsString": true - }, - "description": "The weight Unit of measurement." + "name": "StringIndexType", + "modelAsString": true, + "values": [ + { + "name": "TextElements_v8", + "value": "TextElements_v8", + "description": "Returned offset and length values will correspond to TextElements (Graphemes and Grapheme clusters) confirming to the Unicode 8.0.0 standard. Use this option if your application is written in .Net Framework or .Net Core and you will be using StringInfo." + }, + { + "name": "UnicodeCodePoint", + "value": "UnicodeCodePoint", + "description": "Returned offset and length values will correspond to Unicode code points. Use this option if your application is written in a language that support Unicode, for example Python." + }, + { + "name": "Utf16CodeUnit", + "value": "Utf16CodeUnit", + "description": "Returned offset and length values will correspond to UTF-16 code units. Use this option if your application is written in a language that support Unicode, for example Java, JavaScript." + } + ] + } + }, + "directTarget": { + "type": "string", + "description": "The name of a target project to forward the request to." + }, + "targetProjectParameters": { + "type": "object", + "description": "A dictionary representing the parameters for each target project.", + "additionalProperties": { + "$ref": "#/definitions/AnalysisParameters" + } } }, "required": [ - "unit" + "projectName", + "deploymentName" ] }, - "CurrencyResolution": { - "description": "Represents the currency entity resolution model.", - "allOf": [ - { - "$ref": "#/definitions/BaseResolution" - }, - { - "$ref": "#/definitions/QuantityResolution" - } - ], + "ConversationalTask": { "type": "object", - "x-ms-discriminator-value": "CurrencyResolution", + "description": "The input for a custom conversation task.", "properties": { - "ISO4217": { - "type": "string", - "description": "The alphabetic code based on another ISO standard, ISO 3166, which lists the codes for country names. The first two letters of the ISO 4217 three-letter code are the same as the code for the country name, and, where possible, the third letter corresponds to the first letter of the currency name." - }, - "value": { - "type": "number", - "format": "double", - "description": "The money amount captured in the extracted entity" + "analysisInput": { + "$ref": "#/definitions/ConversationAnalysisOptions", + "description": "The input ConversationItem and its optional parameters" }, - "unit": { - "type": "string", - "description": "The unit of the amount captured in the extracted entity" + "parameters": { + "$ref": "#/definitions/ConversationTaskParameters", + "description": "Input parameters necessary for a Conversation task." } }, "required": [ - "value", - "unit" - ] - }, - "BooleanResolution": { - "description": "A resolution for boolean expressions", + "analysisInput", + "parameters" + ], "allOf": [ { - "$ref": "#/definitions/BaseResolution" + "$ref": "#/definitions/AnalyzeConversationTask" } ], + "x-ms-discriminator-value": "Conversation" + }, + "ConversationalTaskResult": { "type": "object", - "x-ms-discriminator-value": "BooleanResolution", + "description": "The results of a Conversation task.", "properties": { - "value": { - "type": "boolean" + "result": { + "$ref": "#/definitions/AnalyzeConversationResult", + "description": "Represents a conversation analysis response." } }, "required": [ - "value" - ] - }, - "DateTimeResolution": { - "description": "A resolution for datetime entity instances.", + "result" + ], "allOf": [ { - "$ref": "#/definitions/BaseResolution" + "$ref": "#/definitions/AnalyzeConversationTaskResult" } ], + "x-ms-discriminator-value": "ConversationResult" + }, + "ConversationsSummaryResult": { "type": "object", - "x-ms-discriminator-value": "DateTimeResolution", + "description": "Conversations Summary Result", "properties": { - "timex": { - "$ref": "#/definitions/TimeExpression" - }, - "dateTimeSubKind": { + "id": { "type": "string", - "enum": [ - "Time", - "Date", - "DateTime", - "Duration", - "Set" - ], - "x-ms-enum": { - "name": "DateTimeSubKind", - "modelAsString": true + "description": "Unique, non-empty conversation identifier." + }, + "warnings": { + "type": "array", + "description": "Warnings encountered in processing the document.", + "items": { + "$ref": "#/definitions/InputWarning" }, - "description": "The DateTime SubKind" + "x-ms-identifiers": [] }, - "value": { - "type": "string", - "description": "The actual time that the extracted text denote." + "statistics": { + "$ref": "#/definitions/ConversationStatistics", + "description": "If showStats=true was specified in the request this field will contain information about the conversation payload." }, - "modifier": { - "$ref": "#/definitions/TemporalModifier" + "summaries": { + "type": "array", + "description": "array of summaries", + "items": { + "$ref": "#/definitions/SummaryResultItem" + }, + "x-ms-identifiers": [] } }, "required": [ - "timex", - "dateTimeSubKind", - "value" + "id", + "warnings", + "summaries" ] }, - "NumberResolution": { - "description": "A resolution for numeric entity instances.", - "allOf": [ - { - "$ref": "#/definitions/BaseResolution" - } - ], + "CurrencyResolution": { "type": "object", - "x-ms-discriminator-value": "NumberResolution", + "description": "Represents the currency entity resolution model.", "properties": { - "numberKind": { + "ISO4217": { "type": "string", - "enum": [ - "Integer", - "Decimal", - "Power", - "Fraction", - "Percent", - "Unspecified" - ], - "x-ms-enum": { - "name": "NumberKind", - "modelAsString": true - }, - "description": "The type of the extracted number entity." + "description": "The alphabetic code based on another ISO standard, ISO 3166, which lists the codes for country names. The first two letters of the ISO 4217 three-letter code are the same as the code for the country name, and, where possible, the third letter corresponds to the first letter of the currency name.", + "x-ms-client-name": "iso4217" }, "value": { "type": "number", "format": "double", - "description": "A numeric representation of what the extracted text denotes." + "description": "The money amount captured in the extracted entity" + }, + "unit": { + "type": "string", + "description": "The unit of the amount captured in the extracted entity" } }, "required": [ - "numberKind", - "value" - ] - }, - "OrdinalResolution": { - "description": "A resolution for ordinal numbers entity instances.", + "value", + "unit" + ], "allOf": [ { "$ref": "#/definitions/BaseResolution" } ], + "x-ms-discriminator-value": "CurrencyResolution" + }, + "DateTimeResolution": { "type": "object", - "x-ms-discriminator-value": "OrdinalResolution", + "description": "A resolution for datetime entity instances.", "properties": { - "offset": { + "timex": { "type": "string", - "description": "The offset With respect to the reference (e.g., offset = -1 in \"show me the second to last\"" + "description": "An extended ISO 8601 date/time representation as described in (https://github.com/Microsoft/Recognizers-Text/blob/master/Patterns/English/English-DateTime.yaml)" }, - "relativeTo": { - "type": "string", - "enum": [ - "Current", - "End", - "Start" - ], - "x-ms-enum": { - "name": "RelativeTo", - "modelAsString": true - }, - "description": "The reference point that the ordinal number denotes." + "dateTimeSubKind": { + "$ref": "#/definitions/DateTimeSubKind", + "description": "The DateTime SubKind" }, "value": { "type": "string", - "description": "A simple arithmetic expression that the ordinal denotes." + "description": "The actual time that the extracted text denote." + }, + "modifier": { + "$ref": "#/definitions/TemporalModifier", + "description": "An optional modifier of a date/time instance." } }, "required": [ - "offset", - "relativeTo", + "timex", + "dateTimeSubKind", "value" - ] - }, - "TemporalSpanResolution": { - "description": "represents the resolution of a date and/or time span.", - "allOf": [ - { - "$ref": "#/definitions/BaseResolution" - } ], - "type": "object", - "x-ms-discriminator-value": "TemporalSpanResolution", - "properties": { - "begin": { - "$ref": "#/definitions/TimeExpression" - }, - "end": { - "$ref": "#/definitions/TimeExpression" - }, - "duration": { - "type": "string", - "description": "An optional duration value formatted based on the ISO 8601 (https://en.wikipedia.org/wiki/ISO_8601#Durations)" - }, - "modifier": { - "$ref": "#/definitions/TemporalModifier" - }, - "timex": { - "type": "string", - "description": "An optional triplet containing the beginning, the end, and the duration all stated as ISO 8601 formatted strings." - } - } - }, - "NumericRangeResolution": { - "description": "represents the resolution of numeric intervals.", "allOf": [ { "$ref": "#/definitions/BaseResolution" } ], - "type": "object", - "x-ms-discriminator-value": "NumericRangeResolution", - "properties": { - "rangeKind": { - "type": "string", - "enum": [ - "Number", - "Speed", - "Weight", - "Length", - "Volume", - "Area", - "Age", - "Information", - "Temperature", - "Currency" - ], - "x-ms-enum": { - "name": "RangeKind", - "modelAsString": true - }, - "description": "The kind of range that the resolution object represents." - }, - "minimum": { - "type": "number", - "format": "double", - "description": "The beginning value of the interval." - }, - "maximum": { - "type": "number", - "format": "double", - "description": "The ending value of the interval." - } - }, - "required": [ - "rangeKind", - "minimum", - "maximum" - ] + "x-ms-discriminator-value": "DateTimeResolution" }, - "TemporalModifier": { + "DateTimeSubKind": { "type": "string", - "description": "An optional modifier of a date/time instance.", + "description": "The Datetime SubKind.", "enum": [ - "AfterApprox", - "Before", - "BeforeStart", - "Approx", - "ReferenceUndefined", - "SinceEnd", - "AfterMid", - "Start", - "After", - "BeforeEnd", - "Until", - "End", - "Less", - "Since", - "AfterStart", - "BeforeApprox", - "Mid", - "More" + "Time", + "Date", + "DateTime", + "Duration", + "Set" ], "x-ms-enum": { - "name": "TemporalModifier", - "modelAsString": true + "name": "DateTimeSubKind", + "modelAsString": true, + "values": [ + { + "name": "Time", + "value": "Time", + "description": "Time subkind" + }, + { + "name": "Date", + "value": "Date", + "description": "Date subkind" + }, + { + "name": "DateTime", + "value": "DateTime", + "description": "DateTime subkind" + }, + { + "name": "Duration", + "value": "Duration", + "description": "Duration subkind" + }, + { + "name": "Set", + "value": "Set", + "description": "Set subkind" + } + ] } }, - "TimeExpression": { - "type": "string", - "description": "An extended ISO 8601 date/time representation as described in (https://github.com/Microsoft/Recognizers-Text/blob/master/Patterns/English/English-DateTime.yaml)" - }, - "BaseExtraInformation": { - "description": "The abstract base object for entity extra information.", + "DocumentError": { "type": "object", - "discriminator": "extraInformationKind", + "description": "Contains details of errors encountered during a job execution.", "properties": { - "extraInformationKind": { - "description": "The extra information object kind.", + "id": { "type": "string", - "enum": [ - "EntitySubtype", - "ListKey", - "RegexKey" - ], - "x-ms-enum": { - "name": "ExtraInformationKind", - "modelAsString": true - } + "description": "The ID of the input document." + }, + "error": { + "$ref": "#/definitions/Error", + "description": "Error encountered." } }, "required": [ - "extraInformationKind" + "id", + "error" ] }, "EntitySubtype": { - "description": "The concrete entity Subtype model of extra information.", - "allOf": [ - { - "$ref": "#/definitions/BaseExtraInformation" - } - ], "type": "object", - "x-ms-discriminator-value": "EntitySubtype", + "description": "The concrete entity Subtype model of extra information.", "properties": { "value": { "type": "string", "description": "The Subtype of an extracted entity type." } - } - }, - "ListKey": { - "description": "The list key extra data kind.", + }, "allOf": [ { "$ref": "#/definitions/BaseExtraInformation" } ], + "x-ms-discriminator-value": "EntitySubtype" + }, + "Error": { "type": "object", - "x-ms-discriminator-value": "ListKey", + "description": "The error object.", "properties": { - "key": { + "code": { + "$ref": "#/definitions/ErrorCode", + "description": "One of a server-defined set of error codes." + }, + "message": { "type": "string", - "description": "The canonical form of the extracted entity." - } - } - }, - "RegexKey": { - "description": "The regex key extra data kind.", - "allOf": [ - { - "$ref": "#/definitions/BaseExtraInformation" + "description": "A human-readable representation of the error." + }, + "target": { + "type": "string", + "description": "The target of the error." + }, + "details": { + "type": "array", + "description": "An array of details about specific errors that led to this reported error.", + "items": { + "$ref": "#/definitions/Error" + }, + "x-ms-identifiers": [] + }, + "innererror": { + "$ref": "#/definitions/InnerErrorModel", + "description": "An object containing more specific information than the current object about the error." } + }, + "required": [ + "code", + "message" + ] + }, + "ErrorCode": { + "type": "string", + "description": "Human-readable error code.", + "enum": [ + "InvalidRequest", + "InvalidArgument", + "Unauthorized", + "Forbidden", + "NotFound", + "ProjectNotFound", + "OperationNotFound", + "AzureCognitiveSearchNotFound", + "AzureCognitiveSearchIndexNotFound", + "TooManyRequests", + "AzureCognitiveSearchThrottling", + "AzureCognitiveSearchIndexLimitReached", + "InternalServerError", + "ServiceUnavailable", + "Timeout", + "QuotaExceeded", + "Conflict", + "Warning" ], - "type": "object", - "x-ms-discriminator-value": "RegexKey", - "properties": { - "key": { - "type": "string", - "description": "The key of the regex pattern used in extracting the entity." - }, - "regexPattern": { - "type": "string", - "description": "The .NET regex pattern used in extracting the entity. Please visit https://docs.microsoft.com/dotnet/standard/base-types/regular-expressions for more information about .NET regular expressions." - } + "x-ms-enum": { + "name": "ErrorCode", + "modelAsString": true, + "values": [ + { + "name": "InvalidRequest", + "value": "InvalidRequest", + "description": "Invalid request error" + }, + { + "name": "InvalidArgument", + "value": "InvalidArgument", + "description": "Invalid argument error" + }, + { + "name": "Unauthorized", + "value": "Unauthorized", + "description": "Unauthorized access error" + }, + { + "name": "Forbidden", + "value": "Forbidden", + "description": "Forbidden access error" + }, + { + "name": "NotFound", + "value": "NotFound", + "description": "Not found error" + }, + { + "name": "ProjectNotFound", + "value": "ProjectNotFound", + "description": "Project not found error" + }, + { + "name": "OperationNotFound", + "value": "OperationNotFound", + "description": "Operation not found error" + }, + { + "name": "AzureCognitiveSearchNotFound", + "value": "AzureCognitiveSearchNotFound", + "description": "Azure Cognitive Search not found error" + }, + { + "name": "AzureCognitiveSearchIndexNotFound", + "value": "AzureCognitiveSearchIndexNotFound", + "description": "Azure Cognitive Search index not found error" + }, + { + "name": "TooManyRequests", + "value": "TooManyRequests", + "description": "Too many requests error" + }, + { + "name": "AzureCognitiveSearchThrottling", + "value": "AzureCognitiveSearchThrottling", + "description": "Azure Cognitive Search throttling error" + }, + { + "name": "AzureCognitiveSearchIndexLimitReached", + "value": "AzureCognitiveSearchIndexLimitReached", + "description": "Azure Cognitive Search index limit reached error" + }, + { + "name": "InternalServerError", + "value": "InternalServerError", + "description": "Internal server error" + }, + { + "name": "ServiceUnavailable", + "value": "ServiceUnavailable", + "description": "Service unavailable error" + }, + { + "name": "Timeout", + "value": "Timeout", + "description": "Timeout error" + }, + { + "name": "QuotaExceeded", + "value": "QuotaExceeded", + "description": "Quota exceeded error" + }, + { + "name": "Conflict", + "value": "Conflict", + "description": "Conflict error" + }, + { + "name": "Warning", + "value": "Warning", + "description": "Warning error" + } + ] } }, - "LuisTargetIntentResult": { + "ErrorResponse": { "type": "object", - "description": "It is a wrap up of LUIS Generally Available response.", - "x-ms-discriminator-value": "Luis", - "allOf": [ - { - "$ref": "#/definitions/TargetIntentResult" - } - ], + "description": "Error response.", "properties": { - "result": { - "type": "object", - "description": "The actual response from a LUIS Generally Available application." + "error": { + "$ref": "#/definitions/Error", + "description": "The error object." } - } + }, + "required": [ + "error" + ] }, - "QuestionAnsweringTargetIntentResult": { - "type": "object", - "description": "It is a wrap up a Question Answering KB response.", - "x-ms-discriminator-value": "QuestionAnswering", - "allOf": [ - { - "$ref": "#/definitions/TargetIntentResult" - } + "ExtraInformationKind": { + "type": "string", + "description": "The extra information object kind.", + "enum": [ + "EntitySubtype", + "ListKey", + "RegexKey" ], - "properties": { - "result": { - "description": "The generated answer by a Question Answering KB.", - "$ref": "common.json#/definitions/AnswersResult" - } + "x-ms-enum": { + "name": "ExtraInformationKind", + "modelAsString": true, + "values": [ + { + "name": "EntitySubtype", + "value": "EntitySubtype", + "description": "Entity subtype extra information kind" + }, + { + "name": "ListKey", + "value": "ListKey", + "description": "List key extra information kind" + }, + { + "name": "RegexKey", + "value": "RegexKey", + "description": "Regex key extra information kind" + } + ] } }, - "AnalyzeConversationJobsInput": { + "InformationResolution": { "type": "object", + "description": "Represents the information (data) entity resolution model.", "properties": { - "displayName": { - "description": "Display name for the analysis job.", - "type": "string" - }, - "analysisInput": { - "$ref": "#/definitions/MultiLanguageConversationAnalysisInput" + "value": { + "type": "number", + "format": "double", + "description": "The numeric value that the extracted text denotes." }, - "tasks": { - "description": "Set of tasks to execute on the input conversation.", - "type": "array", - "items": { - "$ref": "#/definitions/AnalyzeConversationLROTask" - } + "unit": { + "$ref": "#/definitions/InformationUnit", + "description": "The information (data) Unit of measurement." } }, "required": [ - "analysisInput", - "tasks" - ] - }, - "AnalyzeConversationLROTask": { - "type": "object", - "description": "Base class for a long-running conversation input task.", - "discriminator": "kind", - "required": [ - "kind" + "value", + "unit" ], - "properties": { - "kind": { - "$ref": "#/definitions/AnalyzeConversationLROTaskKind" - } - }, "allOf": [ { - "$ref": "common.json#/definitions/TaskIdentifier" + "$ref": "#/definitions/BaseResolution" } - ] + ], + "x-ms-discriminator-value": "InformationResolution" }, - "AnalyzeConversationLROTaskKind": { + "InformationUnit": { "type": "string", - "description": "Enumeration of supported analysis tasks on a collection of conversations.", + "description": "The information (data) Unit of measurement.", "enum": [ - "ConversationalSummarizationTask" + "Unspecified", + "Bit", + "Kilobit", + "Megabit", + "Gigabit", + "Terabit", + "Petabit", + "Byte", + "Kilobyte", + "Megabyte", + "Gigabyte", + "Terabyte", + "Petabyte" ], "x-ms-enum": { - "name": "AnalyzeConversationLROTaskKind", - "modelAsString": true + "name": "InformationUnit", + "modelAsString": true, + "values": [ + { + "name": "Unspecified", + "value": "Unspecified", + "description": "Unspecified information unit" + }, + { + "name": "Bit", + "value": "Bit", + "description": "Bit information unit" + }, + { + "name": "Kilobit", + "value": "Kilobit", + "description": "Kilobit information unit" + }, + { + "name": "Megabit", + "value": "Megabit", + "description": "Megabit information unit" + }, + { + "name": "Gigabit", + "value": "Gigabit", + "description": "Gigabit information unit" + }, + { + "name": "Terabit", + "value": "Terabit", + "description": "Terabit information unit" + }, + { + "name": "Petabit", + "value": "Petabit", + "description": "Petabit information unit" + }, + { + "name": "Byte", + "value": "Byte", + "description": "Byte information unit" + }, + { + "name": "Kilobyte", + "value": "Kilobyte", + "description": "Kilobyte information unit" + }, + { + "name": "Megabyte", + "value": "Megabyte", + "description": "Megabyte information unit" + }, + { + "name": "Gigabyte", + "value": "Gigabyte", + "description": "Gigabyte information unit" + }, + { + "name": "Terabyte", + "value": "Terabyte", + "description": "Terabyte information unit" + }, + { + "name": "Petabyte", + "value": "Petabyte", + "description": "Petabyte information unit" + } + ] } }, - "AnalyzeConversationResultsKind": { + "InnerErrorCode": { "type": "string", - "description": "Enumeration of results for supported conversation analysis tasks.", + "description": "Human-readable error code.", "enum": [ - "ConversationalSummarizationResults" + "InvalidRequest", + "InvalidParameterValue", + "KnowledgeBaseNotFound", + "AzureCognitiveSearchNotFound", + "AzureCognitiveSearchThrottling", + "ExtractionFailure", + "InvalidRequestBodyFormat", + "EmptyRequest", + "MissingInputDocuments", + "InvalidDocument", + "ModelVersionIncorrect", + "InvalidDocumentBatch", + "UnsupportedLanguageCode", + "InvalidCountryHint" ], "x-ms-enum": { - "name": "AnalyzeConversationResultsKind", - "modelAsString": true + "name": "InnerErrorCode", + "modelAsString": true, + "values": [ + { + "name": "InvalidRequest", + "value": "InvalidRequest", + "description": "Invalid request error" + }, + { + "name": "InvalidParameterValue", + "value": "InvalidParameterValue", + "description": "Invalid parameter value error" + }, + { + "name": "KnowledgeBaseNotFound", + "value": "KnowledgeBaseNotFound", + "description": "Knowledge base not found error" + }, + { + "name": "AzureCognitiveSearchNotFound", + "value": "AzureCognitiveSearchNotFound", + "description": "Azure Cognitive Search not found error" + }, + { + "name": "AzureCognitiveSearchThrottling", + "value": "AzureCognitiveSearchThrottling", + "description": "Azure Cognitive Search throttling error" + }, + { + "name": "ExtractionFailure", + "value": "ExtractionFailure", + "description": "Extraction failure error" + }, + { + "name": "InvalidRequestBodyFormat", + "value": "InvalidRequestBodyFormat", + "description": "Invalid request body format error" + }, + { + "name": "EmptyRequest", + "value": "EmptyRequest", + "description": "Empty request error" + }, + { + "name": "MissingInputDocuments", + "value": "MissingInputDocuments", + "description": "Missing input documents error" + }, + { + "name": "InvalidDocument", + "value": "InvalidDocument", + "description": "Invalid document error" + }, + { + "name": "ModelVersionIncorrect", + "value": "ModelVersionIncorrect", + "description": "Model version incorrect error" + }, + { + "name": "InvalidDocumentBatch", + "value": "InvalidDocumentBatch", + "description": "Invalid document batch error" + }, + { + "name": "UnsupportedLanguageCode", + "value": "UnsupportedLanguageCode", + "description": "Unsupported language code error" + }, + { + "name": "InvalidCountryHint", + "value": "InvalidCountryHint", + "description": "Invalid country hint error" + } + ] } }, - "AnalyzeConversationJobState": { - "description": "Contains the status of the submitted job for analyzing a conversation, along with related statistics.", - "allOf": [ - { - "$ref": "common.json#/definitions/JobState" + "InnerErrorModel": { + "type": "object", + "description": "An object containing more specific information about the error. As per Microsoft One API guidelines - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses.", + "properties": { + "code": { + "$ref": "#/definitions/InnerErrorCode", + "description": "One of a server-defined set of error codes." }, - { - "$ref": "#/definitions/ConversationTasksState" + "message": { + "type": "string", + "description": "Error message." }, - { - "$ref": "#/definitions/AnalyzeConversationJobStatistics" - } - ] - }, - "AnalyzeConversationJobStatistics": { - "description": "Contains the statistics for the submitted job.", - "properties": { - "statistics": { - "$ref": "#/definitions/ConversationRequestStatistics" - } - }, - "type": "object" - }, - "ConversationTasksState": { - "description": "Contains the state for the tasks that are being executed as part of the submitted job for analyzing a conversation.", - "properties": { - "tasks": { - "properties": { - "completed": { - "description": "Count of tasks that finished successfully.", - "type": "integer", - "format": "int32" - }, - "failed": { - "description": "Count of tasks that failed.", - "type": "integer", - "format": "int32" - }, - "inProgress": { - "description": "Count of tasks that are currently in progress.", - "type": "integer", - "format": "int32" - }, - "total": { - "description": "Total count of tasks submitted as part of the job.", - "type": "integer", - "format": "int32" - }, - "items": { - "description": "List of results from tasks (if available).", - "type": "array", - "items": { - "$ref": "#/definitions/AnalyzeConversationJobResult" - } - } - }, - "required": [ - "total", - "completed", - "failed", - "inProgress" - ], - "type": "object" + "details": { + "type": "object", + "description": "Error details.", + "additionalProperties": { + "type": "string" + } + }, + "target": { + "type": "string", + "description": "Error target." + }, + "innererror": { + "$ref": "#/definitions/InnerErrorModel", + "description": "An object containing more specific information than the current object about the error." } }, "required": [ - "tasks" + "code", + "message" + ] + }, + "InputModality": { + "type": "string", + "description": "Enumeration of supported conversational modalities.", + "enum": [ + "transcript", + "text" ], - "type": "object" + "x-ms-enum": { + "name": "InputModality", + "modelAsString": true, + "values": [ + { + "name": "transcript", + "value": "transcript", + "description": "Transcript input modality" + }, + { + "name": "text", + "value": "text", + "description": "Text input modality" + } + ] + } }, - "AnalyzeConversationJobResult": { + "InputWarning": { "type": "object", - "description": "Container for results of all tasks in the conversation job.", - "discriminator": "kind", + "description": "Contains details of warnings encountered during a job execution.", "properties": { - "kind": { - "$ref": "#/definitions/AnalyzeConversationResultsKind" - } - }, - "allOf": [ - { - "$ref": "common.json#/definitions/TaskState" + "code": { + "type": "string", + "description": "Warning code." }, - { - "$ref": "common.json#/definitions/TaskIdentifier" + "message": { + "type": "string", + "description": "Warning message." + }, + "targetRef": { + "type": "string", + "description": "A JSON pointer reference indicating the target object." } - ], + }, "required": [ - "kind" + "code", + "message" ] }, - "MultiLanguageConversationAnalysisInput": { + "ItemizedSummaryContext": { "type": "object", - "required": [ - "conversations" - ], - "properties": { - "conversations": { - "type": "array", - "items": { - "$ref": "#/definitions/Conversation" - } - } - } - }, - "Conversation": { - "type": "object", - "description": "Complete ordered set of utterances (spoken or written) by one or more speakers to be used for analysis.", - "discriminator": "modality", - "required": [ - "id", - "language", - "modality" - ], + "description": "Context of the summary with a conversation item ID.", "properties": { - "id": { - "description": "Unique identifier for the conversation.", - "type": "string" - }, - "language": { - "description": "Language of the conversation item in BCP-47 format.", - "type": "string" + "offset": { + "type": "integer", + "format": "int32", + "description": "Start position for the context. Use of different 'stringIndexType' values can affect the offset returned." }, - "modality": { - "$ref": "#/definitions/Modality" + "length": { + "type": "integer", + "format": "int32", + "description": "The length of the context. Use of different 'stringIndexType' values can affect the length returned." }, - "domain": { - "$ref": "#/definitions/ConversationDomain" + "conversationItemId": { + "type": "string", + "description": "Reference to the ID of ConversationItem." } - } - }, - "Modality": { - "type": "string", - "description": "Enumeration of supported conversational modalities.", - "enum": [ - "transcript", - "text" - ], - "x-ms-enum": { - "name": "InputModality", - "modelAsString": true - } - }, - "ConversationDomain": { - "type": "string", - "description": "Enumeration of supported conversational domains.", - "enum": [ - "finance", - "healthcare", - "generic" - ], - "x-ms-enum": { - "name": "ConversationDomain", - "modelAsString": true - } - }, - "TextConversation": { - "type": "object", - "x-ms-discriminator-value": "text", + }, "required": [ - "conversationItems" - ], - "allOf": [ - { - "$ref": "#/definitions/Conversation" - } - ], - "properties": { - "conversationItems": { - "description": "Ordered list of text conversation items in the conversation.", - "type": "array", - "items": { - "$ref": "#/definitions/TextConversationItem" - } - } - } + "offset", + "length", + "conversationItemId" + ] }, - "TranscriptConversation": { + "KnowledgeBaseAnswer": { "type": "object", - "x-ms-discriminator-value": "transcript", - "required": [ - "conversationItems" - ], - "allOf": [ - { - "$ref": "#/definitions/Conversation" - } - ], + "description": "Represents knowledge base answer.", "properties": { - "conversationItems": { - "description": "Ordered list of transcript conversation items in the conversation.", + "questions": { "type": "array", + "description": "List of questions associated with the answer.", "items": { - "$ref": "#/definitions/TranscriptConversationItem" + "type": "string" } - } - } - }, - "TranscriptConversationItem": { - "type": "object", - "description": "Additional properties for supporting transcript conversation.", - "required": [ - "text", - "lexical", - "itn", - "maskedItn" - ], - "allOf": [ - { - "$ref": "#/definitions/ConversationItemBase" - } - ], - "properties": { - "itn": { - "type": "string", - "description": "Inverse text normalization (ITN) representation of input. The inverse-text-normalized form is the recognized text from Microsoft's speech-to-text API, with phone numbers, numbers, abbreviations, and other transformations applied." - }, - "maskedItn": { - "type": "string", - "description": "Inverse-text-normalized format with profanity masking applied." - }, - "text": { - "type": "string", - "description": "Display form of the recognized text from the speech-to-text API, with punctuation and capitalization added." }, - "lexical": { + "answer": { "type": "string", - "description": "Lexical form of the recognized text from the speech-to-text API, with the actual words recognized." + "description": "Answer text." }, - "wordLevelTimings": { - "type": "array", - "description": "List of word-level audio timing information.", - "items": { - "$ref": "#/definitions/WordLevelTiming" - } + "confidenceScore": { + "type": "number", + "format": "double", + "description": "Answer confidence score, value ranges from 0 to 1.", + "minimum": 0, + "maximum": 1 }, - "conversationItemLevelTiming": { - "description": "Audio timing at the conversation item level. This still can help with AI quality if word-level audio timings are not available.", - "$ref": "#/definitions/ConversationItemLevelTiming" - } - } - }, - "RedactedTranscriptContent": { - "type": "object", - "description": "Transcript content response that the service generates, with all necessary personally identifiable information redacted.", - "properties": { - "itn": { - "type": "string", - "description": "Redacted output for input in inverse-text-normalized format." + "id": { + "type": "integer", + "format": "int32", + "description": "ID of the QnA result." }, - "maskedItn": { + "source": { "type": "string", - "description": "Redacted output for input in masked inverse-text-normalized format." + "description": "Source of QnA result." }, - "text": { - "type": "string", - "description": "Redacted output for input in text (Microsoft's speech-to-text 'display') format." + "metadata": { + "type": "object", + "description": "Metadata associated with the answer, useful to categorize or filter question answers.", + "additionalProperties": { + "type": "string" + } }, - "lexical": { - "type": "string", - "description": "Redacted output for input in lexical format." + "dialog": { + "$ref": "#/definitions/KnowledgeBaseAnswerDialog", + "description": "Dialog associated with Answer." }, - "audioTimings": { - "type": "array", - "description": "List of redacted audio segments.", - "items": { - "$ref": "#/definitions/AudioTiming" - } + "answerSpan": { + "$ref": "#/definitions/AnswerSpan", + "description": "Answer span object of QnA with respect to user's question." } } }, - "WordLevelTiming": { + "KnowledgeBaseAnswerContext": { "type": "object", - "description": "Word-level timing information that the speech-to-text API generates. The words in this object should have 1:1 correspondence with the lexical input to allow for audio redaction.", + "description": "Context object with previous QnA's information.", "properties": { - "word": { + "previousQnaId": { + "type": "integer", + "format": "int32", + "description": "Previous turn top answer result QnA ID." + }, + "previousUserQuery": { "type": "string", - "description": "Recognized word." + "description": "Previous user query." } }, - "allOf": [ - { - "$ref": "#/definitions/AudioTiming" - } + "required": [ + "previousQnaId" ] }, - "AudioTiming": { - "type": "object", - "description": "Audio timing information.", - "properties": { - "offset": { - "description": "Offset from the start of speech audio, in ticks. 1 tick = 100 nanoseconds.", - "type": "integer", - "format": "int64" - }, - "duration": { - "description": "Duration of word articulation, in ticks. 1 tick = 100 nanoseconds.", - "type": "integer", - "format": "int64" - } - } - }, - "ConversationResultBase": { + "KnowledgeBaseAnswerDialog": { "type": "object", - "description": "Shared attributes for all conversational task results.", - "required": [ - "id", - "warnings" - ], + "description": "Dialog associated with Answer.", "properties": { - "id": { - "type": "string", - "description": "Unique, non-empty conversation identifier." + "isContextOnly": { + "type": "boolean", + "description": "To mark if a prompt is relevant only with a previous question or not. If true, do not include this QnA as search result for queries without context; otherwise, if false, ignores context and includes this QnA in search result." }, - "warnings": { + "prompts": { "type": "array", - "description": "Warnings encountered in processing the document.", + "description": "List of prompts associated with the answer.", + "maxItems": 20, "items": { - "$ref": "common.json#/definitions/InputWarning" - } - }, - "statistics": { - "$ref": "#/definitions/ConversationStatistics" - } - } - }, - "ConversationStatistics": { - "type": "object", - "description": "If showStats=true was specified in the request, this field contains information about the conversation payload.", - "required": [ - "transactionsCount" - ], - "properties": { - "transactionsCount": { - "type": "integer", - "format": "int32", - "description": "Number of text units for the request." + "$ref": "#/definitions/KnowledgeBaseAnswerPrompt" + }, + "x-ms-identifiers": [] } } }, - "ConversationRequestStatistics": { + "KnowledgeBaseAnswerPrompt": { "type": "object", - "description": "if showStats=true was specified in the request, this field contains information about the request payload.", - "required": [ - "conversationsCount", - "validConversationsCount", - "erroneousConversationsCount" - ], + "description": "Prompt for an answer.", "properties": { - "conversationsCount": { + "displayOrder": { "type": "integer", "format": "int32", - "description": "Number of conversations submitted in the request." + "description": "Index of the prompt - used in ordering of the prompts." }, - "validConversationsCount": { + "qnaId": { "type": "integer", "format": "int32", - "description": "Number of conversation documents. This excludes documents that are empty, over the size limit, or in unsupported languages." + "description": "QnA ID corresponding to the prompt." }, - "erroneousConversationsCount": { - "type": "integer", - "format": "int32", - "description": "Number of invalid documents. This includes documents that are empty, over the size limit, or in unsupported languages." - } - }, - "allOf": [ - { - "$ref": "common.json#/definitions/RequestStatistics" - } - ] - }, - "ConversationItemLevelTiming": { - "type": "object", - "description": "Audio timing at the conversation item level.", - "allOf": [ - { - "$ref": "#/definitions/AudioTiming" + "displayText": { + "type": "string", + "description": "Text displayed to represent a follow up question prompt.", + "maxLength": 200 } - ] + } }, - "AnalyzeConversationSummarizationTask": { + "LengthResolution": { "type": "object", - "description": "Task definition for conversational summarization.", + "description": "Represents the length entity resolution model.", "properties": { - "parameters": { - "$ref": "#/definitions/ConversationSummarizationTaskParameters" + "value": { + "type": "number", + "format": "double", + "description": "The numeric value that the extracted text denotes." + }, + "unit": { + "$ref": "#/definitions/LengthUnit", + "description": "The length Unit of measurement" } }, + "required": [ + "value", + "unit" + ], "allOf": [ { - "$ref": "#/definitions/AnalyzeConversationLROTask" + "$ref": "#/definitions/BaseResolution" } ], - "x-ms-discriminator-value": "ConversationalSummarizationTask" + "x-ms-discriminator-value": "LengthResolution" }, - "ConversationSummarizationTaskParameters": { - "type": "object", - "description": "Supported parameters for a conversational summarization task.", - "required": [ - "summaryAspects" + "LengthUnit": { + "type": "string", + "description": "The length unit of measurement.", + "enum": [ + "Unspecified", + "Kilometer", + "Hectometer", + "Decameter", + "Meter", + "Decimeter", + "Centimeter", + "Millimeter", + "Micrometer", + "Nanometer", + "Picometer", + "Mile", + "Yard", + "Inch", + "Foot", + "LightYear", + "Pt" ], - "properties": { - "summaryAspects": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "issue", - "resolution", - "chapterTitle", - "narrative" - ], - "x-ms-enum": { - "name": "SummaryAspect", - "modelAsString": true, - "values": [ - { - "value": "issue", - "description": "Summary of issues in transcripts of web chats and service calls between customer-service agents and customers." - }, - { - "value": "resolution", - "description": "Summary of resolutions in transcripts of web chats and service calls between customer-service agents and customers." - }, - { - "value": "chapterTitle", - "description": "Chapter title of any conversation. It's usually one phrase or several phrases naturally combined. Long conversations tend to have more chapters. You can find the chapter boundary from the summary context." - }, - { - "value": "narrative", - "description": "Generic narrative summary of any conversation. It generally converts the conversational language into formal written language, compresses the text length, and keeps the salient information." - } - ] - } + "x-ms-enum": { + "name": "LengthUnit", + "modelAsString": true, + "values": [ + { + "name": "Unspecified", + "value": "Unspecified", + "description": "Unspecified length unit" + }, + { + "name": "Kilometer", + "value": "Kilometer", + "description": "Kilometer length unit" + }, + { + "name": "Hectometer", + "value": "Hectometer", + "description": "Hectometer length unit" + }, + { + "name": "Decameter", + "value": "Decameter", + "description": "Decameter length unit" + }, + { + "name": "Meter", + "value": "Meter", + "description": "Meter length unit" + }, + { + "name": "Decimeter", + "value": "Decimeter", + "description": "Decimeter length unit" + }, + { + "name": "Centimeter", + "value": "Centimeter", + "description": "Centimeter length unit" + }, + { + "name": "Millimeter", + "value": "Millimeter", + "description": "Millimeter length unit" + }, + { + "name": "Micrometer", + "value": "Micrometer", + "description": "Micrometer length unit" + }, + { + "name": "Nanometer", + "value": "Nanometer", + "description": "Nanometer length unit" + }, + { + "name": "Picometer", + "value": "Picometer", + "description": "Picometer length unit" + }, + { + "name": "Mile", + "value": "Mile", + "description": "Mile length unit" + }, + { + "name": "Yard", + "value": "Yard", + "description": "Yard length unit" + }, + { + "name": "Inch", + "value": "Inch", + "description": "Inch length unit" + }, + { + "name": "Foot", + "value": "Foot", + "description": "Foot length unit" + }, + { + "name": "LightYear", + "value": "LightYear", + "description": "Light year length unit" + }, + { + "name": "Pt", + "value": "Pt", + "description": "Point length unit" } + ] + } + }, + "ListKey": { + "type": "object", + "description": "The list key extra data kind.", + "properties": { + "key": { + "type": "string", + "description": "The canonical form of the extracted entity." } }, "allOf": [ { - "$ref": "common.json#/definitions/PreBuiltTaskParameters" + "$ref": "#/definitions/BaseExtraInformation" + } + ], + "x-ms-discriminator-value": "ListKey" + }, + "LuisCallingOptions": { + "type": "object", + "description": "This customizes how the service calls LUIS Generally Available projects.", + "properties": { + "verbose": { + "type": "boolean", + "description": "Enable verbose response." }, - { - "$ref": "common.json#/definitions/AbstractiveSummarizationTaskParametersBase" + "log": { + "type": "boolean", + "description": "Save log to add in training utterances later." + }, + "show-all-intents": { + "type": "boolean", + "description": "Set true to show all intents." + }, + "timezoneOffset": { + "type": "integer", + "format": "int32", + "description": "The timezone offset for the location of the request." + }, + "spellCheck": { + "type": "boolean", + "description": "Enable spell checking." + }, + "bing-spell-check-subscription-key": { + "type": "string", + "description": "The subscription key to use when enabling Bing spell check" } - ] + } }, - "AnalyzeConversationSummarizationResult": { + "LuisParameters": { "type": "object", - "description": "Result for the summarization task on the conversation.", + "description": "This is a set of request parameters for LUIS Generally Available projects.", "properties": { - "results": { - "$ref": "#/definitions/SummaryResult" + "query": { + "type": "string", + "description": "The utterance to predict.", + "maxLength": 500 + }, + "callingOptions": { + "$ref": "#/definitions/LuisCallingOptions", + "description": "This customizes how the service calls LUIS Generally Available projects." } }, "allOf": [ { - "$ref": "#/definitions/AnalyzeConversationJobResult" + "$ref": "#/definitions/AnalysisParameters" } ], - "required": [ - "results" - ], - "x-ms-discriminator-value": "ConversationalSummarizationResults" + "x-ms-discriminator-value": "Luis" }, - "SummaryResult": { + "LuisResult": { "type": "object", - "required": [ - "conversations" - ], + "description": "It is the response from a LUIS Generally Available application.", + "additionalProperties": {} + }, + "LuisTargetIntentResult": { + "type": "object", + "description": "It is a wrap up of LUIS Generally Available response.", "properties": { - "conversations": { - "type": "array", - "items": { - "$ref": "#/definitions/ConversationsSummaryResult" - } + "result": { + "$ref": "#/definitions/LuisResult", + "description": "The actual response from a LUIS Generally Available application." } }, "allOf": [ { - "$ref": "common.json#/definitions/PreBuiltResult" + "$ref": "#/definitions/TargetIntentResult" } - ] + ], + "x-ms-discriminator-value": "Luis" }, - "ConversationsSummaryResult": { + "MetadataFilter": { "type": "object", - "required": [ - "summaries" - ], + "description": "Find QnAs that are associated with the given list of metadata.", "properties": { - "summaries": { + "metadata": { "type": "array", + "description": "List of metadata.", "items": { - "$ref": "#/definitions/SummaryResultItem" + "$ref": "#/definitions/MetadataRecord" + }, + "x-ms-identifiers": [] + }, + "logicalOperation": { + "type": "string", + "description": "Operation used to join metadata filters.", + "default": "AND", + "enum": [ + "AND", + "OR" + ], + "x-ms-enum": { + "name": "LogicalOperationKind", + "modelAsString": true, + "values": [ + { + "name": "AND", + "value": "AND" + }, + { + "name": "OR", + "value": "OR" + } + ] } } - }, - "allOf": [ - { - "$ref": "#/definitions/ConversationResultBase" + } + }, + "MetadataRecord": { + "type": "object", + "description": "Object to provide the key value pair for each metadata.", + "properties": { + "key": { + "type": "string", + "description": "Metadata Key from Metadata dictionary used in the QnA." + }, + "value": { + "type": "string", + "description": "Metadata Value from Metadata dictionary used in the QnA." } + }, + "required": [ + "key", + "value" ] }, - "SummaryResultItem": { + "MultiLanguageConversationAnalysisInput": { "type": "object", + "description": "Multi Language Conversation Analysis Input", "properties": { - "aspect": { - "type": "string" - }, - "text": { - "type": "string" - }, - "contexts": { + "conversations": { "type": "array", - "description": "Context list of the summary.", + "description": "Array of conversation items", "items": { - "$ref": "#/definitions/ItemizedSummaryContext" + "$ref": "#/definitions/Conversation" } } }, "required": [ - "aspect", - "text" + "conversations" ] }, - "ItemizedSummaryContext": { + "NoneLinkedTargetIntentResult": { "type": "object", - "description": "Context of the summary with a conversation item ID.", - "required": [ - "conversationItemId" + "description": "A wrap up of non-linked intent response.", + "properties": { + "result": { + "$ref": "#/definitions/ConversationResult", + "description": "The actual response from a Conversation project." + } + }, + "allOf": [ + { + "$ref": "#/definitions/TargetIntentResult" + } + ], + "x-ms-discriminator-value": "NonLinked" + }, + "NumberKind": { + "type": "string", + "description": "The type of the extracted number entity.", + "enum": [ + "Integer", + "Decimal", + "Power", + "Fraction", + "Percent", + "Unspecified" ], + "x-ms-enum": { + "name": "NumberKind", + "modelAsString": true, + "values": [ + { + "name": "Integer", + "value": "Integer", + "description": "Integer number" + }, + { + "name": "Decimal", + "value": "Decimal", + "description": "Decimal number" + }, + { + "name": "Power", + "value": "Power", + "description": "Power number" + }, + { + "name": "Fraction", + "value": "Fraction", + "description": "Fraction number" + }, + { + "name": "Percent", + "value": "Percent", + "description": "Percent number" + }, + { + "name": "Unspecified", + "value": "Unspecified", + "description": "Unspecified number kind" + } + ] + } + }, + "NumberResolution": { + "type": "object", + "description": "A resolution for numeric entity instances.", "properties": { - "conversationItemId": { - "type": "string", - "description": "Reference to the ID of ConversationItem." + "numberKind": { + "$ref": "#/definitions/NumberKind", + "description": "The type of the extracted number entity." + }, + "value": { + "type": "number", + "format": "double", + "description": "A numeric representation of what the extracted text denotes." } }, + "required": [ + "numberKind", + "value" + ], "allOf": [ { - "$ref": "common.json#/definitions/SummaryContext" + "$ref": "#/definitions/BaseResolution" + } + ], + "x-ms-discriminator-value": "NumberResolution" + }, + "NumericRangeResolution": { + "type": "object", + "description": "represents the resolution of numeric intervals.", + "properties": { + "rangeKind": { + "$ref": "#/definitions/RangeKind", + "description": "The kind of range that the resolution object represents." + }, + "minimum": { + "type": "number", + "format": "double", + "description": "The beginning value of the interval." + }, + "maximum": { + "type": "number", + "format": "double", + "description": "The ending value of the interval." } - ] - } - }, - "parameters": { - "ConversationAnalysisOptions": { - "name": "ConversationAnalysisOptions", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/ConversationAnalysisOptions" }, - "description": "Post body of the request.", - "x-ms-parameter-location": "method" + "required": [ + "rangeKind", + "minimum", + "maximum" + ], + "allOf": [ + { + "$ref": "#/definitions/BaseResolution" + } + ], + "x-ms-discriminator-value": "NumericRangeResolution" + }, + "OrchestrationPrediction": { + "type": "object", + "description": "This represents the prediction result of an Orchestration project.", + "properties": { + "intents": { + "type": "object", + "description": "A dictionary that contains all intents. A key is an intent name and a value is its confidence score and target type. The top intent's value also contains the actual response from the target project.", + "additionalProperties": { + "$ref": "#/definitions/TargetIntentResult" + } + } + }, + "required": [ + "intents" + ], + "allOf": [ + { + "$ref": "#/definitions/BasePrediction" + } + ], + "x-ms-discriminator-value": "Orchestration" + }, + "OrdinalResolution": { + "type": "object", + "description": "A resolution for ordinal numbers entity instances.", + "properties": { + "offset": { + "type": "string", + "description": "The offset with respect to the reference (e.g., offset = -1 indicates the second to last)" + }, + "relativeTo": { + "$ref": "#/definitions/RelativeTo", + "description": "The reference point that the ordinal number denotes." + }, + "value": { + "type": "string", + "description": "A simple arithmetic expression that the ordinal denotes." + } + }, + "required": [ + "offset", + "relativeTo", + "value" + ], + "allOf": [ + { + "$ref": "#/definitions/BaseResolution" + } + ], + "x-ms-discriminator-value": "OrdinalResolution" + }, + "QueryFilters": { + "type": "object", + "description": "filters over knowledge base.", + "properties": { + "metadataFilter": { + "$ref": "#/definitions/MetadataFilter", + "description": "filters over knowledge base." + }, + "sourceFilter": { + "$ref": "#/definitions/SourceFilter", + "description": "filters over knowledge base." + }, + "logicalOperation": { + "type": "string", + "description": "Logical operation used to join metadata filter with source filter.", + "default": "AND", + "enum": [ + "AND", + "OR" + ], + "x-ms-enum": { + "name": "LogicalOperationKind", + "modelAsString": true, + "values": [ + { + "name": "AND", + "value": "AND" + }, + { + "name": "OR", + "value": "OR" + } + ] + } + } + } + }, + "QuestionAnsweringParameters": { + "type": "object", + "description": "This is a set of request parameters for Question Answering knowledge bases.", + "properties": { + "callingOptions": { + "$ref": "#/definitions/AnswersOptions", + "description": "The options sent to a Question Answering KB." + } + }, + "allOf": [ + { + "$ref": "#/definitions/AnalysisParameters" + } + ], + "x-ms-discriminator-value": "QuestionAnswering" + }, + "QuestionAnsweringTargetIntentResult": { + "type": "object", + "description": "It is a wrap up a Question Answering KB response.", + "properties": { + "result": { + "$ref": "#/definitions/AnswersResult", + "description": "The generated answer by a Question Answering KB." + } + }, + "allOf": [ + { + "$ref": "#/definitions/TargetIntentResult" + } + ], + "x-ms-discriminator-value": "QuestionAnswering" + }, + "RangeKind": { + "type": "string", + "description": "The kind of range that the resolution object represents.", + "enum": [ + "Number", + "Speed", + "Weight", + "Length", + "Volume", + "Area", + "Age", + "Information", + "Temperature", + "Currency" + ], + "x-ms-enum": { + "name": "RangeKind", + "modelAsString": true, + "values": [ + { + "name": "Number", + "value": "Number", + "description": "Number range" + }, + { + "name": "Speed", + "value": "Speed", + "description": "Speed range" + }, + { + "name": "Weight", + "value": "Weight", + "description": "Weight range" + }, + { + "name": "Length", + "value": "Length", + "description": "Length range" + }, + { + "name": "Volume", + "value": "Volume", + "description": "Volume range" + }, + { + "name": "Area", + "value": "Area", + "description": "Area range" + }, + { + "name": "Age", + "value": "Age", + "description": "Age range" + }, + { + "name": "Information", + "value": "Information", + "description": "Information range" + }, + { + "name": "Temperature", + "value": "Temperature", + "description": "Temperature range" + }, + { + "name": "Currency", + "value": "Currency", + "description": "Currency range" + } + ] + } + }, + "RankerKind": { + "type": "string", + "description": "Type of ranker to be used", + "enum": [ + "Default", + "QuestionOnly" + ], + "x-ms-enum": { + "name": "RankerKind", + "modelAsString": true, + "values": [ + { + "name": "Default", + "value": "Default", + "description": "Default ranker." + }, + { + "name": "QuestionOnly", + "value": "QuestionOnly", + "description": "Question only ranker." + } + ] + } + }, + "RegexKey": { + "type": "object", + "description": "The regex key extra data kind.", + "properties": { + "key": { + "type": "string", + "description": "The key of the regex pattern used in extracting the entity." + }, + "regexPattern": { + "type": "string", + "description": "The .NET regex pattern used in extracting the entity. Please visit https://docs.microsoft.com/dotnet/standard/base-types/regular-expressions for more information about .NET regular expressions." + } + }, + "allOf": [ + { + "$ref": "#/definitions/BaseExtraInformation" + } + ], + "x-ms-discriminator-value": "RegexKey" + }, + "RelativeTo": { + "type": "string", + "description": "The reference point that the ordinal number denotes.", + "enum": [ + "Current", + "End", + "Start" + ], + "x-ms-enum": { + "name": "RelativeTo", + "modelAsString": true, + "values": [ + { + "name": "Current", + "value": "Current", + "description": "Current state" + }, + { + "name": "End", + "value": "End", + "description": "End state" + }, + { + "name": "Start", + "value": "Start", + "description": "Start state" + } + ] + } + }, + "RequestStatistics": { + "type": "object", + "description": "if showStats=true was specified in the request this field will contain information about the request payload.", + "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." + } + }, + "required": [ + "documentsCount", + "validDocumentsCount", + "erroneousDocumentsCount", + "transactionsCount" + ] + }, + "ResolutionKind": { + "type": "string", + "description": "The entity resolution object kind.", + "enum": [ + "BooleanResolution", + "DateTimeResolution", + "NumberResolution", + "OrdinalResolution", + "SpeedResolution", + "WeightResolution", + "LengthResolution", + "VolumeResolution", + "AreaResolution", + "AgeResolution", + "InformationResolution", + "TemperatureResolution", + "CurrencyResolution", + "NumericRangeResolution", + "TemporalSpanResolution" + ], + "x-ms-enum": { + "name": "ResolutionKind", + "modelAsString": true, + "values": [ + { + "name": "BooleanResolution", + "value": "BooleanResolution", + "description": "Resolution of a boolean entity" + }, + { + "name": "DateTimeResolution", + "value": "DateTimeResolution", + "description": "Resolution of a date/time entity" + }, + { + "name": "NumberResolution", + "value": "NumberResolution", + "description": "Resolution of a number entity" + }, + { + "name": "OrdinalResolution", + "value": "OrdinalResolution", + "description": "Resolution of an ordinal entity" + }, + { + "name": "SpeedResolution", + "value": "SpeedResolution", + "description": "Resolution of a speed entity" + }, + { + "name": "WeightResolution", + "value": "WeightResolution", + "description": "Resolution of a weight entity" + }, + { + "name": "LengthResolution", + "value": "LengthResolution", + "description": "Resolution of a length entity" + }, + { + "name": "VolumeResolution", + "value": "VolumeResolution", + "description": "Resolution of a volume entity" + }, + { + "name": "AreaResolution", + "value": "AreaResolution", + "description": "Resolution of an area entity" + }, + { + "name": "AgeResolution", + "value": "AgeResolution", + "description": "Resolution of an age entity" + }, + { + "name": "InformationResolution", + "value": "InformationResolution", + "description": "Resolution of an information entity" + }, + { + "name": "TemperatureResolution", + "value": "TemperatureResolution", + "description": "Resolution of a temperature entity" + }, + { + "name": "CurrencyResolution", + "value": "CurrencyResolution", + "description": "Resolution of a currency entity" + }, + { + "name": "NumericRangeResolution", + "value": "NumericRangeResolution", + "description": "Resolution of a numeric range entity" + }, + { + "name": "TemporalSpanResolution", + "value": "TemporalSpanResolution", + "description": "Resolution of a temporal span entity" + } + ] + } + }, + "ShortAnswerOptions": { + "type": "object", + "description": "To configure Answer span prediction feature.", + "properties": { + "enable": { + "type": "boolean", + "description": "Enable or disable Answer Span prediction.", + "default": true + }, + "confidenceScoreThreshold": { + "type": "number", + "format": "double", + "description": "Minimum threshold score required to include an answer span, value ranges from 0 to 1.", + "minimum": 0, + "maximum": 1 + }, + "topAnswersWithSpan": { + "type": "integer", + "format": "int32", + "description": "Number of Top answers to be considered for span prediction from 1 to 10.", + "minimum": 1, + "maximum": 10 + } + } + }, + "SourceFilter": { + "type": "array", + "description": "Find QnAs that are associated with any of the given list of sources in knowledge base.", + "items": { + "type": "string" + } + }, + "SpeedResolution": { + "type": "object", + "description": "Represents the speed entity resolution model.", + "properties": { + "value": { + "type": "number", + "format": "double", + "description": "The numeric value that the extracted text denotes." + }, + "unit": { + "$ref": "#/definitions/SpeedUnit", + "description": "The speed Unit of measurement" + } + }, + "required": [ + "value", + "unit" + ], + "allOf": [ + { + "$ref": "#/definitions/BaseResolution" + } + ], + "x-ms-discriminator-value": "SpeedResolution" + }, + "SpeedUnit": { + "type": "string", + "description": "The speed Unit of measurement", + "enum": [ + "Unspecified", + "MetersPerSecond", + "KilometersPerHour", + "KilometersPerMinute", + "KilometersPerSecond", + "MilesPerHour", + "Knot", + "FootPerSecond", + "FootPerMinute", + "YardsPerMinute", + "YardsPerSecond", + "MetersPerMillisecond", + "CentimetersPerMillisecond", + "KilometersPerMillisecond" + ], + "x-ms-enum": { + "name": "SpeedUnit", + "modelAsString": true, + "values": [ + { + "name": "Unspecified", + "value": "Unspecified", + "description": "Unspecified speed unit" + }, + { + "name": "MetersPerSecond", + "value": "MetersPerSecond", + "description": "Meters per second speed unit" + }, + { + "name": "KilometersPerHour", + "value": "KilometersPerHour", + "description": "Kilometers per hour speed unit" + }, + { + "name": "KilometersPerMinute", + "value": "KilometersPerMinute", + "description": "Kilometers per minute speed unit" + }, + { + "name": "KilometersPerSecond", + "value": "KilometersPerSecond", + "description": "Kilometers per second speed unit" + }, + { + "name": "MilesPerHour", + "value": "MilesPerHour", + "description": "Miles per hour speed unit" + }, + { + "name": "Knot", + "value": "Knot", + "description": "Knot speed unit" + }, + { + "name": "FootPerSecond", + "value": "FootPerSecond", + "description": "Foot per second speed unit" + }, + { + "name": "FootPerMinute", + "value": "FootPerMinute", + "description": "Foot per minute speed unit" + }, + { + "name": "YardsPerMinute", + "value": "YardsPerMinute", + "description": "Yards per minute speed unit" + }, + { + "name": "YardsPerSecond", + "value": "YardsPerSecond", + "description": "Yards per second speed unit" + }, + { + "name": "MetersPerMillisecond", + "value": "MetersPerMillisecond", + "description": "Meters per millisecond speed unit" + }, + { + "name": "CentimetersPerMillisecond", + "value": "CentimetersPerMillisecond", + "description": "Centimeters per millisecond speed unit" + }, + { + "name": "KilometersPerMillisecond", + "value": "KilometersPerMillisecond", + "description": "Kilometers per millisecond speed unit" + } + ] + } + }, + "State": { + "type": "string", + "description": "The status of the task at the mentioned last update time.", + "enum": [ + "notStarted", + "running", + "succeeded", + "partiallyCompleted", + "failed", + "cancelled", + "cancelling" + ], + "x-ms-enum": { + "name": "State", + "modelAsString": true, + "values": [ + { + "name": "notStarted", + "value": "notStarted", + "description": "Not started state" + }, + { + "name": "running", + "value": "running", + "description": "Running state" + }, + { + "name": "succeeded", + "value": "succeeded", + "description": "Succeeded state" + }, + { + "name": "partiallyCompleted", + "value": "partiallyCompleted", + "description": "Partially completed state" + }, + { + "name": "failed", + "value": "failed", + "description": "Failed state" + }, + { + "name": "cancelled", + "value": "cancelled", + "description": "Cancelled state" + }, + { + "name": "cancelling", + "value": "cancelling", + "description": "Cancelling state" + } + ] + } + }, + "SummaryAspect": { + "type": "string", + "description": "Supported parameters for a conversational summarization task.", + "enum": [ + "issue", + "resolution", + "chapterTitle", + "narrative" + ], + "x-ms-enum": { + "name": "SummaryAspect", + "modelAsString": true, + "values": [ + { + "name": "issue", + "value": "issue", + "description": "Summary of issues in transcripts of web chats and service calls between customer-service agents and customers." + }, + { + "name": "resolution", + "value": "resolution", + "description": "Summary of resolutions in transcripts of web chats and service calls between customer-service agents and customers." + }, + { + "name": "chapterTitle", + "value": "chapterTitle", + "description": "Chapter title of any conversation. It's usually one phrase or several phrases naturally combined. Long conversations tend to have more chapters. You can find the chapter boundary from the summary context." + }, + { + "name": "narrative", + "value": "narrative", + "description": "Generic narrative summary of any conversation. It generally converts the conversational language into formal written language, compresses the text length, and keeps the salient information." + } + ] + } + }, + "SummaryResult": { + "type": "object", + "description": "Summary Results", + "properties": { + "conversations": { + "type": "array", + "description": "array of conversations", + "items": { + "$ref": "#/definitions/ConversationsSummaryResult" + } + }, + "errors": { + "type": "array", + "description": "Errors by document id.", + "items": { + "$ref": "#/definitions/DocumentError" + } + }, + "statistics": { + "$ref": "#/definitions/RequestStatistics", + "description": "statistics" + }, + "modelVersion": { + "type": "string", + "description": "This field indicates which model is used for scoring." + } + }, + "required": [ + "conversations", + "errors", + "modelVersion" + ] + }, + "SummaryResultItem": { + "type": "object", + "description": "Summary Result Item", + "properties": { + "aspect": { + "type": "string", + "description": "aspect" + }, + "text": { + "type": "string", + "description": "text" + }, + "contexts": { + "type": "array", + "description": "Context list of the summary.", + "items": { + "$ref": "#/definitions/ItemizedSummaryContext" + }, + "x-ms-identifiers": [] + } + }, + "required": [ + "aspect", + "text" + ] + }, + "TargetIntentResult": { + "type": "object", + "description": "This is the base class of an intent prediction", + "properties": { + "targetProjectKind": { + "$ref": "#/definitions/targetProjectKind", + "description": "This is the base class of an intent prediction" + }, + "apiVersion": { + "type": "string", + "description": "The API version used to call a target service." + }, + "confidenceScore": { + "type": "number", + "format": "double", + "description": "The prediction score and it ranges from 0.0 to 1.0.", + "minimum": 0, + "maximum": 1 + } + }, + "discriminator": "targetProjectKind", + "required": [ + "targetProjectKind", + "confidenceScore" + ] + }, + "Tasks": { + "type": "object", + "description": "Contains the state for the tasks that are being executed as part of the submitted job for analyzing a conversation.", + "properties": { + "completed": { + "type": "integer", + "format": "int32", + "description": "Count of tasks that finished successfully." + }, + "failed": { + "type": "integer", + "format": "int32", + "description": "Count of tasks that failed." + }, + "inProgress": { + "type": "integer", + "format": "int32", + "description": "Count of tasks that are currently in progress." + }, + "total": { + "type": "integer", + "format": "int32", + "description": "Total count of tasks submitted as part of the job." + }, + "items": { + "type": "array", + "description": "List of results from tasks (if available).", + "items": { + "$ref": "#/definitions/AnalyzeConversationJobResult" + }, + "x-ms-identifiers": [] + } + }, + "required": [ + "completed", + "failed", + "inProgress", + "total" + ] + }, + "TemperatureResolution": { + "type": "object", + "description": "Represents the temperature entity resolution model.", + "properties": { + "value": { + "type": "number", + "format": "double", + "description": "The numeric value that the extracted text denotes." + }, + "unit": { + "$ref": "#/definitions/TemperatureUnit", + "description": "The temperature Unit of measurement." + } + }, + "required": [ + "value", + "unit" + ], + "allOf": [ + { + "$ref": "#/definitions/BaseResolution" + } + ], + "x-ms-discriminator-value": "TemperatureResolution" + }, + "TemperatureUnit": { + "type": "string", + "description": "The temperature Unit of measurement.", + "enum": [ + "Unspecified", + "Fahrenheit", + "Kelvin", + "Rankine", + "Celsius" + ], + "x-ms-enum": { + "name": "TemperatureUnit", + "modelAsString": true, + "values": [ + { + "name": "Unspecified", + "value": "Unspecified", + "description": "Unspecified temperature unit" + }, + { + "name": "Fahrenheit", + "value": "Fahrenheit", + "description": "Fahrenheit temperature unit" + }, + { + "name": "Kelvin", + "value": "Kelvin", + "description": "Kelvin temperature unit" + }, + { + "name": "Rankine", + "value": "Rankine", + "description": "Rankine temperature unit" + }, + { + "name": "Celsius", + "value": "Celsius", + "description": "Celsius temperature unit" + } + ] + } + }, + "TemporalModifier": { + "type": "string", + "description": "An optional modifier of a date/time instance.", + "enum": [ + "AfterApprox", + "Before", + "BeforeStart", + "Approx", + "ReferenceUndefined", + "SinceEnd", + "AfterMid", + "Start", + "After", + "BeforeEnd", + "Until", + "End", + "Less", + "Since", + "AfterStart", + "BeforeApprox", + "Mid", + "More" + ], + "x-ms-enum": { + "name": "TemporalModifier", + "modelAsString": true, + "values": [ + { + "name": "AfterApprox", + "value": "AfterApprox", + "description": "AfterApprox temporal modifier" + }, + { + "name": "Before", + "value": "Before", + "description": "Before temporal modifier" + }, + { + "name": "BeforeStart", + "value": "BeforeStart", + "description": "BeforeStart temporal modifier" + }, + { + "name": "Approx", + "value": "Approx", + "description": "Approx temporal modifier" + }, + { + "name": "ReferenceUndefined", + "value": "ReferenceUndefined", + "description": "ReferenceUndefined temporal modifier" + }, + { + "name": "SinceEnd", + "value": "SinceEnd", + "description": "SinceEnd temporal modifier" + }, + { + "name": "AfterMid", + "value": "AfterMid", + "description": "AfterMid temporal modifier" + }, + { + "name": "Start", + "value": "Start", + "description": "Start temporal modifier" + }, + { + "name": "After", + "value": "After", + "description": "After temporal modifier" + }, + { + "name": "BeforeEnd", + "value": "BeforeEnd", + "description": "BeforeEnd temporal modifier" + }, + { + "name": "Until", + "value": "Until", + "description": "Until temporal modifier" + }, + { + "name": "End", + "value": "End", + "description": "End temporal modifier" + }, + { + "name": "Less", + "value": "Less", + "description": "Less temporal modifier" + }, + { + "name": "Since", + "value": "Since", + "description": "Since temporal modifier" + }, + { + "name": "AfterStart", + "value": "AfterStart", + "description": "AfterStart temporal modifier" + }, + { + "name": "BeforeApprox", + "value": "BeforeApprox", + "description": "BeforeApprox temporal modifier" + }, + { + "name": "Mid", + "value": "Mid", + "description": "Mid temporal modifier" + }, + { + "name": "More", + "value": "More", + "description": "More temporal modifier" + } + ] + } + }, + "TemporalSpanResolution": { + "type": "object", + "description": "represents the resolution of a date and/or time span.", + "properties": { + "begin": { + "type": "string", + "description": "represents the resolution of a date and/or time span. An extended ISO 8601 date/time representation as described in (https://github.com/Microsoft/Recognizers-Text/blob/master/Patterns/English/English-DateTime.yaml)" + }, + "end": { + "type": "string", + "description": "represents the resolution of a date and/or time span. An extended ISO 8601 date/time representation as described in (https://github.com/Microsoft/Recognizers-Text/blob/master/Patterns/English/English-DateTime.yaml)" + }, + "duration": { + "type": "string", + "description": "An optional duration value formatted based on the ISO 8601 (https://en.wikipedia.org/wiki/ISO_8601#Durations)" + }, + "modifier": { + "$ref": "#/definitions/TemporalModifier", + "description": "An optional modifier of a date/time instance." + }, + "timex": { + "type": "string", + "description": "An optional triplet containing the beginning, the end, and the duration all stated as ISO 8601 formatted strings." + } + }, + "allOf": [ + { + "$ref": "#/definitions/BaseResolution" + } + ], + "x-ms-discriminator-value": "TemporalSpanResolution" + }, + "TextConversation": { + "type": "object", + "description": "model for text conversation", + "properties": { + "conversationItems": { + "type": "array", + "description": "Ordered list of text conversation items in the conversation.", + "items": { + "$ref": "#/definitions/TextConversationItem" + } + } + }, + "required": [ + "conversationItems" + ], + "allOf": [ + { + "$ref": "#/definitions/Conversation" + } + ], + "x-ms-discriminator-value": "text" + }, + "TextConversationItem": { + "type": "object", + "description": "The text modality of an input conversation.", + "properties": { + "id": { + "type": "string", + "description": "The ID of a conversation item." + }, + "participantId": { + "type": "string", + "description": "The participant ID of a conversation item." + }, + "language": { + "type": "string", + "description": "The override language of a conversation item in BCP 47 language representation." + }, + "modality": { + "$ref": "#/definitions/InputModality", + "description": "Enumeration of supported conversational modalities." + }, + "role": { + "$ref": "#/definitions/role", + "description": "Role of the participant." + }, + "text": { + "type": "string", + "description": "The text input" + } + }, + "required": [ + "id", + "participantId", + "text" + ] + }, + "TranscriptConversation": { + "type": "object", + "description": "model for transcript conversation", + "properties": { + "conversationItems": { + "type": "array", + "description": "Ordered list of transcript conversation items in the conversation.", + "items": { + "$ref": "#/definitions/TranscriptConversationItem" + } + } + }, + "required": [ + "conversationItems" + ], + "allOf": [ + { + "$ref": "#/definitions/Conversation" + } + ], + "x-ms-discriminator-value": "transcript" + }, + "TranscriptConversationItem": { + "type": "object", + "description": "Additional properties for supporting transcript conversation.", + "properties": { + "id": { + "type": "string", + "description": "The ID of a conversation item." + }, + "participantId": { + "type": "string", + "description": "The participant ID of a conversation item." + }, + "language": { + "type": "string", + "description": "The override language of a conversation item in BCP 47 language representation." + }, + "modality": { + "$ref": "#/definitions/InputModality", + "description": "Enumeration of supported conversational modalities." + }, + "role": { + "$ref": "#/definitions/role", + "description": "Role of the participant." + }, + "itn": { + "type": "string", + "description": "Inverse text normalization (ITN) representation of input. The inverse-text-normalized form is the recognized text from Microsoft's speech-to-text API, with phone numbers, numbers, abbreviations, and other transformations applied." + }, + "maskedItn": { + "type": "string", + "description": "Inverse-text-normalized format with profanity masking applied." + }, + "text": { + "type": "string", + "description": "Display form of the recognized text from the speech-to-text API, with punctuation and capitalization added." + }, + "lexical": { + "type": "string", + "description": "Lexical form of the recognized text from the speech-to-text API, with the actual words recognized." + }, + "wordLevelTimings": { + "type": "array", + "description": "List of word-level audio timing information.", + "items": { + "$ref": "#/definitions/WordLevelTiming" + }, + "x-ms-identifiers": [] + }, + "conversationItemLevelTiming": { + "$ref": "#/definitions/ConversationItemLevelTiming", + "description": "Audio timing at the conversation item level. This still can help with AI quality if word-level audio timings are not available." + } + }, + "required": [ + "id", + "participantId", + "itn", + "maskedItn", + "text", + "lexical" + ] + }, + "VolumeResolution": { + "type": "object", + "description": "Represents the volume entity resolution model.", + "properties": { + "value": { + "type": "number", + "format": "double", + "description": "The numeric value that the extracted text denotes." + }, + "unit": { + "$ref": "#/definitions/VolumeUnit", + "description": "The Volume Unit of measurement" + } + }, + "required": [ + "value", + "unit" + ], + "allOf": [ + { + "$ref": "#/definitions/BaseResolution" + } + ], + "x-ms-discriminator-value": "VolumeResolution" + }, + "VolumeUnit": { + "type": "string", + "description": "The Volume Unit of measurement", + "enum": [ + "Unspecified", + "CubicMeter", + "CubicCentimeter", + "CubicMillimeter", + "Hectoliter", + "Decaliter", + "Liter", + "Centiliter", + "Milliliter", + "CubicYard", + "CubicInch", + "CubicFoot", + "CubicMile", + "FluidOunce", + "Teaspoon", + "Tablespoon", + "Pint", + "Quart", + "Cup", + "Gill", + "Pinch", + "FluidDram", + "Barrel", + "Minim", + "Cord", + "Peck", + "Bushel", + "Hogshead" + ], + "x-ms-enum": { + "name": "VolumeUnit", + "modelAsString": true, + "values": [ + { + "name": "Unspecified", + "value": "Unspecified", + "description": "Unspecified volume unit." + }, + { + "name": "CubicMeter", + "value": "CubicMeter", + "description": "Volume unit in cubic meters." + }, + { + "name": "CubicCentimeter", + "value": "CubicCentimeter", + "description": "Volume unit in cubic centimeters." + }, + { + "name": "CubicMillimeter", + "value": "CubicMillimeter", + "description": "Volume unit in cubic millimeters." + }, + { + "name": "Hectoliter", + "value": "Hectoliter", + "description": "Volume unit in hectoliters." + }, + { + "name": "Decaliter", + "value": "Decaliter", + "description": "Volume unit in decaliters." + }, + { + "name": "Liter", + "value": "Liter", + "description": "Volume unit in liters." + }, + { + "name": "Centiliter", + "value": "Centiliter", + "description": "Volume unit in centiliters." + }, + { + "name": "Milliliter", + "value": "Milliliter", + "description": "Volume unit in milliliters." + }, + { + "name": "CubicYard", + "value": "CubicYard", + "description": "Volume unit in cubic yards." + }, + { + "name": "CubicInch", + "value": "CubicInch", + "description": "Volume unit in cubic inches." + }, + { + "name": "CubicFoot", + "value": "CubicFoot", + "description": "Volume unit in cubic feet." + }, + { + "name": "CubicMile", + "value": "CubicMile", + "description": "Volume unit in cubic miles." + }, + { + "name": "FluidOunce", + "value": "FluidOunce", + "description": "Volume unit in fluid ounces." + }, + { + "name": "Teaspoon", + "value": "Teaspoon", + "description": "Volume unit in teaspoons." + }, + { + "name": "Tablespoon", + "value": "Tablespoon", + "description": "Volume unit in tablespoons." + }, + { + "name": "Pint", + "value": "Pint", + "description": "Volume unit in pints." + }, + { + "name": "Quart", + "value": "Quart", + "description": "Volume unit in quarts." + }, + { + "name": "Cup", + "value": "Cup", + "description": "Volume unit in cups." + }, + { + "name": "Gill", + "value": "Gill", + "description": "Volume unit in gills." + }, + { + "name": "Pinch", + "value": "Pinch", + "description": "Volume unit in pinches." + }, + { + "name": "FluidDram", + "value": "FluidDram", + "description": "Volume unit in fluid drams." + }, + { + "name": "Barrel", + "value": "Barrel", + "description": "Volume unit in barrels." + }, + { + "name": "Minim", + "value": "Minim", + "description": "Volume unit in minims." + }, + { + "name": "Cord", + "value": "Cord", + "description": "Volume unit in cords." + }, + { + "name": "Peck", + "value": "Peck", + "description": "Volume unit in pecks." + }, + { + "name": "Bushel", + "value": "Bushel", + "description": "Volume unit in bushels." + }, + { + "name": "Hogshead", + "value": "Hogshead", + "description": "Volume unit in hogsheads." + } + ] + } + }, + "WeightResolution": { + "type": "object", + "description": "Represents the weight entity resolution model.", + "properties": { + "value": { + "type": "number", + "format": "double", + "description": "The numeric value that the extracted text denotes." + }, + "unit": { + "$ref": "#/definitions/WeightUnit", + "description": "The weight Unit of measurement." + } + }, + "required": [ + "value", + "unit" + ], + "allOf": [ + { + "$ref": "#/definitions/BaseResolution" + } + ], + "x-ms-discriminator-value": "WeightResolution" + }, + "WeightUnit": { + "type": "string", + "description": "The weight Unit of measurement.", + "enum": [ + "Unspecified", + "Kilogram", + "Gram", + "Milligram", + "Gallon", + "MetricTon", + "Ton", + "Pound", + "Ounce", + "Grain", + "PennyWeight", + "LongTonBritish", + "ShortTonUS", + "ShortHundredWeightUS", + "Stone", + "Dram" + ], + "x-ms-enum": { + "name": "WeightUnit", + "modelAsString": true, + "values": [ + { + "name": "Unspecified", + "value": "Unspecified", + "description": "Unspecified weight unit" + }, + { + "name": "Kilogram", + "value": "Kilogram", + "description": "Weight unit in kilograms" + }, + { + "name": "Gram", + "value": "Gram", + "description": "Weight unit in grams" + }, + { + "name": "Milligram", + "value": "Milligram", + "description": "Weight unit in milligrams" + }, + { + "name": "Gallon", + "value": "Gallon", + "description": "Volume unit in gallons" + }, + { + "name": "MetricTon", + "value": "MetricTon", + "description": "Weight unit in metric tons" + }, + { + "name": "Ton", + "value": "Ton", + "description": "Weight unit in tons" + }, + { + "name": "Pound", + "value": "Pound", + "description": "Weight unit in pounds" + }, + { + "name": "Ounce", + "value": "Ounce", + "description": "Weight unit in ounces" + }, + { + "name": "Grain", + "value": "Grain", + "description": "Weight unit in grains" + }, + { + "name": "PennyWeight", + "value": "PennyWeight", + "description": "Weight unit in pennyweights" + }, + { + "name": "LongTonBritish", + "value": "LongTonBritish", + "description": "Weight unit in long tons (British)" + }, + { + "name": "ShortTonUS", + "value": "ShortTonUS", + "description": "Weight unit in short tons (US)" + }, + { + "name": "ShortHundredWeightUS", + "value": "ShortHundredWeightUS", + "description": "Weight unit in short hundredweights (US)" + }, + { + "name": "Stone", + "value": "Stone", + "description": "Weight unit in stones" + }, + { + "name": "Dram", + "value": "Dram", + "description": "Weight unit in drams" + } + ] + } + }, + "WordLevelTiming": { + "type": "object", + "description": "Word-level timing information that the speech-to-text API generates. The words in this object should have 1:1 correspondence with the lexical input to allow for audio redaction.", + "properties": { + "offset": { + "type": "integer", + "format": "int64", + "description": "Offset from the start of speech audio, in ticks. 1 tick = 100 nanoseconds." + }, + "duration": { + "type": "integer", + "format": "int64", + "description": "Duration of word articulation, in ticks. 1 tick = 100 nanoseconds." + }, + "word": { + "type": "string", + "description": "Recognized word." + } + } + }, + "projectKind": { + "type": "string", + "description": "The type of the project.", + "enum": [ + "Conversation", + "Orchestration" + ], + "x-ms-enum": { + "name": "projectKind", + "modelAsString": true, + "values": [ + { + "name": "Conversation", + "value": "Conversation", + "description": "Conversation type" + }, + { + "name": "Orchestration", + "value": "Orchestration", + "description": "Orchestration type" + } + ] + } + }, + "role": { + "type": "string", + "description": "Role of the participant.", + "enum": [ + "customer", + "agent", + "generic" + ], + "x-ms-enum": { + "name": "role", + "modelAsString": true, + "values": [ + { + "name": "customer", + "value": "customer", + "description": "The participant is a customer." + }, + { + "name": "agent", + "value": "agent", + "description": "The participant is an agent." + }, + { + "name": "generic", + "value": "generic", + "description": "The is a generic participant." + } + ] + } + }, + "targetProjectKind": { + "type": "string", + "description": "The type of a target service.", + "enum": [ + "Luis", + "Conversation", + "QuestionAnswering", + "NonLinked" + ], + "x-ms-enum": { + "name": "targetProjectKind", + "modelAsString": true, + "values": [ + { + "name": "Luis", + "value": "Luis", + "description": "Luis target service type" + }, + { + "name": "Conversation", + "value": "Conversation", + "description": "Conversation target service type" + }, + { + "name": "QuestionAnswering", + "value": "QuestionAnswering", + "description": "QuestionAnswering target service type" + }, + { + "name": "NonLinked", + "value": "NonLinked", + "description": "NonLinked target service type" + } + ] + } + } + }, + "parameters": { + "Azure.Core.Foundations.ApiVersionParameter": { + "name": "api-version", + "in": "query", + "description": "The API version to use for this operation.", + "required": true, + "type": "string", + "minLength": 1, + "x-ms-parameter-location": "method", + "x-ms-client-name": "apiVersion" } } } diff --git a/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/analyzetext.json b/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/analyzetext.json index 528bd0ea4ce6..09b715f6b40b 100644 --- a/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/analyzetext.json +++ b/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/analyzetext.json @@ -2,105 +2,111 @@ "swagger": "2.0", "info": { "title": "Microsoft Cognitive Language Service - Text Analysis", - "description": "The language service API is a suite of natural language processing (NLP) skills 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, language detection and question answering. Further documentation can be found in https://docs.microsoft.com/azure/cognitive-services/language-service/overview.", - "version": "2023-04-01" - }, - "securityDefinitions": { - "AADToken": { - "type": "oauth2", - "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", - "flow": "implicit", - "description": "These are the [Azure Active Directory OAuth2](https://docs.microsoft.com/azure/active-directory/develop/v1-overview) Flows. When paired with [Azure role-based access](https://docs.microsoft.com/azure/role-based-access-control/overview) control it can be used to control access to Azure Maps REST APIs. Azure role-based access controls are used to designate access to one or more Azure Maps resource account or sub-resources. Any user, group, or service principal can be granted access via a built-in role or a custom role composed of one or more permissions to Azure Maps REST APIs.\n\nTo implement scenarios, we recommend viewing [authentication concepts](https://aka.ms/amauth). In summary, this security definition provides a solution for modeling application(s) via objects capable of access control on specific APIs and scopes.\n\n#### Notes\n* This security definition **requires** the use of the `x-ms-client-id` header to indicate which Azure Maps resource the application is requesting access to. This can be acquired from the [Maps management API](https://aka.ms/amauthdetails).\n* \nThe `Authorization URL` is specific to the Azure public cloud instance. Sovereign clouds have unique Authorization URLs and Azure Active directory configurations. \n* \nThe Azure role-based access control is configured from the [Azure management plane](https://aka.ms/amrbac) via Azure portal, PowerShell, CLI, Azure SDKs, or REST APIs.\n* \nUsage of the [Azure Maps Web SDK](https://aka.ms/amaadmc) allows for configuration based setup of an application for multiple use cases.\n* Currently, Azure Active Directory [v1.0 or v2.0](https://docs.microsoft.com/azure/active-directory/develop/azure-ad-endpoint-comparison) supports Work, School, and Guests but does not support Personal accounts.", - "scopes": { - "https://cognitiveservices.azure.com/.default": "https://cognitiveservices.azure.com/.default" + "version": "2023-04-01", + "description": "The language service API is a suite of natural language processing (NLP) skills 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, language detection and question answering. Further documentation can be found in https://docs.microsoft.com/azure/cognitive-services/language-service/overview.0", + "x-typespec-generated": [ + { + "emitter": "@azure-tools/typespec-autorest" } - }, - "apim_key": { - "type": "apiKey", - "description": "A subscription key for a Language service resource.", - "name": "Ocp-Apim-Subscription-Key", - "in": "header" - } + ] }, - "security": [ - { - "AADToken": [ - "https://cognitiveservices.azure.com/.default" - ] - }, - { - "apim_key": [] - } + "schemes": [ + "https" ], "x-ms-parameterized-host": { "hostTemplate": "{Endpoint}/language", "useSchemePrefix": false, "parameters": [ { - "$ref": "common.json#/parameters/Endpoint" + "name": "Endpoint", + "in": "path", + "description": "Supported Cognitive Services endpoint (e.g., https://.api.cognitiveservices.azure.com).", + "required": true, + "type": "string" } ] }, + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ], + "security": [ + { + "ApiKeyAuth": [] + } + ], + "securityDefinitions": { + "ApiKeyAuth": { + "type": "apiKey", + "name": "Ocp-Apim-Subscription-Key", + "in": "header" + } + }, + "tags": [], "paths": { "/:analyze-text": { "post": { - "summary": "Request text analysis over a collection of documents.", - "description": "Submit a collection of text documents for analysis. Specify a single unique task to be executed immediately.", "operationId": "AnalyzeText", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], + "description": "Request text analysis over a collection of documents.", "parameters": [ { - "$ref": "common.json#/parameters/ApiVersionParameter" + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { - "$ref": "#/parameters/ShowStats" + "name": "showStats", + "in": "query", + "description": "(Optional) if set to true, response will contain request and document level statistics.", + "required": false, + "type": "boolean" }, { - "description": "Collection of documents to analyze and a single task to execute.", - "in": "body", "name": "body", + "in": "body", + "required": true, "schema": { "$ref": "#/definitions/AnalyzeTextTask" - }, - "required": true + } } ], "responses": { "200": { - "description": "A successful call result", + "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/AnalyzeTextTaskResult" } }, "default": { - "description": "Unexpected error", + "description": "An unexpected error response.", "schema": { - "$ref": "common.json#/definitions/ErrorResponse" + "$ref": "#/definitions/ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } } } }, "x-ms-examples": { - "Successful Entity Linking Request": { + "SuccessfulEntityLinkingRequest": { "$ref": "./examples/SuccessfulEntityLinkingRequest.json" }, - "Successful Entity Recognition Request": { + "SuccessfulEntityRecognitionRequest": { "$ref": "./examples/SuccessfulEntityRecognitionRequest.json" }, - "Successful Key Phrase Extraction Request": { + "SuccessfulKeyPhraseExtractionRequest": { "$ref": "./examples/SuccessfulKeyPhraseExtractionRequest.json" }, - "Successful PII Entity Recognition Request": { - "$ref": "./examples/SuccessfulPiiEntityRecognitionRequest.json" - }, - "Successful Language Detection Request": { + "SuccessfulLanguageDetectionRequest": { "$ref": "./examples/SuccessfulLanguageDetectionRequest.json" }, - "Successful Sentiment Analysis Request": { + "SuccessfulPiiEntityRecognitionRequest": { + "$ref": "./examples/SuccessfulPiiEntityRecognitionRequest.json" + }, + "SuccessfulSentimentAnalysisRequest": { "$ref": "./examples/SuccessfulSentimentAnalysisRequest.json" } } @@ -108,51 +114,51 @@ }, "/analyze-text/jobs": { "post": { - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], + "operationId": "AnalyzeTextSubmitJob", "description": "Submit a collection of text documents for analysis. Specify one or more unique tasks to be executed as a long-running operation.", - "operationId": "AnalyzeText_SubmitJob", - "summary": "Submit text analysis job", "parameters": [ { - "$ref": "common.json#/parameters/ApiVersionParameter" + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { - "description": "Collection of documents to analyze and one or more tasks to execute.", - "in": "body", "name": "body", + "in": "body", + "required": true, "schema": { "$ref": "#/definitions/AnalyzeTextJobsInput" - }, - "required": true + } } ], "responses": { "202": { - "description": "A successful call results with an Operation-Location header used to check the status of the analysis job.", + "description": "The request has been accepted for processing, but processing has not yet completed.", "headers": { "Operation-Location": { - "type": "string" + "type": "string", + "format": "uri", + "description": "The location for monitoring the operation state." } } }, "default": { - "description": "Error response.", + "description": "An unexpected error response.", "schema": { - "$ref": "common.json#/definitions/ErrorResponse" + "$ref": "#/definitions/ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } } } }, "x-ms-examples": { - "Successful Submit Analysis Job Request": { - "$ref": "./examples/SuccessfulAnalyzeTextJobsMultipleTaskSubmitRequest.json" + "SuccessfulAbstractiveSummarizationTaskSubmit": { + "$ref": "./examples/SuccessfulAbstractiveSummarizationTaskSubmit.json" }, - "Successful Submit Abstractive Summarization Task": { - "$ref": "./examples/text/SuccessfulAbstractiveSummarizationTaskSubmit.json" + "SuccessfulAnalyzeTextJobsMultipleTaskSubmitRequest": { + "$ref": "./examples/SuccessfulAnalyzeTextJobsMultipleTaskSubmitRequest.json" } }, "x-ms-long-running-operation": true @@ -160,88 +166,120 @@ }, "/analyze-text/jobs/{jobId}": { "get": { - "produces": [ - "application/json" - ], - "description": "Get the status of an analysis job. A job may consist of one or more tasks. Once all tasks are succeeded, the job will transition to the succeeded state and results will be available for each task.", - "operationId": "AnalyzeText_JobStatus", + "operationId": "AnalyzeTextJobStatus", "summary": "Get analysis status and results", + "description": "Get the status of an analysis job. A job can consist of one or more tasks. After all tasks succeed, the job transitions to the succeeded state and results are available for each task.", "parameters": [ { - "$ref": "common.json#/parameters/ApiVersionParameter" + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { - "$ref": "#/parameters/JobId" + "name": "jobId", + "in": "path", + "description": "job ID", + "required": true, + "type": "string", + "format": "uuid" }, { - "$ref": "#/parameters/ShowStats" + "name": "showStats", + "in": "query", + "description": "(Optional) if set to true, response will contain request and document level statistics.", + "required": false, + "type": "boolean" }, { - "$ref": "common.json#/parameters/TopParameter" + "name": "top", + "in": "query", + "description": "The maximum number of resources to return from the collection.", + "required": false, + "type": "integer", + "format": "int32" }, { - "$ref": "common.json#/parameters/SkipParameter" + "name": "skip", + "in": "query", + "description": "An offset into the collection of the first resource to be returned.", + "required": false, + "type": "integer", + "format": "int32" } ], "responses": { "200": { - "description": "Analysis job status and metadata.", + "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/AnalyzeTextJobState" } }, "default": { - "description": "Unexpected error", + "description": "An unexpected error response.", "schema": { - "$ref": "common.json#/definitions/ErrorResponse" + "$ref": "#/definitions/ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } } } }, "x-ms-examples": { - "Successful Get Text Analysis Job Status Request": { - "$ref": "./examples/SuccessfulAnalyzeTextJobsMultipleTaskStatusRequest.json" + "SuccessfulAbstractiveSummarizationTaskResult": { + "$ref": "./examples/SuccessfulAbstractiveSummarizationTaskResult.json" }, - "Successful Get Abstractive Summarization Result": { - "$ref": "./examples/text/SuccessfulAbstractiveSummarizationTaskResult.json" + "SuccessfulAnalyzeTextJobsMultipleTaskStatusRequest": { + "$ref": "./examples/SuccessfulAnalyzeTextJobsMultipleTaskStatusRequest.json" } } } }, "/analyze-text/jobs/{jobId}:cancel": { "post": { - "produces": [ - "application/json" - ], + "operationId": "AnalyzeTextCancelJob", + "summary": "Cancel a long-running Text Analysis job.", "description": "Cancel a long-running Text Analysis job.", - "operationId": "AnalyzeText_CancelJob", - "summary": "Cancel a long-running Text Analysis job", "parameters": [ { - "$ref": "common.json#/parameters/ApiVersionParameter" + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { - "$ref": "#/parameters/JobId" + "name": "jobId", + "in": "path", + "description": "The job ID to cancel.", + "required": true, + "type": "string", + "format": "uuid" } ], "responses": { "202": { - "description": "Cancel Job request has been received.", + "description": "The request has been accepted for processing, but processing has not yet completed.", "headers": { "Operation-Location": { - "type": "string" + "type": "string", + "format": "uri", + "description": "The location for monitoring the operation state." } } }, "default": { - "description": "Unexpected error", + "description": "An unexpected error response.", "schema": { - "$ref": "common.json#/definitions/ErrorResponse" + "$ref": "#/definitions/ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } } } }, "x-ms-examples": { - "Successful Job Delete Request": { - "$ref": ".//examples//SuccessfulAnalyzeTextJobsCancelRequest.json" + "SuccessfulAnalyzeTextJobsCancelRequest": { + "$ref": "./examples/SuccessfulAnalyzeTextJobsCancelRequest.json" } }, "x-ms-long-running-operation": true @@ -249,202 +287,196 @@ } }, "definitions": { - "AnalyzeTextTaskKind": { - "type": "string", - "description": "Enumeration of supported Text Analysis tasks.", - "enum": [ - "SentimentAnalysis", - "EntityRecognition", - "PiiEntityRecognition", - "KeyPhraseExtraction", - "LanguageDetection", - "EntityLinking" + "AbstractiveSummarizationLROResult": { + "type": "object", + "description": "An object representing the results for an Abstractive Summarization task.", + "properties": { + "results": { + "$ref": "#/definitions/AbstractiveSummarizationResult", + "description": "Results of the task." + } + }, + "required": [ + "results" ], - "x-ms-enum": { - "name": "AnalyzeTextTaskKind", - "modelAsString": true - } - }, - "AnalyzeTextLROTaskKind": { - "type": "string", - "description": "Enumeration of supported long-running Text Analysis tasks.", - "enum": [ - "SentimentAnalysis", - "EntityRecognition", - "PiiEntityRecognition", - "KeyPhraseExtraction", - "EntityLinking", - "Healthcare", - "ExtractiveSummarization", - "CustomEntityRecognition", - "CustomSingleLabelClassification", - "CustomMultiLabelClassification", - "AbstractiveSummarization" + "allOf": [ + { + "$ref": "#/definitions/AnalyzeTextLROResult" + } ], - "x-ms-enum": { - "name": "AnalyzeTextLROTaskKind", - "modelAsString": true - } + "x-ms-discriminator-value": "AbstractiveSummarizationLROResults" }, - "AnalyzeTextTaskResultsKind": { - "type": "string", - "description": "Enumeration of supported Text Analysis task results.", - "enum": [ - "SentimentAnalysisResults", - "EntityRecognitionResults", - "PiiEntityRecognitionResults", - "KeyPhraseExtractionResults", - "LanguageDetectionResults", - "EntityLinkingResults" + "AbstractiveSummarizationLROTask": { + "type": "object", + "description": "An object representing the task definition for an Abstractive Summarization task.", + "properties": { + "parameters": { + "$ref": "#/definitions/AbstractiveSummarizationTaskParameters", + "description": "Parameters for the Abstractive Summarization task." + } + }, + "required": [ + "parameters" ], - "x-ms-enum": { - "name": "AnalyzeTextTaskResultsKind", - "modelAsString": true - } - }, - "AnalyzeTextLROResultsKind": { - "type": "string", - "description": "Enumeration of supported Text Analysis long-running operation task results.", - "enum": [ - "SentimentAnalysisLROResults", - "EntityRecognitionLROResults", - "PiiEntityRecognitionLROResults", - "KeyPhraseExtractionLROResults", - "EntityLinkingLROResults", - "HealthcareLROResults", - "ExtractiveSummarizationLROResults", - "CustomEntityRecognitionLROResults", - "CustomSingleLabelClassificationLROResults", - "CustomMultiLabelClassificationLROResults", - "AbstractiveSummarizationLROResults" + "allOf": [ + { + "$ref": "#/definitions/AnalyzeTextLROTask" + } ], - "x-ms-enum": { - "name": "AnalyzeTextLROResultsKind", - "modelAsString": true - } + "x-ms-discriminator-value": "AbstractiveSummarization" }, - "MultiLanguageAnalysisInput": { + "AbstractiveSummarizationResult": { "type": "object", + "description": "An object representing the pre-built Abstractive Summarization results of each document.", "properties": { - "documents": { + "errors": { "type": "array", + "description": "Errors by document id.", "items": { - "$ref": "#/definitions/MultiLanguageInput" + "$ref": "#/definitions/DocumentError" } - } - } - }, - "LanguageDetectionAnalysisInput": { - "type": "object", - "properties": { + }, + "statistics": { + "$ref": "#/definitions/RequestStatistics", + "description": "if showStats=true was specified in the request this field will contain information about the request payload." + }, + "modelVersion": { + "type": "string", + "description": "This field indicates which model is used for scoring." + }, "documents": { "type": "array", + "description": "Response by document", "items": { - "$ref": "#/definitions/LanguageInput" + "$ref": "#/definitions/AbstractiveSummaryDocumentResult" } } - } - }, - "AnalyzeTextTask": { - "type": "object", - "discriminator": "kind", - "required": [ - "kind" - ], - "properties": { - "kind": { - "$ref": "#/definitions/AnalyzeTextTaskKind" - } - } - }, - "AnalyzeTextLROTask": { - "type": "object", - "discriminator": "kind", - "required": [ - "kind" - ], - "properties": { - "kind": { - "$ref": "#/definitions/AnalyzeTextLROTaskKind" - } }, - "allOf": [ - { - "$ref": "#/definitions/TaskIdentifier" - } + "required": [ + "errors", + "modelVersion", + "documents" ] }, - "AnalyzeTextTaskResult": { + "AbstractiveSummarizationTaskParameters": { "type": "object", - "discriminator": "kind", - "required": [ - "kind" - ], + "description": "Supported parameters for the pre-built Abstractive Summarization task.", "properties": { - "kind": { - "$ref": "#/definitions/AnalyzeTextTaskResultsKind" + "loggingOptOut": { + "type": "boolean", + "description": "logging opt out", + "default": false + }, + "modelVersion": { + "type": "string", + "description": "model version", + "default": "latest" + }, + "sentenceCount": { + "type": "integer", + "format": "int32", + "description": "Controls the approximate number of sentences in the output summaries." + }, + "stringIndexType": { + "type": "string", + "description": "String index type", + "default": "TextElements_v8", + "enum": [ + "TextElements_v8", + "UnicodeCodePoint", + "Utf16CodeUnit" + ], + "x-ms-enum": { + "name": "StringIndexType", + "modelAsString": true, + "values": [ + { + "name": "TextElements_v8", + "value": "TextElements_v8", + "description": "Returned offset and length values will correspond to TextElements (Graphemes and Grapheme clusters) confirming to the Unicode 8.0.0 standard. Use this option if your application is written in .Net Framework or .Net Core and you will be using StringInfo." + }, + { + "name": "UnicodeCodePoint", + "value": "UnicodeCodePoint", + "description": "Returned offset and length values will correspond to Unicode code points. Use this option if your application is written in a language that support Unicode, for example Python." + }, + { + "name": "Utf16CodeUnit", + "value": "Utf16CodeUnit", + "description": "Returned offset and length values will correspond to UTF-16 code units. Use this option if your application is written in a language that support Unicode, for example Java, JavaScript." + } + ] + } } } }, - "AnalyzeTextEntityLinkingInput": { + "AbstractiveSummary": { "type": "object", + "description": "An object representing a single summary with context for given document.", "properties": { - "analysisInput": { - "$ref": "#/definitions/MultiLanguageAnalysisInput" + "text": { + "type": "string", + "description": "The text of the summary." }, - "parameters": { - "$ref": "#/definitions/EntityLinkingTaskParameters" + "contexts": { + "type": "array", + "description": "The context list of the summary.", + "items": { + "$ref": "#/definitions/SummaryContext" + }, + "x-ms-identifiers": [] } }, - "allOf": [ - { - "$ref": "#/definitions/AnalyzeTextTask" - } - ], - "x-ms-discriminator-value": "EntityLinking" + "required": [ + "text" + ] }, - "AnalyzeTextEntityRecognitionInput": { + "AbstractiveSummaryDocumentResult": { "type": "object", + "description": "An object representing the pre-built Abstractive Summarization results of each document.", "properties": { - "analysisInput": { - "$ref": "#/definitions/MultiLanguageAnalysisInput" - }, - "parameters": { - "$ref": "#/definitions/EntitiesTaskParameters" - } - }, - "allOf": [ - { - "$ref": "#/definitions/AnalyzeTextTask" - } - ], - "x-ms-discriminator-value": "EntityRecognition" - }, - "AnalyzeTextKeyPhraseExtractionInput": { - "type": "object", - "properties": { - "analysisInput": { - "$ref": "#/definitions/MultiLanguageAnalysisInput" + "id": { + "type": "string", + "description": "Unique, non-empty document identifier." }, - "parameters": { - "$ref": "#/definitions/KeyPhraseTaskParameters" + "warnings": { + "type": "array", + "description": "Warnings encountered while processing document.", + "items": { + "$ref": "#/definitions/DocumentWarning" + }, + "x-ms-identifiers": [] + }, + "statistics": { + "$ref": "#/definitions/DocumentStatistics", + "description": "if showStats=true was specified in the request this field will contain information about the document payload." + }, + "summaries": { + "type": "array", + "description": "A list of abstractive summaries.", + "items": { + "$ref": "#/definitions/AbstractiveSummary" + }, + "x-ms-identifiers": [] } }, - "allOf": [ - { - "$ref": "#/definitions/AnalyzeTextTask" - } - ], - "x-ms-discriminator-value": "KeyPhraseExtraction" + "required": [ + "id", + "warnings", + "summaries" + ] }, - "AnalyzeTextPiiEntitiesRecognitionInput": { + "AnalyzeTextEntityLinkingInput": { "type": "object", + "description": "Contains the analyze text Entity linking input.", "properties": { "analysisInput": { - "$ref": "#/definitions/MultiLanguageAnalysisInput" + "$ref": "#/definitions/MultiLanguageAnalysisInput", + "description": "Contains the analysis input to be handled by the service." }, "parameters": { - "$ref": "#/definitions/PiiTaskParameters" + "$ref": "#/definitions/EntityLinkingTaskParameters", + "description": "Task parameters." } }, "allOf": [ @@ -452,16 +484,19 @@ "$ref": "#/definitions/AnalyzeTextTask" } ], - "x-ms-discriminator-value": "PiiEntityRecognition" + "x-ms-discriminator-value": "EntityLinking" }, - "AnalyzeTextLanguageDetectionInput": { + "AnalyzeTextEntityRecognitionInput": { "type": "object", + "description": "The entity recognition analyze text input task request.", "properties": { "analysisInput": { - "$ref": "#/definitions/LanguageDetectionAnalysisInput" + "$ref": "#/definitions/MultiLanguageAnalysisInput", + "description": "The input to be analyzed." }, "parameters": { - "$ref": "#/definitions/LanguageDetectionTaskParameters" + "$ref": "#/definitions/EntitiesTaskParameters", + "description": "Task parameters." } }, "allOf": [ @@ -469,41 +504,88 @@ "$ref": "#/definitions/AnalyzeTextTask" } ], - "x-ms-discriminator-value": "LanguageDetection" + "x-ms-discriminator-value": "EntityRecognition" }, - "AnalyzeTextSentimentAnalysisInput": { + "AnalyzeTextJobState": { "type": "object", + "description": "The object containing the analyze job LRO job state.", "properties": { - "analysisInput": { - "$ref": "#/definitions/MultiLanguageAnalysisInput" + "displayName": { + "type": "string", + "description": "display name" }, - "parameters": { - "$ref": "#/definitions/SentimentAnalysisTaskParameters" + "createdDateTime": { + "type": "string", + "format": "date-time", + "description": "Date and time job created" + }, + "expirationDateTime": { + "type": "string", + "format": "date-time", + "description": "Date and time job expires" + }, + "jobId": { + "$ref": "#/definitions/Azure.Core.uuid", + "description": "job ID", + "readOnly": true + }, + "lastUpdatedDateTime": { + "type": "string", + "format": "date-time", + "description": "last updated date and time" + }, + "status": { + "$ref": "#/definitions/State", + "description": "status" + }, + "errors": { + "type": "array", + "description": "errors", + "items": { + "$ref": "#/definitions/Error" + }, + "x-ms-identifiers": [] + }, + "nextLink": { + "type": "string", + "description": "next link" + }, + "tasks": { + "$ref": "#/definitions/Tasks", + "description": "List of tasks." + }, + "statistics": { + "$ref": "#/definitions/RequestStatistics", + "description": "if showStats=true was specified in the request this field will contain information about the request payload." } }, - "allOf": [ - { - "$ref": "#/definitions/AnalyzeTextTask" - } - ], - "x-ms-discriminator-value": "SentimentAnalysis" + "required": [ + "createdDateTime", + "jobId", + "lastUpdatedDateTime", + "status", + "tasks" + ] }, "AnalyzeTextJobsInput": { "type": "object", + "description": "The input object for the analyze text LRO.", "properties": { "displayName": { - "description": "Optional display name for the analysis job.", - "type": "string" + "type": "string", + "description": "Name for the task." }, "analysisInput": { - "$ref": "#/definitions/MultiLanguageAnalysisInput" + "$ref": "#/definitions/MultiLanguageAnalysisInput", + "description": "Contains the input to be analyzed." }, "tasks": { - "description": "The set of tasks to execute on the input documents.", "type": "array", + "description": "List of tasks to be performed as part of the LRO.", "items": { "$ref": "#/definitions/AnalyzeTextLROTask" - } + }, + "x-ms-identifiers": [] } }, "required": [ @@ -511,198 +593,522 @@ "tasks" ] }, - "TaskIdentifier": { - "type": "object", - "description": "Base task object.", - "properties": { - "taskName": { - "type": "string" - } - } - }, - "TaskParameters": { - "type": "object", - "description": "Base parameters object for a text analysis task.", - "properties": { - "loggingOptOut": { - "type": "boolean", - "default": false - } - } - }, - "PreBuiltTaskParameters": { + "AnalyzeTextKeyPhraseExtractionInput": { "type": "object", - "description": "Parameters object for a text analysis task using pre-built models.", + "description": "Contains the analyze text KeyPhraseExtraction task input.", "properties": { - "modelVersion": { - "type": "string", - "default": "latest" + "analysisInput": { + "$ref": "#/definitions/MultiLanguageAnalysisInput", + "description": "Contains the input documents." + }, + "parameters": { + "$ref": "#/definitions/KeyPhraseTaskParameters", + "description": "Key phrase extraction task parameters." } }, "allOf": [ { - "$ref": "#/definitions/TaskParameters" + "$ref": "#/definitions/AnalyzeTextTask" } - ] + ], + "x-ms-discriminator-value": "KeyPhraseExtraction" }, - "CustomTaskParameters": { + "AnalyzeTextLROResult": { "type": "object", - "description": "Parameters object for a text analysis task using custom models.", + "description": "Contains the AnalyzeText long running operation result object.", "properties": { - "projectName": { + "lastUpdateDateTime": { "type": "string", - "description": "This field indicates the project name for the model." + "format": "date-time", + "description": "The last updated time in UTC for the task." }, - "deploymentName": { + "status": { + "$ref": "#/definitions/State", + "description": "The status of the task at the mentioned last update time." + }, + "taskName": { "type": "string", - "description": "This field indicates the deployment name for the model." + "description": "task name" + }, + "kind": { + "$ref": "#/definitions/AnalyzeTextLROResultsKind", + "description": "Kind of the task." } }, - "allOf": [ - { - "$ref": "#/definitions/TaskParameters" - } - ], + "discriminator": "kind", "required": [ - "projectName", - "deploymentName" + "lastUpdateDateTime", + "status", + "kind" ] }, - "CustomResult": { + "AnalyzeTextLROResultsKind": { + "type": "string", + "description": "The kind of the response object returned by the analyze-text long running task.", + "enum": [ + "SentimentAnalysisLROResults", + "EntityRecognitionLROResults", + "PiiEntityRecognitionLROResults", + "KeyPhraseExtractionLROResults", + "EntityLinkingLROResults", + "HealthcareLROResults", + "CustomEntityRecognitionLROResults", + "CustomSingleLabelClassificationLROResults", + "CustomMultiLabelClassificationLROResults", + "ExtractiveSummarizationLROResults", + "AbstractiveSummarizationLROResults" + ], + "x-ms-enum": { + "name": "AnalyzeTextLROResultsKind", + "modelAsString": true, + "values": [ + { + "name": "SentimentAnalysisLROResults", + "value": "SentimentAnalysisLROResults", + "description": "Sentiment analysis LRO results" + }, + { + "name": "EntityRecognitionLROResults", + "value": "EntityRecognitionLROResults", + "description": "Entity recognition LRO results" + }, + { + "name": "PiiEntityRecognitionLROResults", + "value": "PiiEntityRecognitionLROResults", + "description": "PII entity recognition LRO results" + }, + { + "name": "KeyPhraseExtractionLROResults", + "value": "KeyPhraseExtractionLROResults", + "description": "Key phrase extraction LRO results" + }, + { + "name": "EntityLinkingLROResults", + "value": "EntityLinkingLROResults", + "description": "Entity linking LRO results" + }, + { + "name": "HealthcareLROResults", + "value": "HealthcareLROResults", + "description": "Healthcare LRO results" + }, + { + "name": "CustomEntityRecognitionLROResults", + "value": "CustomEntityRecognitionLROResults", + "description": "Custom entity recognition LRO results" + }, + { + "name": "CustomSingleLabelClassificationLROResults", + "value": "CustomSingleLabelClassificationLROResults", + "description": "Custom single label classification LRO results" + }, + { + "name": "CustomMultiLabelClassificationLROResults", + "value": "CustomMultiLabelClassificationLROResults", + "description": "Custom multi label classification LRO results" + }, + { + "name": "ExtractiveSummarizationLROResults", + "value": "ExtractiveSummarizationLROResults", + "description": "Extractive summarization LRO results" + }, + { + "name": "AbstractiveSummarizationLROResults", + "value": "AbstractiveSummarizationLROResults", + "description": "Abstractive summarization LRO results" + } + ] + } + }, + "AnalyzeTextLROTask": { "type": "object", + "description": "The long running task to be performed by the service on the input documents.", "properties": { - "errors": { - "type": "array", - "description": "Errors by document id.", - "items": { - "$ref": "common.json#/definitions/DocumentError" - } - }, - "statistics": { - "$ref": "common.json#/definitions/RequestStatistics" - }, - "projectName": { + "taskName": { "type": "string", - "description": "This field indicates the project name for the model." + "description": "task name" }, - "deploymentName": { - "type": "string", - "description": "This field indicates the deployment name for the model." + "kind": { + "$ref": "#/definitions/AnalyzeTextLROTaskKind", + "description": "The kind of task to perform." } }, + "discriminator": "kind", "required": [ - "errors", - "projectName", - "deploymentName" + "kind" ] }, - "CustomEntitiesTaskParameters": { + "AnalyzeTextLROTaskKind": { + "type": "string", + "description": "The kind of the long running analyze text tasks supported.", + "enum": [ + "SentimentAnalysis", + "EntityRecognition", + "PiiEntityRecognition", + "KeyPhraseExtraction", + "EntityLinking", + "Healthcare", + "CustomEntityRecognition", + "CustomSingleLabelClassification", + "CustomMultiLabelClassification", + "ExtractiveSummarization", + "AbstractiveSummarization" + ], + "x-ms-enum": { + "name": "AnalyzeTextLROTaskKind", + "modelAsString": true, + "values": [ + { + "name": "SentimentAnalysis", + "value": "SentimentAnalysis", + "description": "Sentiment analysis task" + }, + { + "name": "EntityRecognition", + "value": "EntityRecognition", + "description": "Entity recognition task" + }, + { + "name": "PiiEntityRecognition", + "value": "PiiEntityRecognition", + "description": "PII entity recognition task" + }, + { + "name": "KeyPhraseExtraction", + "value": "KeyPhraseExtraction", + "description": "Key phrase extraction task" + }, + { + "name": "EntityLinking", + "value": "EntityLinking", + "description": "Entity linking task" + }, + { + "name": "Healthcare", + "value": "Healthcare", + "description": "Healthcare task" + }, + { + "name": "CustomEntityRecognition", + "value": "CustomEntityRecognition", + "description": "Custom entity recognition task" + }, + { + "name": "CustomSingleLabelClassification", + "value": "CustomSingleLabelClassification", + "description": "Custom single label classification task" + }, + { + "name": "CustomMultiLabelClassification", + "value": "CustomMultiLabelClassification", + "description": "Custom multi label classification task" + }, + { + "name": "ExtractiveSummarization", + "value": "ExtractiveSummarization", + "description": "Extractive summarization task" + }, + { + "name": "AbstractiveSummarization", + "value": "AbstractiveSummarization", + "description": "Abstractive summarization task" + } + ] + } + }, + "AnalyzeTextLanguageDetectionInput": { "type": "object", - "description": "Supported parameters for a Custom Entities task.", + "description": "Contains the language detection document analysis task input.", "properties": { - "stringIndexType": { - "$ref": "common.json#/definitions/StringIndexType" + "analysisInput": { + "$ref": "#/definitions/LanguageDetectionAnalysisInput", + "description": "Documents to be analyzed." + }, + "parameters": { + "$ref": "#/definitions/LanguageDetectionTaskParameters", + "description": "task parameters." } }, "allOf": [ { - "$ref": "#/definitions/CustomTaskParameters" + "$ref": "#/definitions/AnalyzeTextTask" } - ] + ], + "x-ms-discriminator-value": "LanguageDetection" }, - "CustomEntitiesLROTask": { + "AnalyzeTextPiiEntitiesRecognitionInput": { "type": "object", - "description": "Use custom models to ease the process of information extraction from unstructured documents like contracts or financial documents", + "description": "Contains the analyze text PIIEntityRecognition task input.", "properties": { + "analysisInput": { + "$ref": "#/definitions/MultiLanguageAnalysisInput", + "description": "Contains the input documents." + }, "parameters": { - "$ref": "#/definitions/CustomEntitiesTaskParameters" + "$ref": "#/definitions/PiiTaskParameters", + "description": "Pii task parameters." } }, "allOf": [ { - "$ref": "#/definitions/AnalyzeTextLROTask" + "$ref": "#/definitions/AnalyzeTextTask" } ], - "x-ms-discriminator-value": "CustomEntityRecognition" + "x-ms-discriminator-value": "PiiEntityRecognition" }, - "CustomEntitiesResult": { + "AnalyzeTextSentimentAnalysisInput": { "type": "object", + "description": "Contains the analyze text SentimentAnalysis task input.", "properties": { - "documents": { - "type": "array", - "description": "Response by document", - "items": { - "allOf": [ - { - "$ref": "#/definitions/EntitiesDocumentResult" - } - ] - } + "analysisInput": { + "$ref": "#/definitions/MultiLanguageAnalysisInput", + "description": "Contains the input documents." + }, + "parameters": { + "$ref": "#/definitions/SentimentAnalysisTaskParameters", + "description": "Sentiment Analysis task parameters." } }, "allOf": [ { - "$ref": "#/definitions/CustomResult" + "$ref": "#/definitions/AnalyzeTextTask" } ], - "required": [ - "documents" - ] + "x-ms-discriminator-value": "SentimentAnalysis" }, - "CustomSingleLabelClassificationTaskParameters": { + "AnalyzeTextTask": { "type": "object", - "description": "Supported parameters for a Custom Single Classification task.", - "allOf": [ - { - "$ref": "#/definitions/CustomTaskParameters" + "description": "Collection of documents to analyze and a single task to execute.", + "properties": { + "kind": { + "$ref": "#/definitions/AnalyzeTextTaskKind", + "description": "The kind of task to perform." } + }, + "discriminator": "kind", + "required": [ + "kind" ] }, - "CustomSingleLabelClassificationLROTask": { + "AnalyzeTextTaskKind": { + "type": "string", + "description": "The kind of the analyze-text tasks supported.", + "enum": [ + "SentimentAnalysis", + "EntityRecognition", + "PiiEntityRecognition", + "KeyPhraseExtraction", + "LanguageDetection", + "EntityLinking" + ], + "x-ms-enum": { + "name": "AnalyzeTextTaskKind", + "modelAsString": true, + "values": [ + { + "name": "SentimentAnalysis", + "value": "SentimentAnalysis", + "description": "Sentiment analysis task" + }, + { + "name": "EntityRecognition", + "value": "EntityRecognition", + "description": "Entity recognition task" + }, + { + "name": "PiiEntityRecognition", + "value": "PiiEntityRecognition", + "description": "PII entity recognition task" + }, + { + "name": "KeyPhraseExtraction", + "value": "KeyPhraseExtraction", + "description": "Key phrase extraction task" + }, + { + "name": "LanguageDetection", + "value": "LanguageDetection", + "description": "Language detection task" + }, + { + "name": "EntityLinking", + "value": "EntityLinking", + "description": "Entity linking task" + } + ] + } + }, + "AnalyzeTextTaskResult": { "type": "object", - "description": "Use custom models to classify text into single label taxonomy", + "description": "The result object for the analyze task.", "properties": { - "parameters": { - "$ref": "#/definitions/CustomSingleLabelClassificationTaskParameters" + "kind": { + "$ref": "#/definitions/AnalyzeTextTaskResultsKind", + "description": "The kind of task result." } }, - "allOf": [ - { - "$ref": "#/definitions/AnalyzeTextLROTask" - } + "discriminator": "kind", + "required": [ + "kind" + ] + }, + "AnalyzeTextTaskResultsKind": { + "type": "string", + "description": "The kind of the response object returned by the analyze-text task.", + "enum": [ + "SentimentAnalysisResults", + "EntityRecognitionResults", + "PiiEntityRecognitionResults", + "KeyPhraseExtractionResults", + "LanguageDetectionResults", + "EntityLinkingResults" ], - "x-ms-discriminator-value": "CustomSingleLabelClassification" + "x-ms-enum": { + "name": "AnalyzeTextTaskResultsKind", + "modelAsString": true, + "values": [ + { + "name": "SentimentAnalysisResults", + "value": "SentimentAnalysisResults", + "description": "Sentiment analysis results" + }, + { + "name": "EntityRecognitionResults", + "value": "EntityRecognitionResults", + "description": "Entity recognition results" + }, + { + "name": "PiiEntityRecognitionResults", + "value": "PiiEntityRecognitionResults", + "description": "PII entity recognition results" + }, + { + "name": "KeyPhraseExtractionResults", + "value": "KeyPhraseExtractionResults", + "description": "Key phrase extraction results" + }, + { + "name": "LanguageDetectionResults", + "value": "LanguageDetectionResults", + "description": "Language detection results" + }, + { + "name": "EntityLinkingResults", + "value": "EntityLinkingResults", + "description": "Entity linking results" + } + ] + } }, - "CustomLabelClassificationResult": { + "Association": { + "type": "string", + "description": "Describes if the entity is the subject of the text or if it describes someone else.", + "enum": [ + "subject", + "other" + ], + "x-ms-enum": { + "name": "Association", + "modelAsString": false, + "values": [ + { + "name": "subject", + "value": "subject", + "description": "Subject association" + }, + { + "name": "other", + "value": "other", + "description": "Other association" + } + ] + } + }, + "Azure.Core.uuid": { + "type": "string", + "format": "uuid", + "description": "Universally Unique Identifier" + }, + "Certainty": { + "type": "string", + "description": "Describes the entities certainty and polarity.", + "enum": [ + "positive", + "positivePossible", + "neutralPossible", + "negativePossible", + "negative" + ], + "x-ms-enum": { + "name": "Certainty", + "modelAsString": false, + "values": [ + { + "name": "positive", + "value": "positive", + "description": "Positive certainty" + }, + { + "name": "positivePossible", + "value": "positivePossible", + "description": "Possibly positive certainty" + }, + { + "name": "neutralPossible", + "value": "neutralPossible", + "description": "Possibly neutral certainty" + }, + { + "name": "negativePossible", + "value": "negativePossible", + "description": "Possibly negative certainty" + }, + { + "name": "negative", + "value": "negative", + "description": "Negative certainty" + } + ] + } + }, + "ClassificationDocumentResult": { "type": "object", + "description": "Contains the classification doc result for the task.", "properties": { - "documents": { + "id": { + "type": "string", + "description": "Unique, non-empty document identifier." + }, + "warnings": { "type": "array", - "description": "Response by document", + "description": "Warnings encountered while processing document.", "items": { - "allOf": [ - { - "$ref": "#/definitions/ClassificationDocumentResult" - } - ] - } + "$ref": "#/definitions/DocumentWarning" + }, + "x-ms-identifiers": [] + }, + "statistics": { + "$ref": "#/definitions/DocumentStatistics", + "description": "if showStats=true was specified in the request this field will contain information about the document payload." + }, + "class": { + "type": "array", + "description": "Contains the classification doc results for all docs.", + "items": { + "$ref": "#/definitions/ClassificationResult" + }, + "x-ms-identifiers": [] } }, - "allOf": [ - { - "$ref": "#/definitions/CustomResult" - } - ], "required": [ - "documents" + "id", + "warnings", + "class" ] }, "ClassificationResult": { "type": "object", - "required": [ - "category", - "confidenceScore" - ], + "description": "Contains the classification result.", "properties": { "category": { "type": "string", @@ -713,23 +1119,43 @@ "format": "double", "description": "Confidence score between 0 and 1 of the recognized class." } - } - }, - "CustomMultiLabelClassificationTaskParameters": { - "type": "object", - "description": "Supported parameters for a Custom Multi Classification task.", - "allOf": [ - { - "$ref": "#/definitions/CustomTaskParameters" - } + }, + "required": [ + "category", + "confidenceScore" ] }, - "CustomMultiLabelClassificationLROTask": { + "Conditionality": { + "type": "string", + "description": "Describes any conditionality on the entity.", + "enum": [ + "hypothetical", + "conditional" + ], + "x-ms-enum": { + "name": "Conditionality", + "modelAsString": false, + "values": [ + { + "name": "hypothetical", + "value": "hypothetical", + "description": "Hypothetical conditionality" + }, + { + "name": "conditional", + "value": "conditional", + "description": "Conditional conditionality" + } + ] + } + }, + "CustomEntitiesLROTask": { "type": "object", - "description": "Use custom models to classify text into multi label taxonomy", + "description": "Contains the custom text LRO task.", "properties": { "parameters": { - "$ref": "#/definitions/CustomMultiLabelClassificationTaskParameters" + "$ref": "#/definitions/CustomEntitiesTaskParameters", + "description": "task parameters." } }, "allOf": [ @@ -737,787 +1163,546 @@ "$ref": "#/definitions/AnalyzeTextLROTask" } ], - "x-ms-discriminator-value": "CustomMultiLabelClassification" + "x-ms-discriminator-value": "CustomEntityRecognition" }, - "ClassificationDocumentResult": { + "CustomEntitiesResult": { "type": "object", + "description": "Contains the list of detected custom entities result for the documents.", "properties": { - "class": { + "errors": { "type": "array", + "description": "Errors by document id.", "items": { - "$ref": "#/definitions/ClassificationResult" + "$ref": "#/definitions/DocumentError" + } + }, + "statistics": { + "$ref": "#/definitions/RequestStatistics", + "description": "if showStats=true was specified in the request this field will contain information about the request payload." + }, + "projectName": { + "type": "string", + "description": "This field indicates the project name for the model." + }, + "deploymentName": { + "type": "string", + "description": "This field indicates the deployment name for the model." + }, + "documents": { + "type": "array", + "description": "Enumeration of the document results.", + "items": { + "$ref": "#/definitions/EntitiesDocumentResult" } } }, - "allOf": [ - { - "$ref": "#/definitions/DocumentResult" - } - ], "required": [ - "class" + "errors", + "projectName", + "deploymentName", + "documents" ] }, - "HealthcareTaskParameters": { + "CustomEntitiesTaskParameters": { "type": "object", - "description": "Supported parameters for a Healthcare task.", + "description": "Supported parameters for a Custom Entities task.", "properties": { + "loggingOptOut": { + "type": "boolean", + "description": "logging opt out", + "default": false + }, + "projectName": { + "type": "string", + "description": "This field indicates the project name for the model." + }, + "deploymentName": { + "type": "string", + "description": "This field indicates the deployment name for the model." + }, "stringIndexType": { - "$ref": "common.json#/definitions/StringIndexType" - } - }, - "allOf": [ - { - "$ref": "#/definitions/PreBuiltTaskParameters" - } - ] - }, - "HealthcareLROTask": { - "type": "object", - "properties": { - "parameters": { - "$ref": "#/definitions/HealthcareTaskParameters" - } - }, - "allOf": [ - { - "$ref": "#/definitions/AnalyzeTextLROTask" - } - ], - "x-ms-discriminator-value": "Healthcare" - }, - "HealthcareResult": { - "type": "object", - "properties": { - "documents": { - "type": "array", - "items": { - "allOf": [ + "type": "string", + "description": "Optional parameter to provide the string index type used to interpret string offsets. Defaults to TextElements (Graphemes).", + "default": "TextElements_v8", + "enum": [ + "TextElements_v8", + "UnicodeCodePoint", + "Utf16CodeUnit" + ], + "x-ms-enum": { + "name": "StringIndexType", + "modelAsString": true, + "values": [ + { + "name": "TextElements_v8", + "value": "TextElements_v8", + "description": "Returned offset and length values will correspond to TextElements (Graphemes and Grapheme clusters) confirming to the Unicode 8.0.0 standard. Use this option if your application is written in .Net Framework or .Net Core and you will be using StringInfo." + }, { - "$ref": "#/definitions/HealthcareEntitiesDocumentResult" + "name": "UnicodeCodePoint", + "value": "UnicodeCodePoint", + "description": "Returned offset and length values will correspond to Unicode code points. Use this option if your application is written in a language that support Unicode, for example Python." + }, + { + "name": "Utf16CodeUnit", + "value": "Utf16CodeUnit", + "description": "Returned offset and length values will correspond to UTF-16 code units. Use this option if your application is written in a language that support Unicode, for example Java, JavaScript." } ] } } }, - "allOf": [ - { - "$ref": "common.json#/definitions/PreBuiltResult" - } - ], "required": [ - "documents" + "projectName", + "deploymentName" ] }, - "HealthcareEntitiesDocumentResult": { + "CustomEntityRecognitionLROResult": { "type": "object", + "description": "Contains the custom entity recognition job result.", "properties": { - "entities": { - "description": "Healthcare entities.", - "type": "array", - "items": { - "$ref": "#/definitions/HealthcareEntity" - } - }, - "relations": { - "type": "array", - "description": "Healthcare entity relations.", - "items": { - "$ref": "#/definitions/HealthcareRelation" - } + "results": { + "$ref": "#/definitions/CustomEntitiesResult", + "description": "List of results." } }, + "required": [ + "results" + ], "allOf": [ { - "$ref": "#/definitions/DocumentResult" + "$ref": "#/definitions/AnalyzeTextLROResult" } ], - "required": [ - "entities", - "relations" - ] + "x-ms-discriminator-value": "CustomEntityRecognitionLROResults" }, - "HealthcareEntity": { + "CustomLabelClassificationResult": { "type": "object", + "description": "Contains the custom label classification results.", "properties": { - "text": { - "type": "string", - "description": "Entity text as appears in the request." + "errors": { + "type": "array", + "description": "Errors by document id.", + "items": { + "$ref": "#/definitions/DocumentError" + } }, - "category": { - "x-ms-enum": { - "name": "healthcareEntityCategory", - "modelAsString": true - }, - "type": "string", - "description": "Healthcare Entity Category.", - "enum": [ - "BodyStructure", - "Age", - "Gender", - "Ethnicity", - "ExaminationName", - "Date", - "Direction", - "Frequency", - "MeasurementValue", - "MeasurementUnit", - "RelationalOperator", - "Time", - "Course", - "GeneOrProtein", - "Variant", - "Expression", - "MutationType", - "AdministrativeEvent", - "CareEnvironment", - "HealthcareProfession", - "Diagnosis", - "SymptomOrSign", - "ConditionQualifier", - "ConditionScale", - "MedicationClass", - "MedicationName", - "Dosage", - "MedicationForm", - "MedicationRoute", - "FamilyRelation", - "TreatmentName", - "Allergen", - "Employment", - "LivingStatus", - "SubstanceUse", - "SubstanceUseAmount" - ] + "statistics": { + "$ref": "#/definitions/RequestStatistics", + "description": "if showStats=true was specified in the request this field will contain information about the request payload." }, - "subcategory": { + "projectName": { "type": "string", - "description": "(Optional) Entity sub type." - }, - "offset": { - "type": "integer", - "format": "int32", - "description": "Start position for the entity text. Use of different 'stringIndexType' values can affect the offset returned." - }, - "length": { - "type": "integer", - "format": "int32", - "description": "Length for the entity text. Use of different 'stringIndexType' values can affect the length returned." - }, - "confidenceScore": { - "type": "number", - "format": "double", - "description": "Confidence score between 0 and 1 of the extracted entity." - }, - "assertion": { - "type": "object", - "$ref": "#/definitions/HealthcareAssertion" + "description": "This field indicates the project name for the model." }, - "name": { - "description": "Preferred name for the entity. Example: 'histologically' would have a 'name' of 'histologic'.", - "type": "string" + "deploymentName": { + "type": "string", + "description": "This field indicates the deployment name for the model." }, - "links": { - "description": "Entity references in known data sources.", + "documents": { "type": "array", + "description": "Response by document", "items": { - "$ref": "#/definitions/HealthcareEntityLink" + "$ref": "#/definitions/ClassificationDocumentResult" } } }, "required": [ - "text", - "category", - "offset", - "length", - "confidenceScore" + "errors", + "projectName", + "deploymentName", + "documents" ] }, - "HealthcareRelation": { - "type": "object", - "description": "Every relation is an entity graph of a certain relationType, where all entities are connected and have specific roles within the relation context.", - "required": [ - "relationType", - "entities" - ], - "properties": { - "relationType": { - "description": "Type of relation. Examples include: `DosageOfMedication` or 'FrequencyOfMedication', etc.", - "type": "string", - "enum": [ - "Abbreviation", - "BodySiteOfCondition", - "BodySiteOfTreatment", - "CourseOfCondition", - "CourseOfExamination", - "CourseOfMedication", - "CourseOfTreatment", - "DirectionOfBodyStructure", - "DirectionOfCondition", - "DirectionOfExamination", - "DirectionOfTreatment", - "DosageOfMedication", - "ExaminationFindsCondition", - "ExpressionOfGene", - "ExpressionOfVariant", - "FormOfMedication", - "FrequencyOfCondition", - "FrequencyOfMedication", - "FrequencyOfTreatment", - "MutationTypeOfGene", - "MutationTypeOfVariant", - "QualifierOfCondition", - "RelationOfExamination", - "RouteOfMedication", - "ScaleOfCondition", - "TimeOfCondition", - "TimeOfEvent", - "TimeOfExamination", - "TimeOfMedication", - "TimeOfTreatment", - "UnitOfCondition", - "UnitOfExamination", - "ValueOfCondition", - "ValueOfExamination", - "VariantOfGene" - ], - "x-ms-enum": { - "name": "relationType", - "modelAsString": true - } - }, - "confidenceScore": { - "type": "number", - "format": "double", - "description": "Confidence score between 0 and 1 of the extracted relation." - }, - "entities": { - "description": "The entities in the relation.", - "type": "array", - "items": { - "$ref": "#/definitions/HealthcareRelationEntity" - } - } - } - }, - "HealthcareAssertion": { + "CustomMultiLabelClassificationLROResult": { "type": "object", + "description": "Contains the custom multi label classification job result.", "properties": { - "conditionality": { - "description": "Describes any conditionality on the entity.", - "type": "string", - "enum": [ - "hypothetical", - "conditional" - ], - "x-ms-enum": { - "name": "Conditionality", - "modelAsString": false - } - }, - "certainty": { - "description": "Describes the entities certainty and polarity.", - "type": "string", - "enum": [ - "positive", - "positivePossible", - "neutralPossible", - "negativePossible", - "negative" - ], - "x-ms-enum": { - "name": "Certainty", - "modelAsString": false - } - }, - "association": { - "description": "Describes if the entity is the subject of the text or if it describes someone else.", - "type": "string", - "enum": [ - "subject", - "other" - ], - "x-ms-enum": { - "name": "Association", - "modelAsString": false - } + "results": { + "$ref": "#/definitions/CustomLabelClassificationResult", + "description": "List of results." } - } - }, - "HealthcareRelationEntity": { - "type": "object", + }, "required": [ - "ref", - "role" + "results" ], - "properties": { - "ref": { - "description": "Reference link object, using a JSON pointer RFC 6901 (URI Fragment Identifier Representation), pointing to the entity .", - "type": "string" - }, - "role": { - "description": "Role of entity in the relationship. For example: 'CD20-positive diffuse large B-cell lymphoma' has the following entities with their roles in parenthesis: CD20 (GeneOrProtein), Positive (Expression), diffuse large B-cell lymphoma (Diagnosis).", - "type": "string" + "allOf": [ + { + "$ref": "#/definitions/AnalyzeTextLROResult" } - } + ], + "x-ms-discriminator-value": "CustomMultiLabelClassificationLROResults" }, - "HealthcareEntityLink": { + "CustomMultiLabelClassificationLROTask": { "type": "object", - "required": [ - "dataSource", - "id" - ], + "description": "Use custom models to classify text into multi label taxonomy", "properties": { - "dataSource": { - "description": "Entity Catalog. Examples include: UMLS, CHV, MSH, etc.", - "type": "string" - }, - "id": { - "description": "Entity id in the given source catalog.", - "type": "string" + "parameters": { + "$ref": "#/definitions/CustomMultiLabelClassificationTaskParameters", + "description": "Task parameters." } - } + }, + "allOf": [ + { + "$ref": "#/definitions/AnalyzeTextLROTask" + } + ], + "x-ms-discriminator-value": "CustomMultiLabelClassification" }, - "SentimentAnalysisTaskParameters": { + "CustomMultiLabelClassificationTaskParameters": { "type": "object", - "description": "Supported parameters for a Sentiment Analysis task.", + "description": "Supported parameters for a Custom Multi Classification task.", "properties": { - "opinionMining": { + "loggingOptOut": { "type": "boolean", + "description": "logging opt out", "default": false }, - "stringIndexType": { - "$ref": "common.json#/definitions/StringIndexType" + "projectName": { + "type": "string", + "description": "This field indicates the project name for the model." + }, + "deploymentName": { + "type": "string", + "description": "This field indicates the deployment name for the model." } }, - "allOf": [ - { - "$ref": "#/definitions/PreBuiltTaskParameters" - } + "required": [ + "projectName", + "deploymentName" ] }, - "SentimentAnalysisLROTask": { + "CustomSingleLabelClassificationLROResult": { "type": "object", - "description": "An object representing the task definition for a Sentiment Analysis task.", + "description": "Contains the custom single label classification job result.", "properties": { - "parameters": { - "$ref": "#/definitions/SentimentAnalysisTaskParameters" + "results": { + "$ref": "#/definitions/CustomLabelClassificationResult", + "description": "List of results." } }, + "required": [ + "results" + ], "allOf": [ { - "$ref": "#/definitions/AnalyzeTextLROTask" + "$ref": "#/definitions/AnalyzeTextLROResult" } ], - "x-ms-discriminator-value": "SentimentAnalysis" + "x-ms-discriminator-value": "CustomSingleLabelClassificationLROResults" }, - "SentimentTaskResult": { + "CustomSingleLabelClassificationLROTask": { "type": "object", + "description": "Use custom models to classify text into single label taxonomy", "properties": { - "results": { - "$ref": "#/definitions/SentimentResponse" + "parameters": { + "$ref": "#/definitions/CustomSingleLabelClassificationTaskParameters", + "description": "Task parameters" } }, "allOf": [ { - "$ref": "#/definitions/AnalyzeTextTaskResult" + "$ref": "#/definitions/AnalyzeTextLROTask" } ], - "required": [ - "results" - ], - "x-ms-discriminator-value": "SentimentAnalysisResults" + "x-ms-discriminator-value": "CustomSingleLabelClassification" }, - "SentimentResponse": { + "CustomSingleLabelClassificationTaskParameters": { "type": "object", + "description": "Supported parameters for a Custom Single Classification task.", "properties": { - "documents": { - "type": "array", - "description": "Sentiment analysis per document.", - "items": { - "allOf": [ - { - "$ref": "#/definitions/SentimentDocumentResult" - } - ] - } + "loggingOptOut": { + "type": "boolean", + "description": "logging opt out", + "default": false + }, + "projectName": { + "type": "string", + "description": "This field indicates the project name for the model." + }, + "deploymentName": { + "type": "string", + "description": "This field indicates the deployment name for the model." } }, - "allOf": [ - { - "$ref": "common.json#/definitions/PreBuiltResult" - } - ], "required": [ - "documents" + "projectName", + "deploymentName" ] }, - "SentimentDocumentResult": { + "DetectedLanguage": { "type": "object", + "description": "Contains the details of the detected language for the text.", "properties": { - "sentiment": { + "name": { "type": "string", - "description": "Predicted sentiment for document (Negative, Neutral, Positive, or Mixed).", - "enum": [ - "positive", - "neutral", - "negative", - "mixed" - ], - "x-ms-enum": { - "name": "DocumentSentimentValue", - "modelAsString": false - } + "description": "Long name of a detected language (e.g. English, French)." }, - "confidenceScores": { - "description": "Document level sentiment confidence scores between 0 and 1 for each sentiment class.", - "$ref": "#/definitions/SentimentConfidenceScorePerLabel" + "iso6391Name": { + "type": "string", + "description": "A two letter representation of the detected language according to the ISO 639-1 standard (e.g. en, fr)." }, - "sentences": { - "type": "array", - "description": "Sentence level sentiment analysis.", - "items": { - "$ref": "#/definitions/SentenceSentiment" - } + "confidenceScore": { + "type": "number", + "format": "double", + "description": "A confidence score between 0 and 1. Scores close to 1 indicate 100% certainty that the identified language is true." } }, - "allOf": [ - { - "$ref": "#/definitions/DocumentResult" - } - ], "required": [ - "sentiment", - "confidenceScores", - "sentences" + "name", + "iso6391Name", + "confidenceScore" ] }, - "SentimentConfidenceScorePerLabel": { + "DocumentError": { "type": "object", + "description": "Contains details of errors encountered during a job execution.", + "properties": { + "id": { + "type": "string", + "description": "The ID of the input document." + }, + "error": { + "$ref": "#/definitions/Error", + "description": "Error encountered." + } + }, "required": [ + "id", + "error" + ] + }, + "DocumentSentimentValue": { + "type": "string", + "description": "Predicted sentiment for document (Negative, Neutral, Positive, or Mixed).", + "enum": [ "positive", "neutral", - "negative" + "negative", + "mixed" ], + "x-ms-enum": { + "name": "DocumentSentimentValue", + "modelAsString": false, + "values": [ + { + "name": "positive", + "value": "positive", + "description": "Positive statement" + }, + { + "name": "neutral", + "value": "neutral", + "description": "Neutral statement" + }, + { + "name": "negative", + "value": "negative", + "description": "Negative statement" + }, + { + "name": "mixed", + "value": "mixed", + "description": "Mixed statement" + } + ] + } + }, + "DocumentStatistics": { + "type": "object", + "description": "if showStats=true was specified in the request this field will contain information about the document payload.", "properties": { - "positive": { - "type": "number", - "format": "double", - "description": "Confidence score for positive sentiment" - }, - "neutral": { - "type": "number", - "format": "double", - "description": "Confidence score for neutral sentiment" + "charactersCount": { + "type": "integer", + "format": "int32", + "description": "Number of text elements recognized in the document." }, - "negative": { - "type": "number", - "format": "double", - "description": "Confidence score for negative sentiment" + "transactionsCount": { + "type": "integer", + "format": "int32", + "description": "Number of transactions for the document." } }, - "description": "Represents the confidence scores between 0 and 1 across all sentiment classes: positive, neutral, negative." + "required": [ + "charactersCount", + "transactionsCount" + ] }, - "SentenceSentiment": { + "DocumentWarning": { "type": "object", - "required": [ - "text", - "sentiment", - "confidenceScores", - "offset", - "length" - ], + "description": "Contains the warnings object with warnings encountered for the processed document.", "properties": { - "text": { - "type": "string", - "description": "The sentence text." + "code": { + "$ref": "#/definitions/WarningCodeValue", + "description": "Warning code." }, - "sentiment": { + "message": { "type": "string", - "description": "The predicted Sentiment for the sentence.", - "enum": [ - "positive", - "neutral", - "negative" - ], - "x-ms-enum": { - "name": "SentenceSentimentValue", - "modelAsString": false - } - }, - "confidenceScores": { - "description": "The sentiment confidence score between 0 and 1 for the sentence for all classes.", - "$ref": "#/definitions/SentimentConfidenceScorePerLabel" - }, - "offset": { - "type": "integer", - "format": "int32", - "description": "The sentence offset from the start of the document." + "description": "Warning message." }, - "length": { - "type": "integer", - "format": "int32", - "description": "The length of the sentence." + "targetRef": { + "type": "string", + "description": "A JSON pointer reference indicating the target object." + } + }, + "required": [ + "code", + "message" + ] + }, + "EntitiesDocumentResult": { + "type": "object", + "description": "Contains the entity recognition task result for the document.", + "properties": { + "id": { + "type": "string", + "description": "Unique, non-empty document identifier." }, - "targets": { + "warnings": { "type": "array", - "description": "The array of sentence targets for the sentence.", + "description": "Warnings encountered while processing document.", "items": { - "$ref": "#/definitions/SentenceTarget" - } + "$ref": "#/definitions/DocumentWarning" + }, + "x-ms-identifiers": [] }, - "assessments": { + "statistics": { + "$ref": "#/definitions/DocumentStatistics", + "description": "if showStats=true was specified in the request this field will contain information about the document payload." + }, + "entities": { "type": "array", - "description": "The array of assessments for the sentence.", + "description": "Recognized entities in the document.", "items": { - "$ref": "#/definitions/SentenceAssessment" - } + "$ref": "#/definitions/Entity" + }, + "x-ms-identifiers": [] } - } + }, + "required": [ + "id", + "warnings", + "entities" + ] }, - "SentenceTarget": { + "EntitiesLROTask": { "type": "object", - "required": [ - "confidenceScores", - "length", - "offset", - "relations", - "sentiment", - "text" + "description": "An object representing the task definition for an Entities Recognition task.", + "properties": { + "parameters": { + "$ref": "#/definitions/EntitiesTaskParameters", + "description": "Task parameters." + } + }, + "allOf": [ + { + "$ref": "#/definitions/AnalyzeTextLROTask" + } ], + "x-ms-discriminator-value": "EntityRecognition" + }, + "EntitiesResult": { + "type": "object", + "description": "Contains the entity recognition task result.", "properties": { - "sentiment": { - "type": "string", - "enum": [ - "positive", - "mixed", - "negative" - ], - "x-ms-enum": { - "name": "TokenSentimentValue", - "modelAsString": false - }, - "description": "Targeted sentiment in the sentence." - }, - "confidenceScores": { - "description": "Target sentiment confidence scores for the target in the sentence.", - "$ref": "#/definitions/TargetConfidenceScoreLabel" - }, - "offset": { - "type": "integer", - "format": "int32", - "description": "The target offset from the start of the sentence." + "errors": { + "type": "array", + "description": "Errors by document id.", + "items": { + "$ref": "#/definitions/DocumentError" + } }, - "length": { - "type": "integer", - "format": "int32", - "description": "The length of the target." + "statistics": { + "$ref": "#/definitions/RequestStatistics", + "description": "if showStats=true was specified in the request this field will contain information about the request payload." }, - "text": { + "modelVersion": { "type": "string", - "description": "The target text detected." + "description": "This field indicates which model is used for scoring." }, - "relations": { + "documents": { "type": "array", - "description": "The array of either assessment or target objects which is related to the target.", + "description": "Response by document", "items": { - "$ref": "#/definitions/TargetRelation" + "$ref": "#/definitions/EntitiesDocumentResult" } } - } + }, + "required": [ + "errors", + "modelVersion", + "documents" + ] }, - "SentenceAssessment": { + "EntitiesTaskParameters": { "type": "object", - "required": [ - "confidenceScores", - "isNegated", - "length", - "offset", - "sentiment", - "text" - ], + "description": "Supported parameters for an Entity Recognition task.", "properties": { - "sentiment": { + "loggingOptOut": { + "type": "boolean", + "description": "logging opt out", + "default": false + }, + "modelVersion": { + "type": "string", + "description": "model version", + "default": "latest" + }, + "stringIndexType": { "type": "string", + "description": "(Optional) parameter to provide the string index type used to interpret string offsets. Defaults to TextElements (Graphemes).", + "default": "TextElements_v8", "enum": [ - "positive", - "mixed", - "negative" + "TextElements_v8", + "UnicodeCodePoint", + "Utf16CodeUnit" ], "x-ms-enum": { - "name": "TokenSentimentValue", - "modelAsString": false - }, - "description": "Assessment sentiment in the sentence." - }, - "confidenceScores": { - "description": "Assessment sentiment confidence scores in the sentence.", - "$ref": "#/definitions/TargetConfidenceScoreLabel" - }, - "offset": { - "type": "integer", - "format": "int32", - "description": "The assessment offset from the start of the sentence." - }, - "length": { - "type": "integer", - "format": "int32", - "description": "The length of the assessment." - }, - "text": { - "type": "string", - "description": "The assessment text detected." - }, - "isNegated": { - "type": "boolean", - "description": "The indicator representing if the assessment is negated." - } - } - }, - "TargetRelation": { - "type": "object", - "required": [ - "ref", - "relationType" - ], - "properties": { - "relationType": { - "type": "string", - "enum": [ - "assessment", - "target" - ], - "x-ms-enum": { - "name": "TargetRelationType", - "modelAsString": false - }, - "description": "The type related to the target." - }, - "ref": { - "type": "string", - "description": "The JSON pointer indicating the linked object." + "name": "StringIndexType", + "modelAsString": true, + "values": [ + { + "name": "TextElements_v8", + "value": "TextElements_v8", + "description": "Returned offset and length values will correspond to TextElements (Graphemes and Grapheme clusters) confirming to the Unicode 8.0.0 standard. Use this option if your application is written in .Net Framework or .Net Core and you will be using StringInfo." + }, + { + "name": "UnicodeCodePoint", + "value": "UnicodeCodePoint", + "description": "Returned offset and length values will correspond to Unicode code points. Use this option if your application is written in a language that support Unicode, for example Python." + }, + { + "name": "Utf16CodeUnit", + "value": "Utf16CodeUnit", + "description": "Returned offset and length values will correspond to UTF-16 code units. Use this option if your application is written in a language that support Unicode, for example Java, JavaScript." + } + ] + } } } }, - "TargetConfidenceScoreLabel": { - "type": "object", - "required": [ - "negative", - "positive" - ], - "properties": { - "positive": { - "type": "number", - "format": "double", - "description": "Confidence score for positive sentiment" - }, - "negative": { - "type": "number", - "format": "double", - "description": "Confidence score for negative sentiment" - } - }, - "description": "Represents the confidence scores across all sentiment classes: positive and negative." - }, - "EntitiesTaskParameters": { - "type": "object", - "description": "Supported parameters for an Entity Recognition task.", - "properties": { - "stringIndexType": { - "$ref": "common.json#/definitions/StringIndexType" - } - }, - "allOf": [ - { - "$ref": "#/definitions/PreBuiltTaskParameters" - } - ] - }, - "EntitiesLROTask": { - "type": "object", - "description": "An object representing the task definition for an Entities Recognition task.", - "properties": { - "parameters": { - "$ref": "#/definitions/EntitiesTaskParameters" - } - }, - "allOf": [ - { - "$ref": "#/definitions/AnalyzeTextLROTask" - } - ], - "x-ms-discriminator-value": "EntityRecognition" - }, "EntitiesTaskResult": { "type": "object", + "description": "Contains the entity task", "properties": { "results": { - "$ref": "#/definitions/EntitiesResult" + "$ref": "#/definitions/EntitiesResult", + "description": "Results for entity recognition." } }, - "allOf": [ - { - "$ref": "#/definitions/AnalyzeTextTaskResult" - } - ], "required": [ "results" ], - "x-ms-discriminator-value": "EntityRecognitionResults" - }, - "EntitiesResult": { - "type": "object", - "properties": { - "documents": { - "type": "array", - "description": "Response by document", - "items": { - "allOf": [ - { - "$ref": "#/definitions/EntitiesDocumentResult" - } - ] - } - } - }, - "allOf": [ - { - "$ref": "common.json#/definitions/PreBuiltResult" - } - ], - "required": [ - "documents" - ] - }, - "EntitiesDocumentResult": { - "type": "object", - "properties": { - "entities": { - "type": "array", - "description": "Recognized entities in the document.", - "items": { - "$ref": "#/definitions/Entity" - } - } - }, "allOf": [ { - "$ref": "#/definitions/DocumentResult" + "$ref": "#/definitions/AnalyzeTextTaskResult" } ], - "required": [ - "entities" - ] + "x-ms-discriminator-value": "EntityRecognitionResults" }, "Entity": { "type": "object", - "required": [ - "text", - "category", - "offset", - "length", - "confidenceScore" - ], + "description": "Defines the detected entity object containing the entity category and entity text detected, etc.", "properties": { "text": { "type": "string", @@ -1546,28 +1731,41 @@ "format": "double", "description": "Confidence score between 0 and 1 of the extracted entity." } - } + }, + "required": [ + "text", + "category", + "offset", + "length", + "confidenceScore" + ] }, - "EntityLinkingTaskParameters": { + "EntityLinkingLROResult": { "type": "object", - "description": "Supported parameters for an Entity Linking task.", + "description": "Contains the analyze text Entity linking task LRO result.", "properties": { - "stringIndexType": { - "$ref": "common.json#/definitions/StringIndexType" + "results": { + "$ref": "#/definitions/EntityLinkingResult", + "description": "Entity linking result." } }, + "required": [ + "results" + ], "allOf": [ { - "$ref": "#/definitions/PreBuiltTaskParameters" + "$ref": "#/definitions/AnalyzeTextLROResult" } - ] + ], + "x-ms-discriminator-value": "EntityLinkingLROResults" }, "EntityLinkingLROTask": { "type": "object", - "description": "An object representing the task definition for an Entity Linking task.", + "description": "Contains the analyze text Entity linking LRO task.", "properties": { "parameters": { - "$ref": "#/definitions/EntityLinkingTaskParameters" + "$ref": "#/definitions/EntityLinkingTaskParameters", + "description": "Task parameters." } }, "allOf": [ @@ -1577,489 +1775,383 @@ ], "x-ms-discriminator-value": "EntityLinking" }, - "EntityLinkingTaskResult": { + "EntityLinkingResult": { "type": "object", + "description": "Entity linking result.", "properties": { - "results": { - "$ref": "#/definitions/EntityLinkingResult" + "errors": { + "type": "array", + "description": "Errors by document id.", + "items": { + "$ref": "#/definitions/DocumentError" + } + }, + "statistics": { + "$ref": "#/definitions/RequestStatistics", + "description": "if showStats=true was specified in the request this field will contain information about the request payload." + }, + "modelVersion": { + "type": "string", + "description": "This field indicates which model is used for scoring." + }, + "documents": { + "type": "array", + "description": "Response by document", + "items": { + "$ref": "#/definitions/LinkedEntitiesDocumentResult" + } } }, - "allOf": [ - { - "$ref": "#/definitions/AnalyzeTextTaskResult" - } - ], "required": [ - "results" - ], - "x-ms-discriminator-value": "EntityLinkingResults" + "errors", + "modelVersion", + "documents" + ] }, - "EntityLinkingResult": { + "EntityLinkingTaskParameters": { "type": "object", + "description": "Supported parameters for an Entity Linking task.", "properties": { - "documents": { - "type": "array", - "description": "Response by document", - "items": { - "allOf": [ + "loggingOptOut": { + "type": "boolean", + "description": "logging opt out", + "default": false + }, + "modelVersion": { + "type": "string", + "description": "model version", + "default": "latest" + }, + "stringIndexType": { + "type": "string", + "description": "Optional parameter to provide the string index type used to interpret string offsets. Defaults to TextElements (Graphemes).", + "default": "TextElements_v8", + "enum": [ + "TextElements_v8", + "UnicodeCodePoint", + "Utf16CodeUnit" + ], + "x-ms-enum": { + "name": "StringIndexType", + "modelAsString": true, + "values": [ + { + "name": "TextElements_v8", + "value": "TextElements_v8", + "description": "Returned offset and length values will correspond to TextElements (Graphemes and Grapheme clusters) confirming to the Unicode 8.0.0 standard. Use this option if your application is written in .Net Framework or .Net Core and you will be using StringInfo." + }, { - "$ref": "#/definitions/LinkedEntitiesDocumentResult" + "name": "UnicodeCodePoint", + "value": "UnicodeCodePoint", + "description": "Returned offset and length values will correspond to Unicode code points. Use this option if your application is written in a language that support Unicode, for example Python." + }, + { + "name": "Utf16CodeUnit", + "value": "Utf16CodeUnit", + "description": "Returned offset and length values will correspond to UTF-16 code units. Use this option if your application is written in a language that support Unicode, for example Java, JavaScript." } ] } } + } + }, + "EntityLinkingTaskResult": { + "type": "object", + "description": "Contains the analyze text Entity linking task result.", + "properties": { + "results": { + "$ref": "#/definitions/EntityLinkingResult", + "description": "Entity linking result." + } }, + "required": [ + "results" + ], "allOf": [ { - "$ref": "common.json#/definitions/PreBuiltResult" + "$ref": "#/definitions/AnalyzeTextTaskResult" } ], - "required": [ - "documents" - ] + "x-ms-discriminator-value": "EntityLinkingResults" }, - "LinkedEntitiesDocumentResult": { + "EntityRecognitionLROResult": { "type": "object", - "required": [ - "entities" - ], + "description": "Contains the entity recognition job task result.", "properties": { - "entities": { - "type": "array", - "description": "Recognized well known entities in the document.", - "items": { - "$ref": "#/definitions/LinkedEntity" - } + "results": { + "$ref": "#/definitions/EntitiesResult", + "description": "Results for the task." } }, + "required": [ + "results" + ], "allOf": [ { - "$ref": "#/definitions/DocumentResult" + "$ref": "#/definitions/AnalyzeTextLROResult" } - ] + ], + "x-ms-discriminator-value": "EntityRecognitionLROResults" }, - "LinkedEntity": { + "Error": { "type": "object", - "required": [ - "name", - "matches", - "language", - "url", - "dataSource" - ], + "description": "The error response object returned when the service encounters some errors during processing the request.", "properties": { - "name": { - "type": "string", - "description": "Entity Linking formal name." - }, - "matches": { - "type": "array", - "description": "List of instances this entity appears in the text.", - "items": { - "$ref": "#/definitions/Match" - } - }, - "language": { - "type": "string", - "description": "Language used in the data source." - }, - "id": { - "type": "string", - "description": "Unique identifier of the recognized entity from the data source." - }, - "url": { - "type": "string", - "description": "URL for the entity's page from the data source." - }, - "dataSource": { - "type": "string", - "description": "Data source used to extract entity linking, such as Wiki/Bing etc." + "code": { + "$ref": "#/definitions/ErrorCode", + "description": "One of a server-defined set of error codes." }, - "bingId": { + "message": { "type": "string", - "description": "Bing Entity Search API unique identifier of the recognized entity." - } - } - }, - "Match": { - "type": "object", - "required": [ - "confidenceScore", - "text", - "offset", - "length" - ], - "properties": { - "confidenceScore": { - "type": "number", - "format": "double", - "description": "If a well known item is recognized, a decimal number denoting the confidence level between 0 and 1 will be returned." + "description": "A human-readable representation of the error." }, - "text": { + "target": { "type": "string", - "description": "Entity text as appears in the request." - }, - "offset": { - "type": "integer", - "format": "int32", - "description": "Start position for the entity match text." - }, - "length": { - "type": "integer", - "format": "int32", - "description": "Length for the entity match text." - } - } - }, - "PiiTaskParameters": { - "type": "object", - "description": "Supported parameters for a PII Entities Recognition task.", - "properties": { - "domain": { - "$ref": "#/definitions/PiiDomain" - }, - "piiCategories": { - "$ref": "#/definitions/PiiCategories" + "description": "The target of the error." }, - "stringIndexType": { - "$ref": "common.json#/definitions/StringIndexType" - } - }, - "allOf": [ - { - "$ref": "#/definitions/PreBuiltTaskParameters" - } - ] - }, - "PiiLROTask": { - "type": "object", - "description": "An object representing the task definition for a PII Entities Recognition task.", - "properties": { - "parameters": { - "$ref": "#/definitions/PiiTaskParameters" - } - }, - "allOf": [ - { - "$ref": "#/definitions/AnalyzeTextLROTask" - } - ], - "x-ms-discriminator-value": "PiiEntityRecognition" - }, - "PiiTaskResult": { - "type": "object", - "properties": { - "results": { - "$ref": "#/definitions/PiiResult" - } - }, - "allOf": [ - { - "$ref": "#/definitions/AnalyzeTextTaskResult" - } - ], - "required": [ - "results" - ], - "x-ms-discriminator-value": "PiiEntityRecognitionResults" - }, - "PiiResult": { - "type": "object", - "properties": { - "documents": { + "details": { "type": "array", - "description": "Response by document", + "description": "An array of details about specific errors that led to this reported error.", "items": { - "allOf": [ - { - "$ref": "#/definitions/PiiEntitiesDocumentResult" - } - ] - } + "$ref": "#/definitions/Error" + }, + "x-ms-identifiers": [] + }, + "innererror": { + "$ref": "#/definitions/InnerErrorModel", + "description": "An object containing more specific information than the current object about the error." } }, - "allOf": [ - { - "$ref": "common.json#/definitions/PreBuiltResult" - } - ], "required": [ - "documents" + "code", + "message" ] }, - "PiiDomain": { + "ErrorCode": { "type": "string", - "description": "The PII domain used for PII Entity Recognition.", - "default": "none", + "description": "Human-readable error code.", "enum": [ - "phi", - "none" + "InvalidRequest", + "InvalidArgument", + "Unauthorized", + "Forbidden", + "NotFound", + "ProjectNotFound", + "OperationNotFound", + "AzureCognitiveSearchNotFound", + "AzureCognitiveSearchIndexNotFound", + "TooManyRequests", + "AzureCognitiveSearchThrottling", + "AzureCognitiveSearchIndexLimitReached", + "InternalServerError", + "ServiceUnavailable", + "Timeout", + "QuotaExceeded", + "Conflict", + "Warning" ], "x-ms-enum": { - "name": "PiiDomain", + "name": "ErrorCode", "modelAsString": true, "values": [ { - "name": "phi", - "description": "Indicates that entities in the Personal Health Information domain should be redacted.", - "value": "phi" + "name": "InvalidRequest", + "value": "InvalidRequest", + "description": "Invalid request error" + }, + { + "name": "InvalidArgument", + "value": "InvalidArgument", + "description": "Invalid argument error" + }, + { + "name": "Unauthorized", + "value": "Unauthorized", + "description": "Unauthorized access error" }, { - "name": "none", - "description": "Indicates that no domain is specified.", - "value": "none" + "name": "Forbidden", + "value": "Forbidden", + "description": "Forbidden access error" + }, + { + "name": "NotFound", + "value": "NotFound", + "description": "Not found error" + }, + { + "name": "ProjectNotFound", + "value": "ProjectNotFound", + "description": "Project not found error" + }, + { + "name": "OperationNotFound", + "value": "OperationNotFound", + "description": "Operation not found error" + }, + { + "name": "AzureCognitiveSearchNotFound", + "value": "AzureCognitiveSearchNotFound", + "description": "Azure Cognitive Search not found error" + }, + { + "name": "AzureCognitiveSearchIndexNotFound", + "value": "AzureCognitiveSearchIndexNotFound", + "description": "Azure Cognitive Search index not found error" + }, + { + "name": "TooManyRequests", + "value": "TooManyRequests", + "description": "Too many requests error" + }, + { + "name": "AzureCognitiveSearchThrottling", + "value": "AzureCognitiveSearchThrottling", + "description": "Azure Cognitive Search throttling error" + }, + { + "name": "AzureCognitiveSearchIndexLimitReached", + "value": "AzureCognitiveSearchIndexLimitReached", + "description": "Azure Cognitive Search index limit reached error" + }, + { + "name": "InternalServerError", + "value": "InternalServerError", + "description": "Internal server error" + }, + { + "name": "ServiceUnavailable", + "value": "ServiceUnavailable", + "description": "Service unavailable error" + }, + { + "name": "Timeout", + "value": "Timeout", + "description": "Timeout error" + }, + { + "name": "QuotaExceeded", + "value": "QuotaExceeded", + "description": "Quota exceeded error" + }, + { + "name": "Conflict", + "value": "Conflict", + "description": "Conflict error" + }, + { + "name": "Warning", + "value": "Warning", + "description": "Warning error" } ] } }, - "PiiEntitiesDocumentResult": { + "ErrorResponse": { "type": "object", + "description": "Error response.", "properties": { - "redactedText": { + "error": { + "$ref": "#/definitions/Error", + "description": "The error object." + } + }, + "required": [ + "error" + ] + }, + "ExtractedSummaryDocumentResult": { + "type": "object", + "description": "A ranked list of sentences representing the extracted summary.", + "properties": { + "id": { "type": "string", - "description": "Returns redacted text." + "description": "Unique, non-empty document identifier." }, - "entities": { + "warnings": { "type": "array", - "description": "Recognized entities in the document.", + "description": "Warnings encountered while processing document.", "items": { - "$ref": "#/definitions/Entity" - } + "$ref": "#/definitions/DocumentWarning" + }, + "x-ms-identifiers": [] + }, + "statistics": { + "$ref": "#/definitions/DocumentStatistics", + "description": "if showStats=true was specified in the request this field will contain information about the document payload." + }, + "sentences": { + "type": "array", + "description": "Specifies the the extracted sentences from the input document.", + "items": { + "$ref": "#/definitions/ExtractedSummarySentence" + }, + "x-ms-identifiers": [] } }, - "allOf": [ - { - "$ref": "#/definitions/DocumentResult" - } - ], "required": [ - "redactedText", - "entities" + "id", + "warnings", + "sentences" ] }, - "PiiCategories": { - "description": "(Optional) describes the PII categories to return", - "items": { - "type": "string", - "x-ms-enum": { - "name": "PiiCategory", - "modelAsString": true - }, - "enum": [ - "ABARoutingNumber", - "ARNationalIdentityNumber", - "AUBankAccountNumber", - "AUDriversLicenseNumber", - "AUMedicalAccountNumber", - "AUPassportNumber", - "AUTaxFileNumber", - "AUBusinessNumber", - "AUCompanyNumber", - "ATIdentityCard", - "ATTaxIdentificationNumber", - "ATValueAddedTaxNumber", - "AzureDocumentDBAuthKey", - "AzureIAASDatabaseConnectionAndSQLString", - "AzureIoTConnectionString", - "AzurePublishSettingPassword", - "AzureRedisCacheString", - "AzureSAS", - "AzureServiceBusString", - "AzureStorageAccountKey", - "AzureStorageAccountGeneric", - "BENationalNumber", - "BENationalNumberV2", - "BEValueAddedTaxNumber", - "BRCPFNumber", - "BRLegalEntityNumber", - "BRNationalIDRG", - "BGUniformCivilNumber", - "CABankAccountNumber", - "CADriversLicenseNumber", - "CAHealthServiceNumber", - "CAPassportNumber", - "CAPersonalHealthIdentification", - "CASocialInsuranceNumber", - "CLIdentityCardNumber", - "CNResidentIdentityCardNumber", - "CreditCardNumber", - "HRIdentityCardNumber", - "HRNationalIDNumber", - "HRPersonalIdentificationNumber", - "HRPersonalIdentificationOIBNumberV2", - "CYIdentityCard", - "CYTaxIdentificationNumber", - "CZPersonalIdentityNumber", - "CZPersonalIdentityV2", - "DKPersonalIdentificationNumber", - "DKPersonalIdentificationV2", - "DrugEnforcementAgencyNumber", - "EEPersonalIdentificationCode", - "EUDebitCardNumber", - "EUDriversLicenseNumber", - "EUGPSCoordinates", - "EUNationalIdentificationNumber", - "EUPassportNumber", - "EUSocialSecurityNumber", - "EUTaxIdentificationNumber", - "FIEuropeanHealthNumber", - "FINationalID", - "FINationalIDV2", - "FIPassportNumber", - "FRDriversLicenseNumber", - "FRHealthInsuranceNumber", - "FRNationalID", - "FRPassportNumber", - "FRSocialSecurityNumber", - "FRTaxIdentificationNumber", - "FRValueAddedTaxNumber", - "DEDriversLicenseNumber", - "DEPassportNumber", - "DEIdentityCardNumber", - "DETaxIdentificationNumber", - "DEValueAddedNumber", - "GRNationalIDCard", - "GRNationalIDV2", - "GRTaxIdentificationNumber", - "HKIdentityCardNumber", - "HUValueAddedNumber", - "HUPersonalIdentificationNumber", - "HUTaxIdentificationNumber", - "INPermanentAccount", - "INUniqueIdentificationNumber", - "IDIdentityCardNumber", - "InternationalBankingAccountNumber", - "IEPersonalPublicServiceNumber", - "IEPersonalPublicServiceNumberV2", - "ILBankAccountNumber", - "ILNationalID", - "ITDriversLicenseNumber", - "ITFiscalCode", - "ITValueAddedTaxNumber", - "JPBankAccountNumber", - "JPDriversLicenseNumber", - "JPPassportNumber", - "JPResidentRegistrationNumber", - "JPSocialInsuranceNumber", - "JPMyNumberCorporate", - "JPMyNumberPersonal", - "JPResidenceCardNumber", - "LVPersonalCode", - "LTPersonalCode", - "LUNationalIdentificationNumberNatural", - "LUNationalIdentificationNumberNonNatural", - "MYIdentityCardNumber", - "MTIdentityCardNumber", - "MTTaxIDNumber", - "NLCitizensServiceNumber", - "NLCitizensServiceNumberV2", - "NLTaxIdentificationNumber", - "NLValueAddedTaxNumber", - "NZBankAccountNumber", - "NZDriversLicenseNumber", - "NZInlandRevenueNumber", - "NZMinistryOfHealthNumber", - "NZSocialWelfareNumber", - "NOIdentityNumber", - "PHUnifiedMultiPurposeIDNumber", - "PLIdentityCard", - "PLNationalID", - "PLNationalIDV2", - "PLPassportNumber", - "PLTaxIdentificationNumber", - "PLREGONNumber", - "PTCitizenCardNumber", - "PTCitizenCardNumberV2", - "PTTaxIdentificationNumber", - "ROPersonalNumericalCode", - "RUPassportNumberDomestic", - "RUPassportNumberInternational", - "SANationalID", - "SGNationalRegistrationIdentityCardNumber", - "SKPersonalNumber", - "SITaxIdentificationNumber", - "SIUniqueMasterCitizenNumber", - "ZAIdentificationNumber", - "KRResidentRegistrationNumber", - "ESDNI", - "ESSocialSecurityNumber", - "ESTaxIdentificationNumber", - "SQLServerConnectionString", - "SENationalID", - "SENationalIDV2", - "SEPassportNumber", - "SETaxIdentificationNumber", - "SWIFTCode", - "CHSocialSecurityNumber", - "TWNationalID", - "TWPassportNumber", - "TWResidentCertificate", - "THPopulationIdentificationCode", - "TRNationalIdentificationNumber", - "UKDriversLicenseNumber", - "UKElectoralRollNumber", - "UKNationalHealthNumber", - "UKNationalInsuranceNumber", - "UKUniqueTaxpayerNumber", - "USUKPassportNumber", - "USBankAccountNumber", - "USDriversLicenseNumber", - "USIndividualTaxpayerIdentification", - "USSocialSecurityNumber", - "UAPassportNumberDomestic", - "UAPassportNumberInternational", - "Organization", - "Email", - "URL", - "Age", - "PhoneNumber", - "IPAddress", - "Date", - "Person", - "Address", - "All", - "Default" - ] - }, - "type": "array", - "uniqueItems": true - }, - "KeyPhraseTaskParameters": { + "ExtractedSummarySentence": { "type": "object", - "description": "Supported parameters for a Key Phrase Extraction task.", - "allOf": [ - { - "$ref": "#/definitions/PreBuiltTaskParameters" + "description": "Represents an extracted sentences from the input document.", + "properties": { + "text": { + "type": "string", + "description": "The extracted sentence text." + }, + "rankScore": { + "type": "number", + "format": "double", + "description": "A double value representing the relevance of the sentence within the summary. Higher values indicate higher importance." + }, + "offset": { + "type": "integer", + "format": "int32", + "description": "The sentence offset from the start of the document, based on the value of the parameter StringIndexType." + }, + "length": { + "type": "integer", + "format": "int32", + "description": "The length of the sentence." } + }, + "required": [ + "text", + "rankScore", + "offset", + "length" ] }, - "ExtractiveSummarizationTaskParameters": { + "ExtractiveSummarizationLROResult": { "type": "object", - "description": "Supported parameters for an Extractive Summarization task.", + "description": "An object representing the results for an Extractive Summarization task.", "properties": { - "sentenceCount": { - "type": "integer", - "default": 3 - }, - "sortBy": { - "$ref": "#/definitions/ExtractiveSummarizationSortingCriteria" - }, - "stringIndexType": { - "$ref": "common.json#/definitions/StringIndexType" + "results": { + "$ref": "#/definitions/ExtractiveSummarizationResult", + "description": "Results of the task." } }, + "required": [ + "results" + ], "allOf": [ { - "$ref": "common.json#/definitions/PreBuiltTaskParameters" + "$ref": "#/definitions/AnalyzeTextLROResult" } - ] + ], + "x-ms-discriminator-value": "ExtractiveSummarizationLROResults" }, "ExtractiveSummarizationLROTask": { "type": "object", "description": "An object representing the task definition for an Extractive Summarization task.", "properties": { "parameters": { - "$ref": "#/definitions/ExtractiveSummarizationTaskParameters" + "$ref": "#/definitions/ExtractiveSummarizationTaskParameters", + "description": "Parameters for the Extractive Summarization task." } }, "allOf": [ @@ -2071,7 +2163,23 @@ }, "ExtractiveSummarizationResult": { "type": "object", + "description": "An object representing the pre-built Extractive Summarization results of each document.", "properties": { + "errors": { + "type": "array", + "description": "Errors by document id.", + "items": { + "$ref": "#/definitions/DocumentError" + } + }, + "statistics": { + "$ref": "#/definitions/RequestStatistics", + "description": "if showStats=true was specified in the request this field will contain information about the request payload." + }, + "modelVersion": { + "type": "string", + "description": "This field indicates which model is used for scoring." + }, "documents": { "type": "array", "description": "Response by document", @@ -2080,557 +2188,788 @@ } } }, - "allOf": [ - { - "$ref": "common.json#/definitions/PreBuiltResult" - } - ], "required": [ + "errors", + "modelVersion", "documents" ] }, - "ExtractiveSummarizationSortingCriteria": { - "type": "string", - "default": "Offset", - "description": "The sorting criteria to use for the results of Extractive Summarization.", - "enum": [ - "Offset", - "Rank" - ], - "x-ms-enum": { - "name": "ExtractiveSummarizationSortingCriteria", - "modelAsString": true, - "values": [ - { - "name": "Offset", - "description": "Indicates that results should be sorted in order of appearance in the text.", - "value": "Offset" - }, - { - "name": "Rank", - "description": "Indicates that results should be sorted in order of importance (i.e. rank score) according to the model.", - "value": "Rank" + "ExtractiveSummarizationTaskParameters": { + "type": "object", + "description": "Supported parameters for an Extractive Summarization task.", + "properties": { + "loggingOptOut": { + "type": "boolean", + "description": "logging opt out", + "default": false + }, + "modelVersion": { + "type": "string", + "description": "model version", + "default": "latest" + }, + "sentenceCount": { + "type": "integer", + "format": "int64", + "description": "Specifies the number of sentences in the extracted summary.", + "default": 3 + }, + "sortBy": { + "type": "string", + "description": "Specifies how to sort the extracted summaries.", + "default": "Offset", + "enum": [ + "Offset", + "Rank" + ], + "x-ms-enum": { + "name": "ExtractiveSummarizationSortingCriteria", + "modelAsString": true, + "values": [ + { + "name": "Offset", + "value": "Offset", + "description": "Indicates that results should be sorted in order of appearance in the text." + }, + { + "name": "Rank", + "value": "Rank", + "description": "Indicates that results should be sorted in order of importance (i.e. rank score) according to the model." + } + ] } - ] + }, + "stringIndexType": { + "type": "string", + "description": "Specifies the method used to interpret string offsets.", + "default": "TextElements_v8", + "enum": [ + "TextElements_v8", + "UnicodeCodePoint", + "Utf16CodeUnit" + ], + "x-ms-enum": { + "name": "StringIndexType", + "modelAsString": true, + "values": [ + { + "name": "TextElements_v8", + "value": "TextElements_v8", + "description": "Returned offset and length values will correspond to TextElements (Graphemes and Grapheme clusters) confirming to the Unicode 8.0.0 standard. Use this option if your application is written in .Net Framework or .Net Core and you will be using StringInfo." + }, + { + "name": "UnicodeCodePoint", + "value": "UnicodeCodePoint", + "description": "Returned offset and length values will correspond to Unicode code points. Use this option if your application is written in a language that support Unicode, for example Python." + }, + { + "name": "Utf16CodeUnit", + "value": "Utf16CodeUnit", + "description": "Returned offset and length values will correspond to UTF-16 code units. Use this option if your application is written in a language that support Unicode, for example Java, JavaScript." + } + ] + } + } } }, - "ExtractedSummaryDocumentResult": { + "HealthcareAssertion": { "type": "object", + "description": "Assertion of the entity.", "properties": { - "sentences": { + "conditionality": { + "$ref": "#/definitions/Conditionality", + "description": "Describes any conditionality on the entity." + }, + "certainty": { + "$ref": "#/definitions/Certainty", + "description": "Describes the entities certainty and polarity." + }, + "association": { + "$ref": "#/definitions/Association", + "description": "Describes if the entity is the subject of the text or if it describes someone else." + } + } + }, + "HealthcareEntitiesDocumentResult": { + "type": "object", + "description": "Result object for the processed Healthcare document.", + "properties": { + "id": { + "type": "string", + "description": "Unique, non-empty document identifier." + }, + "warnings": { "type": "array", - "description": "A ranked list of sentences representing the extracted summary.", + "description": "Warnings encountered while processing document.", "items": { - "$ref": "#/definitions/ExtractedSummarySentence" - } + "$ref": "#/definitions/DocumentWarning" + }, + "x-ms-identifiers": [] + }, + "statistics": { + "$ref": "#/definitions/DocumentStatistics", + "description": "if showStats=true was specified in the request this field will contain information about the document payload." + }, + "entities": { + "type": "array", + "description": "Healthcare entities.", + "items": { + "$ref": "#/definitions/HealthcareEntity" + }, + "x-ms-identifiers": [] + }, + "relations": { + "type": "array", + "description": "Healthcare entity relations.", + "items": { + "$ref": "#/definitions/HealthcareRelation" + }, + "x-ms-identifiers": [] } }, - "allOf": [ - { - "$ref": "#/definitions/DocumentResult" - } - ], "required": [ - "sentences" + "id", + "warnings", + "entities", + "relations" ] }, - "ExtractedSummarySentence": { + "HealthcareEntity": { "type": "object", - "required": [ - "text", - "rankScore", - "offset", - "length" - ], + "description": "Healthcare entity extracted from the document", "properties": { "text": { "type": "string", - "description": "The extracted sentence text." + "description": "Entity text as appears in the request." }, - "rankScore": { - "type": "number", - "format": "double", - "description": "A double value representing the relevance of the sentence within the summary. Higher values indicate higher importance." + "category": { + "$ref": "#/definitions/healthcareEntityCategory", + "description": "Healthcare Entity Category." + }, + "subcategory": { + "type": "string", + "description": "(Optional) Entity sub type." }, "offset": { "type": "integer", "format": "int32", - "description": "The sentence offset from the start of the document, based on the value of the parameter StringIndexType." + "description": "Start position for the entity text. Use of different 'stringIndexType' values can affect the offset returned." }, "length": { "type": "integer", "format": "int32", - "description": "The length of the sentence." + "description": "Length for the entity text. Use of different 'stringIndexType' values can affect the length returned." + }, + "confidenceScore": { + "type": "number", + "format": "double", + "description": "Confidence score between 0 and 1 of the extracted entity." + }, + "assertion": { + "$ref": "#/definitions/HealthcareAssertion", + "description": "Assertion of the entity." + }, + "name": { + "type": "string", + "description": "Preferred name for the entity. Example: 'histologically' would have a 'name' of 'histologic'." + }, + "links": { + "type": "array", + "description": "Entity references in known data sources.", + "items": { + "$ref": "#/definitions/HealthcareEntityLink" + } } - } + }, + "required": [ + "text", + "category", + "offset", + "length", + "confidenceScore" + ] }, - "KeyPhraseLROTask": { + "HealthcareEntityLink": { "type": "object", - "description": "An object representing the task definition for a Key Phrase Extraction task.", + "description": "Reference to an entity in known data sources.", "properties": { - "parameters": { - "$ref": "#/definitions/KeyPhraseTaskParameters" + "dataSource": { + "type": "string", + "description": "Entity Catalog. Examples include: UMLS, CHV, MSH, etc." + }, + "id": { + "type": "string", + "description": "Entity id in the given source catalog." } }, - "allOf": [ - { - "$ref": "#/definitions/AnalyzeTextLROTask" - } - ], - "x-ms-discriminator-value": "KeyPhraseExtraction" + "required": [ + "dataSource", + "id" + ] }, - "KeyPhraseTaskResult": { + "HealthcareLROResult": { "type": "object", + "description": "Healthcare Analyze Text long tunning operation result object.", "properties": { "results": { - "$ref": "#/definitions/KeyPhraseResult" + "$ref": "#/definitions/HealthcareResult", + "description": "Results of the task." } }, + "required": [ + "results" + ], "allOf": [ { - "$ref": "#/definitions/AnalyzeTextTaskResult" + "$ref": "#/definitions/AnalyzeTextLROResult" } ], - "required": [ - "results" - ], - "x-ms-discriminator-value": "KeyPhraseExtractionResults" + "x-ms-discriminator-value": "HealthcareLROResults" }, - "KeyPhraseResult": { + "HealthcareLROTask": { "type": "object", + "description": "The long running task to be performed by the service on the Healthcare input documents.", "properties": { - "documents": { - "type": "array", - "description": "Response by document", - "items": { - "allOf": [ - { - "$ref": "#/definitions/KeyPhrasesDocumentResult" - } - ] - } + "parameters": { + "$ref": "#/definitions/HealthcareTaskParameters", + "description": "Parameters for the Healthcare task." } }, "allOf": [ { - "$ref": "common.json#/definitions/PreBuiltResult" + "$ref": "#/definitions/AnalyzeTextLROTask" } ], - "required": [ - "documents" - ] + "x-ms-discriminator-value": "Healthcare" }, - "KeyPhrasesDocumentResult": { + "HealthcareRelation": { "type": "object", + "description": "Every relation is an entity graph of a certain relationType, where all entities are connected and have specific roles within the relation context.", "properties": { - "keyPhrases": { + "relationType": { + "$ref": "#/definitions/relationType", + "description": "Type of relation. Examples include: `DosageOfMedication` or 'FrequencyOfMedication', etc." + }, + "entities": { "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.", + "description": "The entities in the relation.", "items": { - "type": "string" - } + "$ref": "#/definitions/HealthcareRelationEntity" + }, + "x-ms-identifiers": [] + }, + "confidenceScore": { + "type": "number", + "format": "double", + "description": "Confidence score between 0 and 1 of the extracted relation." } }, - "allOf": [ - { - "$ref": "#/definitions/DocumentResult" - } - ], "required": [ - "keyPhrases" - ] - }, - "LanguageDetectionTaskParameters": { - "type": "object", - "description": "Supported parameters for a Language Detection task.", - "allOf": [ - { - "$ref": "#/definitions/PreBuiltTaskParameters" - } + "relationType", + "entities" ] }, - "LanguageDetectionTaskResult": { + "HealthcareRelationEntity": { "type": "object", + "description": "Entity in the relation.", "properties": { - "results": { - "$ref": "#/definitions/LanguageDetectionResult" + "ref": { + "type": "string", + "description": "Reference link object, using a JSON pointer RFC 6901 (URI Fragment Identifier Representation), pointing to the entity ." + }, + "role": { + "type": "string", + "description": "Role of entity in the relationship. For example: 'CD20-positive diffuse large B-cell lymphoma' has the following entities with their roles in parenthesis: CD20 (GeneOrProtein), Positive (Expression), diffuse large B-cell lymphoma (Diagnosis)." } }, - "allOf": [ - { - "$ref": "#/definitions/AnalyzeTextTaskResult" - } - ], "required": [ - "results" - ], - "x-ms-discriminator-value": "LanguageDetectionResults" + "ref", + "role" + ] }, - "LanguageDetectionResult": { + "HealthcareResult": { "type": "object", + "description": "Result object for the processed Healthcare task.", "properties": { - "documents": { + "errors": { "type": "array", - "description": "Response by document", + "description": "Errors by document id.", "items": { - "$ref": "#/definitions/LanguageDetectionDocumentResult" + "$ref": "#/definitions/DocumentError" + } + }, + "statistics": { + "$ref": "#/definitions/RequestStatistics", + "description": "if showStats=true was specified in the request this field will contain information about the request payload." + }, + "modelVersion": { + "type": "string", + "description": "This field indicates which model is used for scoring." + }, + "documents": { + "type": "array", + "description": "List of result objects for the processed Healthcare documents.", + "items": { + "$ref": "#/definitions/HealthcareEntitiesDocumentResult" } } }, - "allOf": [ - { - "$ref": "common.json#/definitions/PreBuiltResult" - } - ], "required": [ + "errors", + "modelVersion", "documents" ] }, - "LanguageDetectionDocumentResult": { - "type": "object", - "properties": { - "detectedLanguage": { - "description": "Detected Language.", - "$ref": "#/definitions/DetectedLanguage" - } - }, - "allOf": [ - { - "$ref": "#/definitions/DocumentResult" - } - ], - "required": [ - "detectedLanguage" - ] - }, - "DetectedLanguage": { + "HealthcareTaskParameters": { "type": "object", - "required": [ - "name", - "iso6391Name", - "confidenceScore" - ], + "description": "Supported parameters for a Healthcare task.", "properties": { - "name": { - "type": "string", - "description": "Long name of a detected language (e.g. English, French)." + "loggingOptOut": { + "type": "boolean", + "description": "logging opt out", + "default": false }, - "iso6391Name": { + "modelVersion": { "type": "string", - "description": "A two letter representation of the detected language according to the ISO 639-1 standard (e.g. en, fr)." - }, - "confidenceScore": { - "type": "number", - "format": "double", - "description": "A confidence score between 0 and 1. Scores close to 1 indicate 100% certainty that the identified language is true." - } - } - }, - "AnalyzeTextJobState": { - "allOf": [ - { - "$ref": "common.json#/definitions/JobState" - }, - { - "$ref": "#/definitions/TasksState" - }, - { - "$ref": "#/definitions/AnalyzeTextJobStatistics" - } - ] - }, - "Pagination": { - "properties": { - "nextLink": { - "type": "string" - } - }, - "type": "object" - }, - "JobErrors": { - "properties": { - "errors": { - "items": { - "$ref": "common.json#/definitions/Error" - }, - "type": "array" - } - }, - "type": "object" - }, - "AnalyzeTextJobStatistics": { - "properties": { - "statistics": { - "$ref": "common.json#/definitions/RequestStatistics" - } - }, - "type": "object" - }, - "TasksState": { - "properties": { - "tasks": { - "properties": { - "completed": { - "type": "integer" - }, - "failed": { - "type": "integer" - }, - "inProgress": { - "type": "integer" - }, - "total": { - "type": "integer" - }, - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/AnalyzeTextLROResult" - } - } - }, - "required": [ - "total", - "completed", - "failed", - "inProgress" - ], - "type": "object" - } - }, - "required": [ - "tasks" - ], - "type": "object" - }, - "TaskState": { - "properties": { - "lastUpdateDateTime": { - "format": "date-time", - "type": "string" + "description": "model version", + "default": "latest" }, - "status": { + "stringIndexType": { "type": "string", + "description": "Specifies the method used to interpret string offsets.", + "default": "TextElements_v8", "enum": [ - "notStarted", - "running", - "succeeded", - "failed", - "cancelled", - "cancelling" + "TextElements_v8", + "UnicodeCodePoint", + "Utf16CodeUnit" ], "x-ms-enum": { + "name": "StringIndexType", "modelAsString": true, - "name": "State" + "values": [ + { + "name": "TextElements_v8", + "value": "TextElements_v8", + "description": "Returned offset and length values will correspond to TextElements (Graphemes and Grapheme clusters) confirming to the Unicode 8.0.0 standard. Use this option if your application is written in .Net Framework or .Net Core and you will be using StringInfo." + }, + { + "name": "UnicodeCodePoint", + "value": "UnicodeCodePoint", + "description": "Returned offset and length values will correspond to Unicode code points. Use this option if your application is written in a language that support Unicode, for example Python." + }, + { + "name": "Utf16CodeUnit", + "value": "Utf16CodeUnit", + "description": "Returned offset and length values will correspond to UTF-16 code units. Use this option if your application is written in a language that support Unicode, for example Java, JavaScript." + } + ] } } - }, - "required": [ - "status", - "lastUpdateDateTime" + } + }, + "InnerErrorCode": { + "type": "string", + "description": "Human-readable error code.", + "enum": [ + "InvalidRequest", + "InvalidParameterValue", + "KnowledgeBaseNotFound", + "AzureCognitiveSearchNotFound", + "AzureCognitiveSearchThrottling", + "ExtractionFailure", + "InvalidRequestBodyFormat", + "EmptyRequest", + "MissingInputDocuments", + "InvalidDocument", + "ModelVersionIncorrect", + "InvalidDocumentBatch", + "UnsupportedLanguageCode", + "InvalidCountryHint" ], - "type": "object" + "x-ms-enum": { + "name": "InnerErrorCode", + "modelAsString": true, + "values": [ + { + "name": "InvalidRequest", + "value": "InvalidRequest", + "description": "Invalid request error" + }, + { + "name": "InvalidParameterValue", + "value": "InvalidParameterValue", + "description": "Invalid parameter value error" + }, + { + "name": "KnowledgeBaseNotFound", + "value": "KnowledgeBaseNotFound", + "description": "Knowledge base not found error" + }, + { + "name": "AzureCognitiveSearchNotFound", + "value": "AzureCognitiveSearchNotFound", + "description": "Azure Cognitive Search not found error" + }, + { + "name": "AzureCognitiveSearchThrottling", + "value": "AzureCognitiveSearchThrottling", + "description": "Azure Cognitive Search throttling error" + }, + { + "name": "ExtractionFailure", + "value": "ExtractionFailure", + "description": "Extraction failure error" + }, + { + "name": "InvalidRequestBodyFormat", + "value": "InvalidRequestBodyFormat", + "description": "Invalid request body format error" + }, + { + "name": "EmptyRequest", + "value": "EmptyRequest", + "description": "Empty request error" + }, + { + "name": "MissingInputDocuments", + "value": "MissingInputDocuments", + "description": "Missing input documents error" + }, + { + "name": "InvalidDocument", + "value": "InvalidDocument", + "description": "Invalid document error" + }, + { + "name": "ModelVersionIncorrect", + "value": "ModelVersionIncorrect", + "description": "Model version incorrect error" + }, + { + "name": "InvalidDocumentBatch", + "value": "InvalidDocumentBatch", + "description": "Invalid document batch error" + }, + { + "name": "UnsupportedLanguageCode", + "value": "UnsupportedLanguageCode", + "description": "Unsupported language code error" + }, + { + "name": "InvalidCountryHint", + "value": "InvalidCountryHint", + "description": "Invalid country hint error" + } + ] + } }, - "AnalyzeTextLROResult": { + "InnerErrorModel": { "type": "object", - "discriminator": "kind", + "description": "An object containing more specific information about the error. As per Microsoft One API guidelines - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses.", "properties": { - "kind": { - "$ref": "#/definitions/AnalyzeTextLROResultsKind" - } - }, - "allOf": [ - { - "$ref": "#/definitions/TaskState" + "code": { + "$ref": "#/definitions/InnerErrorCode", + "description": "One of a server-defined set of error codes." }, - { - "$ref": "#/definitions/TaskIdentifier" + "message": { + "type": "string", + "description": "Error message." + }, + "details": { + "type": "object", + "description": "Error details.", + "additionalProperties": { + "type": "string" + } + }, + "target": { + "type": "string", + "description": "Error target." + }, + "innererror": { + "$ref": "#/definitions/InnerErrorModel", + "description": "An object containing more specific information than the current object about the error." } - ], + }, "required": [ - "kind" + "code", + "message" ] }, - "EntityRecognitionLROResult": { + "KeyPhraseExtractionLROResult": { "type": "object", + "description": "Contains the analyze text KeyPhraseExtraction LRO task.", "properties": { "results": { - "$ref": "#/definitions/EntitiesResult" + "$ref": "#/definitions/KeyPhraseResult", + "description": "The list of Key phrase extraction results" } }, + "required": [ + "results" + ], "allOf": [ { "$ref": "#/definitions/AnalyzeTextLROResult" } ], - "required": [ - "results" - ], - "x-ms-discriminator-value": "EntityRecognitionLROResults" + "x-ms-discriminator-value": "KeyPhraseExtractionLROResults" }, - "CustomEntityRecognitionLROResult": { + "KeyPhraseLROTask": { "type": "object", + "description": "An object representing the task definition for a Key Phrase Extraction task.", "properties": { - "results": { - "$ref": "#/definitions/CustomEntitiesResult" + "parameters": { + "$ref": "#/definitions/KeyPhraseTaskParameters", + "description": "Key phrase extraction task parameters." } }, "allOf": [ { - "$ref": "#/definitions/AnalyzeTextLROResult" + "$ref": "#/definitions/AnalyzeTextLROTask" } ], - "required": [ - "results" - ], - "x-ms-discriminator-value": "CustomEntityRecognitionLROResults" + "x-ms-discriminator-value": "KeyPhraseExtraction" }, - "CustomSingleLabelClassificationLROResult": { + "KeyPhraseResult": { "type": "object", + "description": "Contains the KeyPhraseResult.", "properties": { - "results": { - "$ref": "#/definitions/CustomLabelClassificationResult" + "errors": { + "type": "array", + "description": "Errors by document id.", + "items": { + "$ref": "#/definitions/DocumentError" + } + }, + "statistics": { + "$ref": "#/definitions/RequestStatistics", + "description": "if showStats=true was specified in the request this field will contain information about the request payload." + }, + "modelVersion": { + "type": "string", + "description": "This field indicates which model is used for scoring." + }, + "documents": { + "type": "array", + "description": "Response by document", + "items": { + "$ref": "#/definitions/KeyPhrasesDocumentResult" + } } }, - "allOf": [ - { - "$ref": "#/definitions/AnalyzeTextLROResult" - } - ], "required": [ - "results" - ], - "x-ms-discriminator-value": "CustomSingleLabelClassificationLROResults" + "errors", + "modelVersion", + "documents" + ] }, - "CustomMultiLabelClassificationLROResult": { + "KeyPhraseTaskParameters": { "type": "object", + "description": "Supported parameters for a Key Phrase Extraction task.", "properties": { - "results": { - "$ref": "#/definitions/CustomLabelClassificationResult" - } - }, - "allOf": [ - { - "$ref": "#/definitions/AnalyzeTextLROResult" + "loggingOptOut": { + "type": "boolean", + "description": "logging opt out", + "default": false + }, + "modelVersion": { + "type": "string", + "description": "model version", + "default": "latest" } - ], - "required": [ - "results" - ], - "x-ms-discriminator-value": "CustomMultiLabelClassificationLROResults" + } }, - "EntityLinkingLROResult": { + "KeyPhraseTaskResult": { "type": "object", + "description": "Contains the analyze text KeyPhraseExtraction task result.", "properties": { "results": { - "$ref": "#/definitions/EntityLinkingResult" + "$ref": "#/definitions/KeyPhraseResult", + "description": "The list of Key phrase extraction results" } }, + "required": [ + "results" + ], "allOf": [ { - "$ref": "#/definitions/AnalyzeTextLROResult" + "$ref": "#/definitions/AnalyzeTextTaskResult" } ], - "required": [ - "results" - ], - "x-ms-discriminator-value": "EntityLinkingLROResults" + "x-ms-discriminator-value": "KeyPhraseExtractionResults" }, - "PiiEntityRecognitionLROResult": { + "KeyPhrasesDocumentResult": { "type": "object", + "description": "Contains the Key phrase extraction results for a document.", "properties": { - "results": { - "$ref": "#/definitions/PiiResult" + "id": { + "type": "string", + "description": "Unique, non-empty document identifier." + }, + "warnings": { + "type": "array", + "description": "Warnings encountered while processing document.", + "items": { + "$ref": "#/definitions/DocumentWarning" + }, + "x-ms-identifiers": [] + }, + "statistics": { + "$ref": "#/definitions/DocumentStatistics", + "description": "if showStats=true was specified in the request this field will contain information about the document payload." + }, + "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" + } } }, - "allOf": [ - { - "$ref": "#/definitions/AnalyzeTextLROResult" - } - ], "required": [ - "results" - ], - "x-ms-discriminator-value": "PiiEntityRecognitionLROResults" + "id", + "warnings", + "keyPhrases" + ] }, - "ExtractiveSummarizationLROResult": { + "LanguageDetectionAnalysisInput": { "type": "object", + "description": "Contains the language detection document analysis input.", "properties": { - "results": { - "$ref": "#/definitions/ExtractiveSummarizationResult" - } - }, - "allOf": [ - { - "$ref": "#/definitions/AnalyzeTextLROResult" + "documents": { + "type": "array", + "description": "List of documents to be analyzed.", + "items": { + "$ref": "#/definitions/LanguageInput" + } } - ], - "required": [ - "results" - ], - "x-ms-discriminator-value": "ExtractiveSummarizationLROResults" + } }, - "HealthcareLROResult": { + "LanguageDetectionDocumentResult": { "type": "object", + "description": "Contains the language detection for a document.", "properties": { - "results": { - "$ref": "#/definitions/HealthcareResult" + "id": { + "type": "string", + "description": "Unique, non-empty document identifier." + }, + "warnings": { + "type": "array", + "description": "Warnings encountered while processing document.", + "items": { + "$ref": "#/definitions/DocumentWarning" + }, + "x-ms-identifiers": [] + }, + "statistics": { + "$ref": "#/definitions/DocumentStatistics", + "description": "if showStats=true was specified in the request this field will contain information about the document payload." + }, + "detectedLanguage": { + "$ref": "#/definitions/DetectedLanguage", + "description": "Detected Language." } }, - "allOf": [ - { - "$ref": "#/definitions/AnalyzeTextLROResult" - } - ], "required": [ - "results" - ], - "x-ms-discriminator-value": "HealthcareLROResults" + "id", + "warnings", + "detectedLanguage" + ] }, - "SentimentLROResult": { + "LanguageDetectionResult": { "type": "object", + "description": "Contains the language detection result for the request.", "properties": { - "results": { - "$ref": "#/definitions/SentimentResponse" + "errors": { + "type": "array", + "description": "Errors by document id.", + "items": { + "$ref": "#/definitions/DocumentError" + } + }, + "statistics": { + "$ref": "#/definitions/RequestStatistics", + "description": "if showStats=true was specified in the request this field will contain information about the request payload." + }, + "modelVersion": { + "type": "string", + "description": "This field indicates which model is used for scoring." + }, + "documents": { + "type": "array", + "description": "Enumeration of language detection results for each input document.", + "items": { + "$ref": "#/definitions/LanguageDetectionDocumentResult" + } } }, - "allOf": [ - { - "$ref": "#/definitions/AnalyzeTextLROResult" - } - ], "required": [ - "results" - ], - "x-ms-discriminator-value": "SentimentAnalysisLROResults" + "errors", + "modelVersion", + "documents" + ] }, - "KeyPhraseExtractionLROResult": { + "LanguageDetectionTaskParameters": { + "type": "object", + "description": "Supported parameters for a Language Detection task.", + "properties": { + "loggingOptOut": { + "type": "boolean", + "description": "logging opt out", + "default": false + }, + "modelVersion": { + "type": "string", + "description": "model version", + "default": "latest" + } + } + }, + "LanguageDetectionTaskResult": { "type": "object", + "description": "Contains the language detection task result for the request.", "properties": { "results": { - "$ref": "#/definitions/KeyPhraseResult" + "$ref": "#/definitions/LanguageDetectionResult", + "description": "Contains the language detection results." } }, + "required": [ + "results" + ], "allOf": [ { - "$ref": "#/definitions/AnalyzeTextLROResult" + "$ref": "#/definitions/AnalyzeTextTaskResult" } ], - "required": [ - "results" - ], - "x-ms-discriminator-value": "KeyPhraseExtractionLROResults" - }, - "DocumentResponse": { - "type": "object", - "properties": {} + "x-ms-discriminator-value": "LanguageDetectionResults" }, - "DocumentResult": { + "LanguageInput": { "type": "object", + "description": "Contains the language detection input.", + "properties": { + "id": { + "type": "string", + "description": "A unique, non-empty document identifier." + }, + "text": { + "type": "string", + "description": "The input text to process." + }, + "countryHint": { + "type": "string", + "description": "The country hint to help with language detection of the text." + } + }, "required": [ "id", - "warnings" - ], + "text" + ] + }, + "LinkedEntitiesDocumentResult": { + "type": "object", + "description": "Entity linking document result.", "properties": { "id": { "type": "string", @@ -2641,70 +2980,119 @@ "description": "Warnings encountered while processing document.", "items": { "$ref": "#/definitions/DocumentWarning" - } + }, + "x-ms-identifiers": [] }, "statistics": { - "description": "if showStats=true was specified in the request this field will contain information about the document payload.", - "$ref": "#/definitions/DocumentStatistics" + "$ref": "#/definitions/DocumentStatistics", + "description": "if showStats=true was specified in the request this field will contain information about the document payload." + }, + "entities": { + "type": "array", + "description": "Recognized well known entities in the document.", + "items": { + "$ref": "#/definitions/LinkedEntity" + } } - } + }, + "required": [ + "id", + "warnings", + "entities" + ] }, - "DocumentWarning": { + "LinkedEntity": { "type": "object", - "required": [ - "code", - "message" - ], + "description": "The LinkedEntity object containing the detected entity with the associated sources/links.", "properties": { - "code": { + "name": { "type": "string", - "enum": [ - "LongWordsInDocument", - "DocumentTruncated" - ], - "x-ms-enum": { - "name": "WarningCodeValue", - "modelAsString": true + "description": "Entity Linking formal name." + }, + "matches": { + "type": "array", + "description": "List of instances this entity appears in the text.", + "items": { + "$ref": "#/definitions/Match" }, - "description": "Error code." + "x-ms-identifiers": [] }, - "message": { + "language": { "type": "string", - "description": "Warning message." + "description": "Language used in the data source." }, - "targetRef": { + "id": { "type": "string", - "description": "A JSON pointer reference indicating the target object." + "description": "Unique identifier of the recognized entity from the data source." + }, + "url": { + "type": "string", + "description": "URL for the entity's page from the data source." + }, + "dataSource": { + "type": "string", + "description": "Data source used to extract entity linking, such as Wiki/Bing etc." + }, + "bingId": { + "type": "string", + "description": "Bing Entity Search API unique identifier of the recognized entity." } - } + }, + "required": [ + "name", + "matches", + "language", + "url", + "dataSource" + ] }, - "DocumentStatistics": { + "Match": { "type": "object", - "required": [ - "charactersCount", - "transactionsCount" - ], + "description": "The Match object containing the detected entity text with the offset and the length.", "properties": { - "charactersCount": { + "confidenceScore": { + "type": "number", + "format": "double", + "description": "If a well known item is recognized, a decimal number denoting the confidence level between 0 and 1 will be returned." + }, + "text": { + "type": "string", + "description": "Entity text as appears in the request." + }, + "offset": { "type": "integer", "format": "int32", - "description": "Number of text elements recognized in the document." + "description": "Start position for the entity match text." }, - "transactionsCount": { + "length": { "type": "integer", "format": "int32", - "description": "Number of transactions for the document." + "description": "Length for the entity match text." } }, - "description": "if showStats=true was specified in the request this field will contain information about the document payload." + "required": [ + "confidenceScore", + "text", + "offset", + "length" + ] }, - "MultiLanguageInput": { + "MultiLanguageAnalysisInput": { "type": "object", - "description": "Contains an input document to be analyzed by the service.", - "required": [ - "id", - "text" - ], + "description": "Collection of input documents to be analyzed by the service.", + "properties": { + "documents": { + "type": "array", + "description": "The input documents to be analyzed.", + "items": { + "$ref": "#/definitions/MultiLanguageInput" + } + } + } + }, + "MultiLanguageInput": { + "type": "object", + "description": "Contains an input document to be analyzed by the service.", "properties": { "id": { "type": "string", @@ -2714,40 +3102,1476 @@ "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." + "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. (Following only applies to 2023-04-15-preview and above) For Auto Language Detection, use \\\"auto\\\". If not set, use \\\"en\\\" for English as default." + } + }, + "required": [ + "id", + "text" + ] + }, + "PiiCategory": { + "type": "string", + "description": "(Optional) describes the PII categories to return", + "enum": [ + "ABARoutingNumber", + "ARNationalIdentityNumber", + "AUBankAccountNumber", + "AUDriversLicenseNumber", + "AUMedicalAccountNumber", + "AUPassportNumber", + "AUTaxFileNumber", + "AUBusinessNumber", + "AUCompanyNumber", + "ATIdentityCard", + "ATTaxIdentificationNumber", + "ATValueAddedTaxNumber", + "AzureDocumentDBAuthKey", + "AzureIAASDatabaseConnectionAndSQLString", + "AzureIoTConnectionString", + "AzurePublishSettingPassword", + "AzureRedisCacheString", + "AzureSAS", + "AzureServiceBusString", + "AzureStorageAccountKey", + "AzureStorageAccountGeneric", + "BENationalNumber", + "BENationalNumberV2", + "BEValueAddedTaxNumber", + "BRCPFNumber", + "BRLegalEntityNumber", + "BRNationalIDRG", + "BGUniformCivilNumber", + "CABankAccountNumber", + "CADriversLicenseNumber", + "CAHealthServiceNumber", + "CAPassportNumber", + "CAPersonalHealthIdentification", + "CASocialInsuranceNumber", + "CLIdentityCardNumber", + "CNResidentIdentityCardNumber", + "CreditCardNumber", + "HRIdentityCardNumber", + "HRNationalIDNumber", + "HRPersonalIdentificationNumber", + "HRPersonalIdentificationOIBNumberV2", + "CYIdentityCard", + "CYTaxIdentificationNumber", + "CZPersonalIdentityNumber", + "CZPersonalIdentityV2", + "DKPersonalIdentificationNumber", + "DKPersonalIdentificationV2", + "DrugEnforcementAgencyNumber", + "EEPersonalIdentificationCode", + "EUDebitCardNumber", + "EUDriversLicenseNumber", + "EUGPSCoordinates", + "EUNationalIdentificationNumber", + "EUPassportNumber", + "EUSocialSecurityNumber", + "EUTaxIdentificationNumber", + "FIEuropeanHealthNumber", + "FINationalID", + "FINationalIDV2", + "FIPassportNumber", + "FRDriversLicenseNumber", + "FRHealthInsuranceNumber", + "FRNationalID", + "FRPassportNumber", + "FRSocialSecurityNumber", + "FRTaxIdentificationNumber", + "FRValueAddedTaxNumber", + "DEDriversLicenseNumber", + "DEPassportNumber", + "DEIdentityCardNumber", + "DETaxIdentificationNumber", + "DEValueAddedNumber", + "GRNationalIDCard", + "GRNationalIDV2", + "GRTaxIdentificationNumber", + "HKIdentityCardNumber", + "HUValueAddedNumber", + "HUPersonalIdentificationNumber", + "HUTaxIdentificationNumber", + "INPermanentAccount", + "INUniqueIdentificationNumber", + "IDIdentityCardNumber", + "InternationalBankingAccountNumber", + "IEPersonalPublicServiceNumber", + "IEPersonalPublicServiceNumberV2", + "ILBankAccountNumber", + "ILNationalID", + "ITDriversLicenseNumber", + "ITFiscalCode", + "ITValueAddedTaxNumber", + "JPBankAccountNumber", + "JPDriversLicenseNumber", + "JPPassportNumber", + "JPResidentRegistrationNumber", + "JPSocialInsuranceNumber", + "JPMyNumberCorporate", + "JPMyNumberPersonal", + "JPResidenceCardNumber", + "LVPersonalCode", + "LTPersonalCode", + "LUNationalIdentificationNumberNatural", + "LUNationalIdentificationNumberNonNatural", + "MYIdentityCardNumber", + "MTIdentityCardNumber", + "MTTaxIDNumber", + "NLCitizensServiceNumber", + "NLCitizensServiceNumberV2", + "NLTaxIdentificationNumber", + "NLValueAddedTaxNumber", + "NZBankAccountNumber", + "NZDriversLicenseNumber", + "NZInlandRevenueNumber", + "NZMinistryOfHealthNumber", + "NZSocialWelfareNumber", + "NOIdentityNumber", + "PHUnifiedMultiPurposeIDNumber", + "PLIdentityCard", + "PLNationalID", + "PLNationalIDV2", + "PLPassportNumber", + "PLTaxIdentificationNumber", + "PLREGONNumber", + "PTCitizenCardNumber", + "PTCitizenCardNumberV2", + "PTTaxIdentificationNumber", + "ROPersonalNumericalCode", + "RUPassportNumberDomestic", + "RUPassportNumberInternational", + "SANationalID", + "SGNationalRegistrationIdentityCardNumber", + "SKPersonalNumber", + "SITaxIdentificationNumber", + "SIUniqueMasterCitizenNumber", + "ZAIdentificationNumber", + "KRResidentRegistrationNumber", + "ESDNI", + "ESSocialSecurityNumber", + "ESTaxIdentificationNumber", + "SQLServerConnectionString", + "SENationalID", + "SENationalIDV2", + "SEPassportNumber", + "SETaxIdentificationNumber", + "SWIFTCode", + "CHSocialSecurityNumber", + "TWNationalID", + "TWPassportNumber", + "TWResidentCertificate", + "THPopulationIdentificationCode", + "TRNationalIdentificationNumber", + "UKDriversLicenseNumber", + "UKElectoralRollNumber", + "UKNationalHealthNumber", + "UKNationalInsuranceNumber", + "UKUniqueTaxpayerNumber", + "USUKPassportNumber", + "USBankAccountNumber", + "USDriversLicenseNumber", + "USIndividualTaxpayerIdentification", + "USSocialSecurityNumber", + "UAPassportNumberDomestic", + "UAPassportNumberInternational", + "Organization", + "Email", + "URL", + "Age", + "PhoneNumber", + "IPAddress", + "Date", + "Person", + "Address", + "All", + "Default" + ], + "x-ms-enum": { + "name": "PiiCategory", + "modelAsString": true, + "values": [ + { + "name": "ABARoutingNumber", + "value": "ABARoutingNumber", + "description": "ABA Routing number" + }, + { + "name": "ARNationalIdentityNumber", + "value": "ARNationalIdentityNumber", + "description": "AR National Identity Number" + }, + { + "name": "AUBankAccountNumber", + "value": "AUBankAccountNumber", + "description": "AT Identity Card" + }, + { + "name": "AUDriversLicenseNumber", + "value": "AUDriversLicenseNumber", + "description": "AU Driver's License Number" + }, + { + "name": "AUMedicalAccountNumber", + "value": "AUMedicalAccountNumber", + "description": "AU Medical Account Number" + }, + { + "name": "AUPassportNumber", + "value": "AUPassportNumber", + "description": "AU Passport Number" + }, + { + "name": "AUTaxFileNumber", + "value": "AUTaxFileNumber", + "description": "AU Tax File Number" + }, + { + "name": "AUBusinessNumber", + "value": "AUBusinessNumber", + "description": "AU Business Number" + }, + { + "name": "AUCompanyNumber", + "value": "AUCompanyNumber", + "description": "AU Company Number" + }, + { + "name": "ATIdentityCard", + "value": "ATIdentityCard", + "description": "AT Identity Card" + }, + { + "name": "ATTaxIdentificationNumber", + "value": "ATTaxIdentificationNumber", + "description": "AT Tax Identification Number" + }, + { + "name": "ATValueAddedTaxNumber", + "value": "ATValueAddedTaxNumber", + "description": "AT Value Added Tax Number" + }, + { + "name": "AzureDocumentDBAuthKey", + "value": "AzureDocumentDBAuthKey", + "description": "Azure Document DB Auth Key" + }, + { + "name": "AzureIAASDatabaseConnectionAndSQLString", + "value": "AzureIAASDatabaseConnectionAndSQLString", + "description": "Azure IAAS Database Connection And SQL String" + }, + { + "name": "AzureIoTConnectionString", + "value": "AzureIoTConnectionString", + "description": "Azure IoT Connection String" + }, + { + "name": "AzurePublishSettingPassword", + "value": "AzurePublishSettingPassword", + "description": "Azure Publish Setting Password" + }, + { + "name": "AzureRedisCacheString", + "value": "AzureRedisCacheString", + "description": "Azure Redis Cache String" + }, + { + "name": "AzureSAS", + "value": "AzureSAS", + "description": "Azure SAS" + }, + { + "name": "AzureServiceBusString", + "value": "AzureServiceBusString", + "description": "Azure Service Bus String" + }, + { + "name": "AzureStorageAccountKey", + "value": "AzureStorageAccountKey", + "description": "Azure Storage Account Key" + }, + { + "name": "AzureStorageAccountGeneric", + "value": "AzureStorageAccountGeneric", + "description": "Azure Storage Account Generic" + }, + { + "name": "BENationalNumber", + "value": "BENationalNumber", + "description": "BE National Number" + }, + { + "name": "BENationalNumberV2", + "value": "BENationalNumberV2", + "description": "BE National Number V2" + }, + { + "name": "BEValueAddedTaxNumber", + "value": "BEValueAddedTaxNumber", + "description": "BE Value Added Tax Number" + }, + { + "name": "BRCPFNumber", + "value": "BRCPFNumber", + "description": "BR CPF Number" + }, + { + "name": "BRLegalEntityNumber", + "value": "BRLegalEntityNumber", + "description": "BR Legal Entity Number" + }, + { + "name": "BRNationalIDRG", + "value": "BRNationalIDRG", + "description": "BR National ID RG" + }, + { + "name": "BGUniformCivilNumber", + "value": "BGUniformCivilNumber", + "description": "BG Uniform Civil Number" + }, + { + "name": "CABankAccountNumber", + "value": "CABankAccountNumber", + "description": "CA Bank Account Number" + }, + { + "name": "CADriversLicenseNumber", + "value": "CADriversLicenseNumber", + "description": "CA Driver's License Number" + }, + { + "name": "CAHealthServiceNumber", + "value": "CAHealthServiceNumber", + "description": "CA Health Service Number" + }, + { + "name": "CAPassportNumber", + "value": "CAPassportNumber", + "description": "CA Passport Number" + }, + { + "name": "CAPersonalHealthIdentification", + "value": "CAPersonalHealthIdentification", + "description": "CA Personal Health Identification" + }, + { + "name": "CASocialInsuranceNumber", + "value": "CASocialInsuranceNumber", + "description": "CA Social Insurance Number" + }, + { + "name": "CLIdentityCardNumber", + "value": "CLIdentityCardNumber", + "description": "CL Identity Card Number" + }, + { + "name": "CNResidentIdentityCardNumber", + "value": "CNResidentIdentityCardNumber", + "description": "CN Resident Identity Card Number" + }, + { + "name": "CreditCardNumber", + "value": "CreditCardNumber", + "description": "Credit Card Number" + }, + { + "name": "HRIdentityCardNumber", + "value": "HRIdentityCardNumber", + "description": "HR Identity Card Number" + }, + { + "name": "HRNationalIDNumber", + "value": "HRNationalIDNumber", + "description": "HR National ID Number" + }, + { + "name": "HRPersonalIdentificationNumber", + "value": "HRPersonalIdentificationNumber", + "description": "HR Personal Identification Number" + }, + { + "name": "HRPersonalIdentificationOIBNumberV2", + "value": "HRPersonalIdentificationOIBNumberV2", + "description": "HR Personal Identification OIB Number V2" + }, + { + "name": "CYIdentityCard", + "value": "CYIdentityCard", + "description": "CY Identity Card" + }, + { + "name": "CYTaxIdentificationNumber", + "value": "CYTaxIdentificationNumber", + "description": "CY Tax Identification Number" + }, + { + "name": "CZPersonalIdentityNumber", + "value": "CZPersonalIdentityNumber", + "description": "CZ Personal Identity Number" + }, + { + "name": "CZPersonalIdentityV2", + "value": "CZPersonalIdentityV2", + "description": "CZ Personal Identity V2" + }, + { + "name": "DKPersonalIdentificationNumber", + "value": "DKPersonalIdentificationNumber", + "description": "DK Personal Identification Number" + }, + { + "name": "DKPersonalIdentificationV2", + "value": "DKPersonalIdentificationV2", + "description": "DK Personal Identification V2" + }, + { + "name": "DrugEnforcementAgencyNumber", + "value": "DrugEnforcementAgencyNumber", + "description": "Drug Enforcement Agency Number" + }, + { + "name": "EEPersonalIdentificationCode", + "value": "EEPersonalIdentificationCode", + "description": "EE Personal Identification Code" + }, + { + "name": "EUDebitCardNumber", + "value": "EUDebitCardNumber", + "description": "EU Debit Card Number" + }, + { + "name": "EUDriversLicenseNumber", + "value": "EUDriversLicenseNumber", + "description": "EU Driver's License Number" + }, + { + "name": "EUGPSCoordinates", + "value": "EUGPSCoordinates", + "description": "EU GPS Coordinates" + }, + { + "name": "EUNationalIdentificationNumber", + "value": "EUNationalIdentificationNumber", + "description": "EU National Identification Number" + }, + { + "name": "EUPassportNumber", + "value": "EUPassportNumber", + "description": "EU Passport Number" + }, + { + "name": "EUSocialSecurityNumber", + "value": "EUSocialSecurityNumber", + "description": "EU Social Security Number" + }, + { + "name": "EUTaxIdentificationNumber", + "value": "EUTaxIdentificationNumber", + "description": "EU Tax Identification Number" + }, + { + "name": "FIEuropeanHealthNumber", + "value": "FIEuropeanHealthNumber", + "description": "FI European Health Number" + }, + { + "name": "FINationalID", + "value": "FINationalID", + "description": "FI National ID" + }, + { + "name": "FINationalIDV2", + "value": "FINationalIDV2", + "description": "FI National ID V2" + }, + { + "name": "FIPassportNumber", + "value": "FIPassportNumber", + "description": "FI Passport Number" + }, + { + "name": "FRDriversLicenseNumber", + "value": "FRDriversLicenseNumber", + "description": "FR Driver's License Number" + }, + { + "name": "FRHealthInsuranceNumber", + "value": "FRHealthInsuranceNumber", + "description": "FR Health Insurance Number" + }, + { + "name": "FRNationalID", + "value": "FRNationalID", + "description": "FR National ID" + }, + { + "name": "FRPassportNumber", + "value": "FRPassportNumber", + "description": "FR Passport Number" + }, + { + "name": "FRSocialSecurityNumber", + "value": "FRSocialSecurityNumber", + "description": "FR Social Security Number" + }, + { + "name": "FRTaxIdentificationNumber", + "value": "FRTaxIdentificationNumber", + "description": "FR Tax Identification Number" + }, + { + "name": "FRValueAddedTaxNumber", + "value": "FRValueAddedTaxNumber", + "description": "FR Value Added Tax Number" + }, + { + "name": "DEDriversLicenseNumber", + "value": "DEDriversLicenseNumber", + "description": "DE Driver's License Number" + }, + { + "name": "DEPassportNumber", + "value": "DEPassportNumber", + "description": "DE Passport Number" + }, + { + "name": "DEIdentityCardNumber", + "value": "DEIdentityCardNumber", + "description": "DE Identity Card Number" + }, + { + "name": "DETaxIdentificationNumber", + "value": "DETaxIdentificationNumber", + "description": "DE Tax Identification Number" + }, + { + "name": "DEValueAddedNumber", + "value": "DEValueAddedNumber", + "description": "DE Value Added Number" + }, + { + "name": "GRNationalIDCard", + "value": "GRNationalIDCard", + "description": "GR National ID Card" + }, + { + "name": "GRNationalIDV2", + "value": "GRNationalIDV2", + "description": "GR National ID V2" + }, + { + "name": "GRTaxIdentificationNumber", + "value": "GRTaxIdentificationNumber", + "description": "GR Tax Identification Number" + }, + { + "name": "HKIdentityCardNumber", + "value": "HKIdentityCardNumber", + "description": "HK Identity Card Number" + }, + { + "name": "HUValueAddedNumber", + "value": "HUValueAddedNumber", + "description": "HU Value Added Number" + }, + { + "name": "HUPersonalIdentificationNumber", + "value": "HUPersonalIdentificationNumber", + "description": "HU Personal Identification Number" + }, + { + "name": "HUTaxIdentificationNumber", + "value": "HUTaxIdentificationNumber", + "description": "HU Tax Identification Number" + }, + { + "name": "INPermanentAccount", + "value": "INPermanentAccount", + "description": "IN Permanent Account" + }, + { + "name": "INUniqueIdentificationNumber", + "value": "INUniqueIdentificationNumber", + "description": "IN Unique Identification Number" + }, + { + "name": "IDIdentityCardNumber", + "value": "IDIdentityCardNumber", + "description": "ID Identity Card Number" + }, + { + "name": "InternationalBankingAccountNumber", + "value": "InternationalBankingAccountNumber", + "description": "International Banking Account Number" + }, + { + "name": "IEPersonalPublicServiceNumber", + "value": "IEPersonalPublicServiceNumber", + "description": "IE Personal Public Service Number" + }, + { + "name": "IEPersonalPublicServiceNumberV2", + "value": "IEPersonalPublicServiceNumberV2", + "description": "IE Personal Public Service Number V2" + }, + { + "name": "ILBankAccountNumber", + "value": "ILBankAccountNumber", + "description": "IL Bank Account Number" + }, + { + "name": "ILNationalID", + "value": "ILNationalID", + "description": "IL National ID" + }, + { + "name": "ITDriversLicenseNumber", + "value": "ITDriversLicenseNumber", + "description": "IT Driver's License Number" + }, + { + "name": "ITFiscalCode", + "value": "ITFiscalCode", + "description": "IT Fiscal Code" + }, + { + "name": "ITValueAddedTaxNumber", + "value": "ITValueAddedTaxNumber", + "description": "IT Value Added Tax Number" + }, + { + "name": "JPBankAccountNumber", + "value": "JPBankAccountNumber", + "description": "JP Bank Account Number" + }, + { + "name": "JPDriversLicenseNumber", + "value": "JPDriversLicenseNumber", + "description": "JP Driver's License Number" + }, + { + "name": "JPPassportNumber", + "value": "JPPassportNumber", + "description": "JP Passport Number" + }, + { + "name": "JPResidentRegistrationNumber", + "value": "JPResidentRegistrationNumber", + "description": "JP Resident Registration Number" + }, + { + "name": "JPSocialInsuranceNumber", + "value": "JPSocialInsuranceNumber", + "description": "JP Social Insurance Number" + }, + { + "name": "JPMyNumberCorporate", + "value": "JPMyNumberCorporate", + "description": "JP My Number Corporate" + }, + { + "name": "JPMyNumberPersonal", + "value": "JPMyNumberPersonal", + "description": "JP My Number Personal" + }, + { + "name": "JPResidenceCardNumber", + "value": "JPResidenceCardNumber", + "description": "JP Residence Card Number" + }, + { + "name": "LVPersonalCode", + "value": "LVPersonalCode", + "description": "LV Personal Code" + }, + { + "name": "LTPersonalCode", + "value": "LTPersonalCode", + "description": "LT Personal Code" + }, + { + "name": "LUNationalIdentificationNumberNatural", + "value": "LUNationalIdentificationNumberNatural", + "description": "LU National Identification Number Natural" + }, + { + "name": "LUNationalIdentificationNumberNonNatural", + "value": "LUNationalIdentificationNumberNonNatural", + "description": "LU National Identification Number Non Natural" + }, + { + "name": "MYIdentityCardNumber", + "value": "MYIdentityCardNumber", + "description": "MY Identity Card Number" + }, + { + "name": "MTIdentityCardNumber", + "value": "MTIdentityCardNumber", + "description": "MT Identity Card Number" + }, + { + "name": "MTTaxIDNumber", + "value": "MTTaxIDNumber", + "description": "MT Tax ID Number" + }, + { + "name": "NLCitizensServiceNumber", + "value": "NLCitizensServiceNumber", + "description": "NL Citizens Service Number" + }, + { + "name": "NLCitizensServiceNumberV2", + "value": "NLCitizensServiceNumberV2", + "description": "NL Citizens Service Number V2" + }, + { + "name": "NLTaxIdentificationNumber", + "value": "NLTaxIdentificationNumber", + "description": "NL Tax Identification Number" + }, + { + "name": "NLValueAddedTaxNumber", + "value": "NLValueAddedTaxNumber", + "description": "NL Value Added Tax Number" + }, + { + "name": "NZBankAccountNumber", + "value": "NZBankAccountNumber", + "description": "NZ Bank Account Number" + }, + { + "name": "NZDriversLicenseNumber", + "value": "NZDriversLicenseNumber", + "description": "NZ Driver's License Number" + }, + { + "name": "NZInlandRevenueNumber", + "value": "NZInlandRevenueNumber", + "description": "NZ Inland Revenue Number" + }, + { + "name": "NZMinistryOfHealthNumber", + "value": "NZMinistryOfHealthNumber", + "description": "NZ Ministry Of Health Number" + }, + { + "name": "NZSocialWelfareNumber", + "value": "NZSocialWelfareNumber", + "description": "NZ Social Welfare Number" + }, + { + "name": "NOIdentityNumber", + "value": "NOIdentityNumber", + "description": "NO Identity Number" + }, + { + "name": "PHUnifiedMultiPurposeIDNumber", + "value": "PHUnifiedMultiPurposeIDNumber", + "description": "PH Unified Multi Purpose ID Number" + }, + { + "name": "PLIdentityCard", + "value": "PLIdentityCard", + "description": "PL Identity Card" + }, + { + "name": "PLNationalID", + "value": "PLNationalID", + "description": "PL National ID" + }, + { + "name": "PLNationalIDV2", + "value": "PLNationalIDV2", + "description": "PL National ID V2" + }, + { + "name": "PLPassportNumber", + "value": "PLPassportNumber", + "description": "PL Passport Number" + }, + { + "name": "PLTaxIdentificationNumber", + "value": "PLTaxIdentificationNumber", + "description": "PL Tax Identification Number" + }, + { + "name": "PLREGONNumber", + "value": "PLREGONNumber", + "description": "PL REGON Number" + }, + { + "name": "PTCitizenCardNumber", + "value": "PTCitizenCardNumber", + "description": "PT Citizen Card Number" + }, + { + "name": "PTCitizenCardNumberV2", + "value": "PTCitizenCardNumberV2", + "description": "PT Citizen Card Number V2" + }, + { + "name": "PTTaxIdentificationNumber", + "value": "PTTaxIdentificationNumber", + "description": "PT Tax Identification Number" + }, + { + "name": "ROPersonalNumericalCode", + "value": "ROPersonalNumericalCode", + "description": "RO Personal Numerical Code" + }, + { + "name": "RUPassportNumberDomestic", + "value": "RUPassportNumberDomestic", + "description": "RU Passport Number Domestic" + }, + { + "name": "RUPassportNumberInternational", + "value": "RUPassportNumberInternational", + "description": "RU Passport Number International" + }, + { + "name": "SANationalID", + "value": "SANationalID", + "description": "SA National ID" + }, + { + "name": "SGNationalRegistrationIdentityCardNumber", + "value": "SGNationalRegistrationIdentityCardNumber", + "description": "SG National Registration Identity Card Number" + }, + { + "name": "SKPersonalNumber", + "value": "SKPersonalNumber", + "description": "SK Personal Number" + }, + { + "name": "SITaxIdentificationNumber", + "value": "SITaxIdentificationNumber", + "description": "SI Tax Identification Number" + }, + { + "name": "SIUniqueMasterCitizenNumber", + "value": "SIUniqueMasterCitizenNumber", + "description": "SI Unique Master Citizen Number" + }, + { + "name": "ZAIdentificationNumber", + "value": "ZAIdentificationNumber", + "description": "ZA Identification Number" + }, + { + "name": "KRResidentRegistrationNumber", + "value": "KRResidentRegistrationNumber", + "description": "KR Resident Registration Number" + }, + { + "name": "ESDNI", + "value": "ESDNI", + "description": "ES DNI" + }, + { + "name": "ESSocialSecurityNumber", + "value": "ESSocialSecurityNumber", + "description": "ES Social Security Number" + }, + { + "name": "ESTaxIdentificationNumber", + "value": "ESTaxIdentificationNumber", + "description": "ES Tax Identification Number" + }, + { + "name": "SQLServerConnectionString", + "value": "SQLServerConnectionString", + "description": "SQL Server Connection String" + }, + { + "name": "SENationalID", + "value": "SENationalID", + "description": "SE National ID" + }, + { + "name": "SENationalIDV2", + "value": "SENationalIDV2", + "description": "SE National ID V2" + }, + { + "name": "SEPassportNumber", + "value": "SEPassportNumber", + "description": "SE Passport Number" + }, + { + "name": "SETaxIdentificationNumber", + "value": "SETaxIdentificationNumber", + "description": "SE Tax Identification Number" + }, + { + "name": "SWIFTCode", + "value": "SWIFTCode", + "description": "SWIFT Code" + }, + { + "name": "CHSocialSecurityNumber", + "value": "CHSocialSecurityNumber", + "description": "CH Social Security Number" + }, + { + "name": "TWNationalID", + "value": "TWNationalID", + "description": "TW National ID" + }, + { + "name": "TWPassportNumber", + "value": "TWPassportNumber", + "description": "TW Passport Number" + }, + { + "name": "TWResidentCertificate", + "value": "TWResidentCertificate", + "description": "TW Resident Certificate" + }, + { + "name": "THPopulationIdentificationCode", + "value": "THPopulationIdentificationCode", + "description": "TH Population Identification Code" + }, + { + "name": "TRNationalIdentificationNumber", + "value": "TRNationalIdentificationNumber", + "description": "TR National Identification Number" + }, + { + "name": "UKDriversLicenseNumber", + "value": "UKDriversLicenseNumber", + "description": "UK Driver's License Number" + }, + { + "name": "UKElectoralRollNumber", + "value": "UKElectoralRollNumber", + "description": "UK Electoral Roll Number" + }, + { + "name": "UKNationalHealthNumber", + "value": "UKNationalHealthNumber", + "description": "UK National Health Number" + }, + { + "name": "UKNationalInsuranceNumber", + "value": "UKNationalInsuranceNumber", + "description": "UK National Insurance Number" + }, + { + "name": "UKUniqueTaxpayerNumber", + "value": "UKUniqueTaxpayerNumber", + "description": "UK Unique Taxpayer Number" + }, + { + "name": "USUKPassportNumber", + "value": "USUKPassportNumber", + "description": "US UK Passport Number" + }, + { + "name": "USBankAccountNumber", + "value": "USBankAccountNumber", + "description": "US Bank Account Number" + }, + { + "name": "USDriversLicenseNumber", + "value": "USDriversLicenseNumber", + "description": "US Driver's License Number" + }, + { + "name": "USIndividualTaxpayerIdentification", + "value": "USIndividualTaxpayerIdentification", + "description": "US Individual Taxpayer Identification" + }, + { + "name": "USSocialSecurityNumber", + "value": "USSocialSecurityNumber", + "description": "US Social Security Number" + }, + { + "name": "UAPassportNumberDomestic", + "value": "UAPassportNumberDomestic", + "description": "UA Passport Number Domestic" + }, + { + "name": "UAPassportNumberInternational", + "value": "UAPassportNumberInternational", + "description": "UA Passport Number International" + }, + { + "name": "Organization", + "value": "Organization", + "description": "Organization" + }, + { + "name": "Email", + "value": "Email", + "description": "Email" + }, + { + "name": "URL", + "value": "URL", + "description": "URL" + }, + { + "name": "Age", + "value": "Age", + "description": "Age" + }, + { + "name": "PhoneNumber", + "value": "PhoneNumber", + "description": "Phone Number" + }, + { + "name": "IPAddress", + "value": "IPAddress", + "description": "IP Address" + }, + { + "name": "Date", + "value": "Date", + "description": "Date" + }, + { + "name": "Person", + "value": "Person", + "description": "Person" + }, + { + "name": "Address", + "value": "Address", + "description": "Address" + }, + { + "name": "All", + "value": "All", + "description": "All PII categories." + }, + { + "name": "Default", + "value": "Default", + "description": "Default PII categories for the language." + } + ] + } + }, + "PiiEntitiesDocumentResult": { + "type": "object", + "description": "Contains the PII results.", + "properties": { + "id": { + "type": "string", + "description": "Unique, non-empty document identifier." + }, + "warnings": { + "type": "array", + "description": "Warnings encountered while processing document.", + "items": { + "$ref": "#/definitions/DocumentWarning" + }, + "x-ms-identifiers": [] + }, + "statistics": { + "$ref": "#/definitions/DocumentStatistics", + "description": "if showStats=true was specified in the request this field will contain information about the document payload." + }, + "redactedText": { + "type": "string", + "description": "Returns redacted text." + }, + "entities": { + "type": "array", + "description": "Recognized entities in the document.", + "items": { + "$ref": "#/definitions/Entity" + }, + "x-ms-identifiers": [] + } + }, + "required": [ + "id", + "warnings", + "redactedText", + "entities" + ] + }, + "PiiEntityRecognitionLROResult": { + "type": "object", + "description": "Contains the PII LRO results.", + "properties": { + "results": { + "$ref": "#/definitions/PiiResult", + "description": "The list of pii results" + } + }, + "required": [ + "results" + ], + "allOf": [ + { + "$ref": "#/definitions/AnalyzeTextLROResult" + } + ], + "x-ms-discriminator-value": "PiiEntityRecognitionLROResults" + }, + "PiiLROTask": { + "type": "object", + "description": "Contains the analyze text PIIEntityRecognition LRO task.", + "properties": { + "parameters": { + "$ref": "#/definitions/PiiTaskParameters", + "description": "Pii task parameters." + } + }, + "allOf": [ + { + "$ref": "#/definitions/AnalyzeTextLROTask" + } + ], + "x-ms-discriminator-value": "PiiEntityRecognition" + }, + "PiiResult": { + "type": "object", + "description": "Contains the PiiResult.", + "properties": { + "errors": { + "type": "array", + "description": "Errors by document id.", + "items": { + "$ref": "#/definitions/DocumentError" + } + }, + "statistics": { + "$ref": "#/definitions/RequestStatistics", + "description": "if showStats=true was specified in the request this field will contain information about the request payload." + }, + "modelVersion": { + "type": "string", + "description": "This field indicates which model is used for scoring." + }, + "documents": { + "type": "array", + "description": "Response by document", + "items": { + "$ref": "#/definitions/PiiEntitiesDocumentResult" + } + } + }, + "required": [ + "errors", + "modelVersion", + "documents" + ] + }, + "PiiTaskParameters": { + "type": "object", + "description": "Supported parameters for a PII Entities Recognition task.", + "properties": { + "loggingOptOut": { + "type": "boolean", + "description": "logging opt out", + "default": false + }, + "modelVersion": { + "type": "string", + "description": "model version", + "default": "latest" + }, + "domain": { + "type": "string", + "description": "Domain for PII task", + "default": "none", + "enum": [ + "phi", + "none" + ], + "x-ms-enum": { + "name": "PiiDomain", + "modelAsString": true, + "values": [ + { + "name": "phi", + "value": "phi", + "description": "Indicates that entities in the Personal Health Information domain should be redacted." + }, + { + "name": "none", + "value": "none", + "description": "Indicates that no domain is specified." + } + ] + } + }, + "piiCategories": { + "type": "array", + "description": "Enumeration of PII categories to be returned in the response.", + "items": { + "$ref": "#/definitions/PiiCategory" + } + }, + "stringIndexType": { + "type": "string", + "description": "StringIndexType to be used for analysis.", + "default": "TextElements_v8", + "enum": [ + "TextElements_v8", + "UnicodeCodePoint", + "Utf16CodeUnit" + ], + "x-ms-enum": { + "name": "StringIndexType", + "modelAsString": true, + "values": [ + { + "name": "TextElements_v8", + "value": "TextElements_v8", + "description": "Returned offset and length values will correspond to TextElements (Graphemes and Grapheme clusters) confirming to the Unicode 8.0.0 standard. Use this option if your application is written in .Net Framework or .Net Core and you will be using StringInfo." + }, + { + "name": "UnicodeCodePoint", + "value": "UnicodeCodePoint", + "description": "Returned offset and length values will correspond to Unicode code points. Use this option if your application is written in a language that support Unicode, for example Python." + }, + { + "name": "Utf16CodeUnit", + "value": "Utf16CodeUnit", + "description": "Returned offset and length values will correspond to UTF-16 code units. Use this option if your application is written in a language that support Unicode, for example Java, JavaScript." + } + ] + } + } + } + }, + "PiiTaskResult": { + "type": "object", + "description": "Contains the analyze text PIIEntityRecognition LRO task.", + "properties": { + "results": { + "$ref": "#/definitions/PiiResult", + "description": "The list of pii results" + } + }, + "required": [ + "results" + ], + "allOf": [ + { + "$ref": "#/definitions/AnalyzeTextTaskResult" + } + ], + "x-ms-discriminator-value": "PiiEntityRecognitionResults" + }, + "RequestStatistics": { + "type": "object", + "description": "if showStats=true was specified in the request this field will contain information about the request payload.", + "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." + } + }, + "required": [ + "documentsCount", + "validDocumentsCount", + "erroneousDocumentsCount", + "transactionsCount" + ] + }, + "SentenceAssessment": { + "type": "object", + "description": "Represents a sentence assessment and the assessments or target objects related to it.", + "properties": { + "sentiment": { + "$ref": "#/definitions/TokenSentimentValue", + "description": "The sentiment of the sentence." + }, + "confidenceScores": { + "$ref": "#/definitions/TargetConfidenceScoreLabel", + "description": "Represents the confidence scores across all sentiment classes: positive and negative." + }, + "offset": { + "type": "integer", + "format": "int32", + "description": "The target offset from the start of the sentence." + }, + "length": { + "type": "integer", + "format": "int32", + "description": "The length of the target." + }, + "text": { + "type": "string", + "description": "The target text detected." + }, + "isNegated": { + "type": "boolean", + "description": "The indicator representing if the assessment is negated." + } + }, + "required": [ + "sentiment", + "confidenceScores", + "offset", + "length", + "text", + "isNegated" + ] + }, + "SentenceSentiment": { + "type": "object", + "description": "A document's sentence sentiment.", + "properties": { + "text": { + "type": "string", + "description": "The sentence text." + }, + "sentiment": { + "$ref": "#/definitions/SentenceSentimentValue", + "description": "The predicted Sentiment for the sentence." + }, + "confidenceScores": { + "$ref": "#/definitions/SentimentConfidenceScores", + "description": "The sentiment confidence score between 0 and 1 for the sentence for all classes." + }, + "offset": { + "type": "integer", + "format": "int32", + "description": "The target offset from the start of the sentence." + }, + "length": { + "type": "integer", + "format": "int32", + "description": "The length of the target." + }, + "targets": { + "type": "array", + "description": "The array of sentence targets for the sentence.", + "items": { + "$ref": "#/definitions/SentenceTarget" + }, + "x-ms-identifiers": [] + }, + "assessments": { + "type": "array", + "description": "The array of assessments for the sentence.", + "items": { + "$ref": "#/definitions/SentenceAssessment" + }, + "x-ms-identifiers": [] } + }, + "required": [ + "text", + "sentiment", + "confidenceScores", + "offset", + "length" + ] + }, + "SentenceSentimentValue": { + "type": "string", + "description": "The predicted Sentiment for the sentence.", + "enum": [ + "positive", + "neutral", + "negative" + ], + "x-ms-enum": { + "name": "SentenceSentimentValue", + "modelAsString": false, + "values": [ + { + "name": "positive", + "value": "positive", + "description": "Positive sentiment" + }, + { + "name": "neutral", + "value": "neutral", + "description": "Neutral sentiment" + }, + { + "name": "negative", + "value": "negative", + "description": "Negative sentiment" + } + ] } }, - "LanguageInput": { + "SentenceTarget": { "type": "object", - "required": [ - "id", - "text" - ], + "description": "Represents a sentence target and the assessments or target objects related to it.", "properties": { - "id": { - "type": "string", - "description": "Unique, non-empty document identifier." + "sentiment": { + "$ref": "#/definitions/TokenSentimentValue", + "description": "The sentiment of the sentence." + }, + "confidenceScores": { + "$ref": "#/definitions/TargetConfidenceScoreLabel", + "description": "Represents the confidence scores across all sentiment classes: positive and negative." + }, + "offset": { + "type": "integer", + "format": "int32", + "description": "The target offset from the start of the sentence." + }, + "length": { + "type": "integer", + "format": "int32", + "description": "The length of the target." }, "text": { - "type": "string" + "type": "string", + "description": "The target text detected." }, - "countryHint": { - "type": "string" + "relations": { + "type": "array", + "description": "The array of either assessment or target objects which is related to the target.", + "items": { + "$ref": "#/definitions/TargetRelation" + }, + "x-ms-identifiers": [] } - } + }, + "required": [ + "sentiment", + "confidenceScores", + "offset", + "length", + "text", + "relations" + ] }, - "AbstractiveSummarizationLROTask": { + "SentimentAnalysisLROTask": { "type": "object", - "description": "An object representing the task definition for an Abstractive Summarization task.", - "required": [ - "parameters" - ], + "description": "An object representing the task definition for a Sentiment Analysis task.", "properties": { "parameters": { - "$ref": "#/definitions/AbstractiveSummarizationTaskParameters" + "$ref": "#/definitions/SentimentAnalysisTaskParameters", + "description": "Parameters for the Sentiment Analysis task." } }, "allOf": [ @@ -2755,128 +4579,891 @@ "$ref": "#/definitions/AnalyzeTextLROTask" } ], - "x-ms-discriminator-value": "AbstractiveSummarization" + "x-ms-discriminator-value": "SentimentAnalysis" }, - "AbstractiveSummarizationTaskParameters": { + "SentimentAnalysisTaskParameters": { "type": "object", - "description": "Supported parameters for the pre-build Abstractive Summarization task.", - "allOf": [ - { - "$ref": "common.json#/definitions/AbstractiveSummarizationTaskParametersBase" + "description": "Supported parameters for a Sentiment Analysis task.", + "properties": { + "loggingOptOut": { + "type": "boolean", + "description": "logging opt out", + "default": false }, - { - "$ref": "common.json#/definitions/PreBuiltTaskParameters" + "modelVersion": { + "type": "string", + "description": "model version", + "default": "latest" + }, + "opinionMining": { + "type": "boolean", + "description": "Whether to use opinion mining in the request or not.", + "default": false + }, + "stringIndexType": { + "type": "string", + "description": "Specifies the method used to interpret string offsets.", + "default": "TextElements_v8", + "enum": [ + "TextElements_v8", + "UnicodeCodePoint", + "Utf16CodeUnit" + ], + "x-ms-enum": { + "name": "StringIndexType", + "modelAsString": true, + "values": [ + { + "name": "TextElements_v8", + "value": "TextElements_v8", + "description": "Returned offset and length values will correspond to TextElements (Graphemes and Grapheme clusters) confirming to the Unicode 8.0.0 standard. Use this option if your application is written in .Net Framework or .Net Core and you will be using StringInfo." + }, + { + "name": "UnicodeCodePoint", + "value": "UnicodeCodePoint", + "description": "Returned offset and length values will correspond to Unicode code points. Use this option if your application is written in a language that support Unicode, for example Python." + }, + { + "name": "Utf16CodeUnit", + "value": "Utf16CodeUnit", + "description": "Returned offset and length values will correspond to UTF-16 code units. Use this option if your application is written in a language that support Unicode, for example Java, JavaScript." + } + ] + } + } + } + }, + "SentimentConfidenceScores": { + "type": "object", + "description": "Represents the confidence scores between 0 and 1 across all sentiment classes: positive, neutral, negative.", + "properties": { + "positive": { + "type": "number", + "format": "double", + "description": "Confidence score for positive sentiment" + }, + "neutral": { + "type": "number", + "format": "double", + "description": "Confidence score for neutral sentiment" + }, + "negative": { + "type": "number", + "format": "double", + "description": "Confidence score for negative sentiment" } + }, + "required": [ + "positive", + "neutral", + "negative" ] }, - "AbstractiveSummarizationLROResult": { + "SentimentDocumentResult": { "type": "object", - "description": "An object representing the results for an Abstractive Summarization task.", + "description": "An object representing the pre-built Sentiment Analysis results of each document.", + "properties": { + "id": { + "type": "string", + "description": "Unique, non-empty document identifier." + }, + "warnings": { + "type": "array", + "description": "Warnings encountered while processing document.", + "items": { + "$ref": "#/definitions/DocumentWarning" + }, + "x-ms-identifiers": [] + }, + "statistics": { + "$ref": "#/definitions/DocumentStatistics", + "description": "if showStats=true was specified in the request this field will contain information about the document payload." + }, + "sentiment": { + "$ref": "#/definitions/DocumentSentimentValue", + "description": "Predicted sentiment for document (Negative, Neutral, Positive, or Mixed)." + }, + "confidenceScores": { + "$ref": "#/definitions/SentimentConfidenceScores", + "description": "The sentiment confidence score between 0 and 1 for the sentence for all classes." + }, + "sentences": { + "type": "array", + "description": "The document's sentences sentiment.", + "items": { + "$ref": "#/definitions/SentenceSentiment" + }, + "x-ms-identifiers": [] + } + }, + "required": [ + "id", + "warnings", + "sentiment", + "confidenceScores", + "sentences" + ] + }, + "SentimentLROResult": { + "type": "object", + "description": "Contains the Sentiment Analysis LRO results.", "properties": { "results": { - "$ref": "#/definitions/AbstractiveSummarizationResult" + "$ref": "#/definitions/SentimentResponse", + "description": "The sentiment analysis results" } }, + "required": [ + "results" + ], "allOf": [ { "$ref": "#/definitions/AnalyzeTextLROResult" } ], - "required": [ - "results" - ], - "x-ms-discriminator-value": "AbstractiveSummarizationLROResults" + "x-ms-discriminator-value": "SentimentAnalysisLROResults" }, - "AbstractiveSummarizationResultBase": { + "SentimentResponse": { "type": "object", - "description": "An object representing the summarization results of each document.", + "description": "Sentiment analysis results for the input documents.", "properties": { + "errors": { + "type": "array", + "description": "Errors by document id.", + "items": { + "$ref": "#/definitions/DocumentError" + } + }, + "statistics": { + "$ref": "#/definitions/RequestStatistics", + "description": "if showStats=true was specified in the request this field will contain information about the request payload." + }, + "modelVersion": { + "type": "string", + "description": "This field indicates which model is used for scoring." + }, "documents": { "type": "array", - "description": "Response by document", + "description": "The sentiment analysis results for each document in the input.", "items": { - "$ref": "#/definitions/AbstractiveSummaryDocumentResult" + "$ref": "#/definitions/SentimentDocumentResult" } } }, "required": [ + "errors", + "modelVersion", "documents" ] }, - "AbstractiveSummarizationResult": { + "SentimentTaskResult": { "type": "object", - "description": "An object representing the pre-build summarization results of each document.", + "description": "Contains the analyze text SentimentAnalysis LRO task result.", + "properties": { + "results": { + "$ref": "#/definitions/SentimentResponse", + "description": "The sentiment analysis results" + } + }, + "required": [ + "results" + ], "allOf": [ { - "$ref": "#/definitions/AbstractiveSummarizationResultBase" + "$ref": "#/definitions/AnalyzeTextTaskResult" + } + ], + "x-ms-discriminator-value": "SentimentAnalysisResults" + }, + "State": { + "type": "string", + "description": "The status of the task at the mentioned last update time.", + "enum": [ + "notStarted", + "running", + "succeeded", + "partiallyCompleted", + "failed", + "cancelled", + "cancelling" + ], + "x-ms-enum": { + "name": "State", + "modelAsString": true, + "values": [ + { + "name": "notStarted", + "value": "notStarted", + "description": "Not started status" + }, + { + "name": "running", + "value": "running", + "description": "Running status" + }, + { + "name": "succeeded", + "value": "succeeded", + "description": "Succeeded status" + }, + { + "name": "partiallyCompleted", + "value": "partiallyCompleted", + "description": "Partially completed status" + }, + { + "name": "failed", + "value": "failed", + "description": "Failed status" + }, + { + "name": "cancelled", + "value": "cancelled", + "description": "Cancelled status" + }, + { + "name": "cancelling", + "value": "cancelling", + "description": "Cancelling status" + } + ] + } + }, + "SummaryContext": { + "type": "object", + "description": "The context of the summary.", + "properties": { + "offset": { + "type": "integer", + "format": "int32", + "description": "Start position for the context. Use of different 'stringIndexType' values can affect the offset returned." + }, + "length": { + "type": "integer", + "format": "int32", + "description": "The length of the context. Use of different 'stringIndexType' values can affect the length returned." + } + }, + "required": [ + "offset", + "length" + ] + }, + "TargetConfidenceScoreLabel": { + "type": "object", + "description": "Represents the confidence scores across all sentiment classes: positive and negative.", + "properties": { + "positive": { + "type": "number", + "format": "double", + "description": "Confidence score for positive sentiment" }, - { - "$ref": "common.json#/definitions/PreBuiltResult" + "negative": { + "type": "number", + "format": "double", + "description": "Confidence score for negative sentiment" } - ], + }, "required": [ - "documents" + "positive", + "negative" ] }, - "AbstractiveSummaryDocumentResult": { + "TargetRelation": { "type": "object", - "description": "An object representing the summarization result of a single document.", + "description": "Represents the relation between assessments and/or targets.", "properties": { - "summaries": { - "type": "array", - "description": "A list of abstractive summaries.", - "items": { - "$ref": "#/definitions/AbstractiveSummary" - } + "ref": { + "type": "string", + "description": "The JSON pointer indicating the linked object." + }, + "relationType": { + "$ref": "#/definitions/TargetRelationType", + "description": "The type related to the target." } }, - "allOf": [ - { - "$ref": "#/definitions/DocumentResult" - } - ], "required": [ - "summaries" + "ref", + "relationType" ] }, - "AbstractiveSummary": { + "TargetRelationType": { + "type": "string", + "description": "The type related to the target.", + "enum": [ + "assessment", + "target" + ], + "x-ms-enum": { + "name": "TargetRelationType", + "modelAsString": false, + "values": [ + { + "name": "assessment", + "value": "assessment" + }, + { + "name": "target", + "value": "target" + } + ] + } + }, + "Tasks": { "type": "object", - "description": "An object representing a single summary with context for given document.", + "description": "Container for the tasks status for the LRO job.", "properties": { - "text": { - "type": "string", - "description": "The text of the summary." + "completed": { + "type": "integer", + "format": "int32", + "description": "Count of completed tasks." }, - "contexts": { + "failed": { + "type": "integer", + "format": "int32", + "description": "Count of failed tasks." + }, + "inProgress": { + "type": "integer", + "format": "int32", + "description": "Count of inprogress tasks." + }, + "total": { + "type": "integer", + "format": "int32", + "description": "Count of total tasks." + }, + "items": { "type": "array", - "description": "The context list of the summary.", + "description": "Enumerable of Analyze text job results.", "items": { - "$ref": "common.json#/definitions/SummaryContext" - } + "$ref": "#/definitions/AnalyzeTextLROResult" + }, + "x-ms-identifiers": [] } }, "required": [ - "text" + "completed", + "failed", + "inProgress", + "total" ] + }, + "TokenSentimentValue": { + "type": "string", + "description": "The predicted Sentiment for the sentence.", + "enum": [ + "positive", + "mixed", + "negative" + ], + "x-ms-enum": { + "name": "TokenSentimentValue", + "modelAsString": false, + "values": [ + { + "name": "positive", + "value": "positive", + "description": "Positive sentiment" + }, + { + "name": "mixed", + "value": "mixed", + "description": "Mixed sentiment" + }, + { + "name": "negative", + "value": "negative", + "description": "Negative sentiment" + } + ] + } + }, + "WarningCodeValue": { + "type": "string", + "description": "Defines the list of the warning codes.", + "enum": [ + "LongWordsInDocument", + "DocumentTruncated" + ], + "x-ms-enum": { + "name": "WarningCodeValue", + "modelAsString": true, + "values": [ + { + "name": "LongWordsInDocument", + "value": "LongWordsInDocument", + "description": "Long words in document warning" + }, + { + "name": "DocumentTruncated", + "value": "DocumentTruncated", + "description": "Document truncated warning" + } + ] + } + }, + "healthcareEntityCategory": { + "type": "string", + "description": "Healthcare Entity Category.", + "enum": [ + "BodyStructure", + "Age", + "Gender", + "ExaminationName", + "Date", + "Direction", + "Frequency", + "MeasurementValue", + "MeasurementUnit", + "RelationalOperator", + "Time", + "GeneOrProtein", + "Variant", + "AdministrativeEvent", + "CareEnvironment", + "HealthcareProfession", + "Diagnosis", + "SymptomOrSign", + "ConditionQualifier", + "MedicationClass", + "MedicationName", + "Dosage", + "MedicationForm", + "MedicationRoute", + "FamilyRelation", + "TreatmentName", + "Ethnicity", + "Course", + "Expression", + "MutationType", + "ConditionScale", + "Allergen", + "Employment", + "LivingStatus", + "SubstanceUse", + "SubstanceUseAmount" + ], + "x-ms-enum": { + "name": "healthcareEntityCategory", + "modelAsString": true, + "values": [ + { + "name": "BodyStructure", + "value": "BodyStructure", + "description": "Body structure" + }, + { + "name": "Age", + "value": "Age", + "description": "Age" + }, + { + "name": "Gender", + "value": "Gender", + "description": "Gender" + }, + { + "name": "ExaminationName", + "value": "ExaminationName", + "description": "Examination name" + }, + { + "name": "Date", + "value": "Date", + "description": "Date" + }, + { + "name": "Direction", + "value": "Direction", + "description": "Direction" + }, + { + "name": "Frequency", + "value": "Frequency", + "description": "Frequency" + }, + { + "name": "MeasurementValue", + "value": "MeasurementValue", + "description": "Measurement value" + }, + { + "name": "MeasurementUnit", + "value": "MeasurementUnit", + "description": "Measurement unit" + }, + { + "name": "RelationalOperator", + "value": "RelationalOperator", + "description": "Relational operator" + }, + { + "name": "Time", + "value": "Time", + "description": "Time" + }, + { + "name": "GeneOrProtein", + "value": "GeneOrProtein", + "description": "Gene or protein" + }, + { + "name": "Variant", + "value": "Variant", + "description": "Variant" + }, + { + "name": "AdministrativeEvent", + "value": "AdministrativeEvent", + "description": "Administrative event" + }, + { + "name": "CareEnvironment", + "value": "CareEnvironment", + "description": "Care environment" + }, + { + "name": "HealthcareProfession", + "value": "HealthcareProfession", + "description": "Healthcare profession" + }, + { + "name": "Diagnosis", + "value": "Diagnosis", + "description": "Diagnosis" + }, + { + "name": "SymptomOrSign", + "value": "SymptomOrSign", + "description": "Symptom or sign" + }, + { + "name": "ConditionQualifier", + "value": "ConditionQualifier", + "description": "Condition qualifier" + }, + { + "name": "MedicationClass", + "value": "MedicationClass", + "description": "Medication class" + }, + { + "name": "MedicationName", + "value": "MedicationName", + "description": "Medication name" + }, + { + "name": "Dosage", + "value": "Dosage", + "description": "Dosage" + }, + { + "name": "MedicationForm", + "value": "MedicationForm", + "description": "Medication form" + }, + { + "name": "MedicationRoute", + "value": "MedicationRoute", + "description": "Medication route" + }, + { + "name": "FamilyRelation", + "value": "FamilyRelation", + "description": "Family relation" + }, + { + "name": "TreatmentName", + "value": "TreatmentName", + "description": "Treatment name" + }, + { + "name": "Ethnicity", + "value": "Ethnicity", + "description": "Ethnicity" + }, + { + "name": "Course", + "value": "Course", + "description": "Course" + }, + { + "name": "Expression", + "value": "Expression", + "description": "Expression" + }, + { + "name": "MutationType", + "value": "MutationType", + "description": "Mutation type" + }, + { + "name": "ConditionScale", + "value": "ConditionScale", + "description": "Condition scale" + }, + { + "name": "Allergen", + "value": "Allergen", + "description": "Allergen" + }, + { + "name": "Employment", + "value": "Employment", + "description": "Employment" + }, + { + "name": "LivingStatus", + "value": "LivingStatus", + "description": "Living status" + }, + { + "name": "SubstanceUse", + "value": "SubstanceUse", + "description": "Substance use" + }, + { + "name": "SubstanceUseAmount", + "value": "SubstanceUseAmount", + "description": "Substance use amount" + } + ] + } + }, + "relationType": { + "type": "string", + "description": "Type of relation. Examples include: `DosageOfMedication` or 'FrequencyOfMedication', etc.", + "enum": [ + "Abbreviation", + "DirectionOfBodyStructure", + "DirectionOfCondition", + "DirectionOfExamination", + "DirectionOfTreatment", + "DosageOfMedication", + "FormOfMedication", + "FrequencyOfMedication", + "FrequencyOfTreatment", + "QualifierOfCondition", + "RelationOfExamination", + "RouteOfMedication", + "TimeOfCondition", + "TimeOfEvent", + "TimeOfExamination", + "TimeOfMedication", + "TimeOfTreatment", + "UnitOfCondition", + "UnitOfExamination", + "ValueOfCondition", + "ValueOfExamination", + "BodySiteOfCondition", + "BodySiteOfTreatment", + "CourseOfCondition", + "CourseOfExamination", + "CourseOfMedication", + "CourseOfTreatment", + "ExaminationFindsCondition", + "ExpressionOfGene", + "ExpressionOfVariant", + "FrequencyOfCondition", + "MutationTypeOfGene", + "MutationTypeOfVariant", + "ScaleOfCondition", + "VariantOfGene" + ], + "x-ms-enum": { + "name": "relationType", + "modelAsString": true, + "values": [ + { + "name": "Abbreviation", + "value": "Abbreviation", + "description": "Abbreviation" + }, + { + "name": "DirectionOfBodyStructure", + "value": "DirectionOfBodyStructure", + "description": "Direction of body structure" + }, + { + "name": "DirectionOfCondition", + "value": "DirectionOfCondition", + "description": "Direction of condition" + }, + { + "name": "DirectionOfExamination", + "value": "DirectionOfExamination", + "description": "Direction of examination" + }, + { + "name": "DirectionOfTreatment", + "value": "DirectionOfTreatment", + "description": "Direction of treatment" + }, + { + "name": "DosageOfMedication", + "value": "DosageOfMedication", + "description": "Dosage of medication" + }, + { + "name": "FormOfMedication", + "value": "FormOfMedication", + "description": "Form of medication" + }, + { + "name": "FrequencyOfMedication", + "value": "FrequencyOfMedication", + "description": "Frequency of medication" + }, + { + "name": "FrequencyOfTreatment", + "value": "FrequencyOfTreatment", + "description": "Frequency of treatment" + }, + { + "name": "QualifierOfCondition", + "value": "QualifierOfCondition", + "description": "Qualifier of condition" + }, + { + "name": "RelationOfExamination", + "value": "RelationOfExamination", + "description": "Relation of examination" + }, + { + "name": "RouteOfMedication", + "value": "RouteOfMedication", + "description": "Route of medication" + }, + { + "name": "TimeOfCondition", + "value": "TimeOfCondition", + "description": "Time of condition" + }, + { + "name": "TimeOfEvent", + "value": "TimeOfEvent", + "description": "Time of event" + }, + { + "name": "TimeOfExamination", + "value": "TimeOfExamination", + "description": "Time of examination" + }, + { + "name": "TimeOfMedication", + "value": "TimeOfMedication", + "description": "Time of medication" + }, + { + "name": "TimeOfTreatment", + "value": "TimeOfTreatment", + "description": "Time of treatment" + }, + { + "name": "UnitOfCondition", + "value": "UnitOfCondition", + "description": "Unit of condition" + }, + { + "name": "UnitOfExamination", + "value": "UnitOfExamination", + "description": "Unit of examination" + }, + { + "name": "ValueOfCondition", + "value": "ValueOfCondition", + "description": "Value of condition" + }, + { + "name": "ValueOfExamination", + "value": "ValueOfExamination", + "description": "Value of examination" + }, + { + "name": "BodySiteOfCondition", + "value": "BodySiteOfCondition", + "description": "Body site of condition" + }, + { + "name": "BodySiteOfTreatment", + "value": "BodySiteOfTreatment", + "description": "Body site of treatment" + }, + { + "name": "CourseOfCondition", + "value": "CourseOfCondition", + "description": "Course of condition" + }, + { + "name": "CourseOfExamination", + "value": "CourseOfExamination", + "description": "Course of examination" + }, + { + "name": "CourseOfMedication", + "value": "CourseOfMedication", + "description": "Course of medication" + }, + { + "name": "CourseOfTreatment", + "value": "CourseOfTreatment", + "description": "Course of treatment" + }, + { + "name": "ExaminationFindsCondition", + "value": "ExaminationFindsCondition", + "description": "Examination finds condition" + }, + { + "name": "ExpressionOfGene", + "value": "ExpressionOfGene", + "description": "Expression of gene" + }, + { + "name": "ExpressionOfVariant", + "value": "ExpressionOfVariant", + "description": "Expression of variant" + }, + { + "name": "FrequencyOfCondition", + "value": "FrequencyOfCondition", + "description": "Frequency of condition" + }, + { + "name": "MutationTypeOfGene", + "value": "MutationTypeOfGene", + "description": "Mutation type of gene" + }, + { + "name": "MutationTypeOfVariant", + "value": "MutationTypeOfVariant", + "description": "Mutation type of variant" + }, + { + "name": "ScaleOfCondition", + "value": "ScaleOfCondition", + "description": "Scale of condition" + }, + { + "name": "VariantOfGene", + "value": "VariantOfGene", + "description": "Variant of gene" + } + ] + } } }, "parameters": { - "ShowStats": { - "name": "showStats", + "Azure.Core.Foundations.ApiVersionParameter": { + "name": "api-version", "in": "query", - "description": "(Optional) if set to true, response will contain request and document level statistics.", - "type": "boolean", - "required": false, - "x-ms-parameter-location": "method" - }, - "JobId": { - "description": "Job ID", - "format": "uuid", - "in": "path", - "name": "jobId", + "description": "The API version to use for this operation.", "required": true, "type": "string", - "x-ms-parameter-location": "method" + "minLength": 1, + "x-ms-parameter-location": "method", + "x-ms-client-name": "apiVersion" } } } diff --git a/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/SuccessfulAbstractiveSummarizationTaskResult.json b/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/SuccessfulAbstractiveSummarizationTaskResult.json new file mode 100644 index 000000000000..c4e360982d7c --- /dev/null +++ b/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/SuccessfulAbstractiveSummarizationTaskResult.json @@ -0,0 +1,58 @@ +{ + "operationId": "AnalyzeTextJobStatus", + "title": "SuccessfulAbstractiveSummarizationTaskResult", + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "api-version": "2023-04-01", + "Endpoint": "{Endpoint}", + "jobId": "c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "createdDateTime": "2020-10-01T15:00:45Z", + "displayName": "Document Abstractive Summarization Task Example", + "expirationDateTime": "2020-10-03T15:01:03Z", + "jobId": "c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18", + "lastUpdatedDateTime": "2020-10-01T15:01:03Z", + "status": "succeeded", + "tasks": { + "completed": 1, + "failed": 0, + "inProgress": 0, + "total": 1, + "items": [ + { + "kind": "AbstractiveSummarizationLROResults", + "taskName": "Document Abstractive Summarization Task 1", + "lastUpdateDateTime": "2020-10-01T15:01:03Z", + "status": "succeeded", + "results": { + "documents": [ + { + "summaries": [ + { + "text": "Microsoft have been on a quest to advance AI beyond existing techniques.", + "contexts": [ + { + "offset": 0, + "length": 1629 + } + ] + } + ], + "id": "1", + "warnings": [] + } + ], + "errors": [], + "modelVersion": "latest" + } + } + ] + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/SuccessfulAbstractiveSummarizationTaskSubmit.json b/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/SuccessfulAbstractiveSummarizationTaskSubmit.json new file mode 100644 index 000000000000..7515e1061686 --- /dev/null +++ b/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/SuccessfulAbstractiveSummarizationTaskSubmit.json @@ -0,0 +1,38 @@ +{ + "operationId": "AnalyzeTextSubmitJob", + "title": "SuccessfulAbstractiveSummarizationTaskSubmit", + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "api-version": "2023-04-01", + "Endpoint": "{Endpoint}", + "jobId": "{Job ID}", + "body": { + "displayName": "Document Abstractive Summarization Task Example", + "analysisInput": { + "documents": [ + { + "id": "1", + "language": "en", + "text": "At Microsoft, we have been on a quest to advance AI beyond existing techniques, by taking a more holistic, human-centric approach to learning and understanding. As Chief Technology Officer of Azure AI Cognitive Services, I have been working with a team of amazing scientists and engineers to turn this quest into a reality. In my role, I enjoy a unique perspective in viewing the relationship among three attributes of human cognition: monolingual text (X), audio or visual sensory signals, (Y) and multilingual (Z). At the intersection of all three, there is magic—what we call XYZ-code as illustrated in Figure 1—a joint representation to create more powerful AI that can speak, hear, see, and understand humans better. We believe XYZ-code will enable us to fulfill our long-term vision: cross-domain transfer learning, spanning modalities and languages. The goal is to have pre-trained models that can jointly learn representations to support a broad range of downstream AI tasks, much in the way humans do today. Over the past five years, we have achieved human performance on benchmarks in conversational speech recognition, machine translation, conversational question answering, machine reading comprehension, and image captioning. These five breakthroughs provided us with strong signals toward our more ambitious aspiration to produce a leap in AI capabilities, achieving multi-sensory and multilingual learning that is closer in line with how humans learn and understand. I believe the joint XYZ-code is a foundational component of this aspiration, if grounded with external knowledge sources in the downstream AI tasks." + } + ] + }, + "tasks": [ + { + "kind": "AbstractiveSummarization", + "taskName": "Document Abstractive Summarization Task 1", + "parameters": { + "sentenceCount": 1 + } + } + ] + } + }, + "responses": { + "202": { + "headers": { + "Operation-Location": "{endpoint}/language/analyze-text/jobs/{jobId}?api-version=2023-04-01" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/SuccessfulAnalyzeConversations.json b/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/SuccessfulAnalyzeConversations.json new file mode 100644 index 000000000000..a9c0d16aa049 --- /dev/null +++ b/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/SuccessfulAnalyzeConversations.json @@ -0,0 +1,63 @@ +{ + "operationId": "AnalyzeConversations", + "title": "SuccessfulAnalyzeConversations", + "parameters": { + "Endpoint": "{Endpoint}", + "Ocp-Apim-Subscription-Key": "{API key}", + "Content-Type": "application/json", + "api-version": "2023-04-01", + "body": { + "kind": "Conversation", + "analysisInput": { + "conversationItem": { + "id": "1", + "participantId": "1", + "text": "play In the air tonight from Phil Collins" + } + }, + "parameters": { + "projectName": "{project-name}", + "deploymentName": "{deployment-name}", + "stringIndexType": "TextElement_V8" + } + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "kind": "ConversationResult", + "result": { + "query": "play In the air tonight from Phil Collins", + "prediction": { + "topIntent": "PlayMusic", + "projectKind": "Conversation", + "intents": [ + { + "category": "PlayMusic", + "confidenceScore": 1 + }, + { + "category": "SearchCreativeWork", + "confidenceScore": 0 + }, + { + "category": "AddToPlaylist", + "confidenceScore": 0 + } + ], + "entities": [ + { + "category": "Media.Artist", + "text": "Phil Collins", + "offset": 29, + "length": 12, + "confidenceScore": 1 + } + ] + } + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/SuccessfulAnalyzeConversationsArbitration.json b/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/SuccessfulAnalyzeConversationsArbitration.json new file mode 100644 index 000000000000..c490d574bed4 --- /dev/null +++ b/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/SuccessfulAnalyzeConversationsArbitration.json @@ -0,0 +1,76 @@ +{ + "operationId": "AnalyzeConversations", + "title": "SuccessfulAnalyzeConversationsArbitration", + "parameters": { + "Endpoint": "{Endpoint}", + "Ocp-Apim-Subscription-Key": "{API key}", + "Content-Type": "application/json", + "api-version": "2023-04-01", + "body": { + "kind": "Conversation", + "analysisInput": { + "conversationItem": { + "participantId": "1", + "id": "1", + "modality": "text", + "language": "en-GB", + "text": "trains from London" + } + }, + "parameters": { + "projectName": "{project-name}", + "deploymentName": "{deployment-name}", + "verbose": true, + "isLoggingEnabled": false, + "stringIndexType": "TextElement_V8" + } + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "kind": "ConversationResult", + "result": { + "query": "trains from London", + "prediction": { + "topIntent": "Rail", + "projectKind": "Orchestration", + "intents": { + "Rail": { + "confidenceScore": 1, + "targetProjectKind": "Conversation", + "result": { + "query": "trains from London", + "prediction": { + "topIntent": "Timetable", + "projectKind": "Conversation", + "intents": [ + { + "category": "Timetable", + "confidenceScore": 0.99968535 + }, + { + "category": "Locomotive", + "confidenceScore": 0.000314623 + } + ], + "entities": [] + } + } + }, + "Tree": { + "confidenceScore": 0.2641529, + "targetProjectKind": "QuestionAnswering" + }, + "None": { + "confidenceScore": 0, + "targetProjectKind": "NonLinked" + } + } + } + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/SuccessfulAnalyzeConversationsArbitrationDirectTarget.json b/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/SuccessfulAnalyzeConversationsArbitrationDirectTarget.json new file mode 100644 index 000000000000..9389697a7896 --- /dev/null +++ b/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/SuccessfulAnalyzeConversationsArbitrationDirectTarget.json @@ -0,0 +1,77 @@ +{ + "operationId": "AnalyzeConversations", + "title": "SuccessfulAnalyzeConversationsArbitrationDirectTarget", + "parameters": { + "Endpoint": "{Endpoint}", + "Ocp-Apim-Subscription-Key": "{API key}", + "Content-Type": "application/json", + "api-version": "2023-04-01", + "body": { + "kind": "Conversation", + "analysisInput": { + "conversationItem": { + "text": "Ports and connectors", + "participantId": "1", + "id": "1" + } + }, + "parameters": { + "projectName": "prj1", + "deploymentName": "dep1", + "directTarget": "qnaProject", + "targetProjectParameters": { + "qnaProject": { + "targetProjectKind": "QuestionAnswering", + "callingOptions": { + "context": { + "previousUserQuery": "Meet Surface Pro 4", + "previousQnaId": 4 + }, + "top": 1, + "question": "App Service overview" + } + } + } + } + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "kind": "ConversationResult", + "result": { + "query": "Ports and connectors", + "prediction": { + "projectKind": "Orchestration", + "topIntent": "qnaTargetApp", + "intents": { + "qnaTargetApp": { + "targetProjectKind": "QuestionAnswering", + "confidenceScore": 1, + "result": { + "answers": [ + { + "questions": [ + "App Service overview" + ], + "answer": "The compute resources you use are determined by the *App Service plan* that you run your apps on.", + "confidenceScore": 0.7384000000000001, + "id": 1, + "source": "https://docs.microsoft.com/en-us/azure/app-service/overview", + "metadata": {}, + "dialog": { + "isContextOnly": false, + "prompts": [] + } + } + ] + } + } + } + } + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/SuccessfulAnalyzeConversationsJobsCancelRequest.json b/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/SuccessfulAnalyzeConversationsJobsCancelRequest.json new file mode 100644 index 000000000000..d6fc005abb2d --- /dev/null +++ b/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/SuccessfulAnalyzeConversationsJobsCancelRequest.json @@ -0,0 +1,17 @@ +{ + "operationId": "AnalyzeConversationsCancelJob", + "title": "SuccessfulAnalyzeConversationsJobsCancelRequest", + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "api-version": "2023-04-01", + "Endpoint": "{Endpoint}", + "jobId": "c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18" + }, + "responses": { + "202": { + "headers": { + "Operation-Location": "{Endpoint}/language/analyze-conversations/jobs/{jobId}?api-version=2023-04-01" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/SuccessfulAnalyzeTextJobsCancelRequest.json b/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/SuccessfulAnalyzeTextJobsCancelRequest.json index cab594cfd719..6c7ed641f4de 100644 --- a/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/SuccessfulAnalyzeTextJobsCancelRequest.json +++ b/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/SuccessfulAnalyzeTextJobsCancelRequest.json @@ -1,4 +1,6 @@ { + "operationId": "AnalyzeTextCancelJob", + "title": "SuccessfulAnalyzeTextJobsCancelRequest", "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", "api-version": "2023-04-01", diff --git a/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/SuccessfulAnalyzeTextJobsMultipleTaskStatusRequest.json b/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/SuccessfulAnalyzeTextJobsMultipleTaskStatusRequest.json index 5823008ae035..e3801c07f7b8 100644 --- a/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/SuccessfulAnalyzeTextJobsMultipleTaskStatusRequest.json +++ b/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/SuccessfulAnalyzeTextJobsMultipleTaskStatusRequest.json @@ -1,4 +1,6 @@ { + "operationId": "AnalyzeTextJobStatus", + "title": "SuccessfulAnalyzeTextJobsMultipleTaskStatusRequest", "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", "api-version": "2023-04-01", diff --git a/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/SuccessfulAnalyzeTextJobsMultipleTaskSubmitRequest.json b/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/SuccessfulAnalyzeTextJobsMultipleTaskSubmitRequest.json index b01d275593b4..58831f3a4d7f 100644 --- a/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/SuccessfulAnalyzeTextJobsMultipleTaskSubmitRequest.json +++ b/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/SuccessfulAnalyzeTextJobsMultipleTaskSubmitRequest.json @@ -1,4 +1,6 @@ { + "operationId": "AnalyzeTextSubmitJob", + "title": "SuccessfulAnalyzeTextJobsMultipleTaskSubmitRequest", "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", "api-version": "2023-04-01", @@ -42,7 +44,7 @@ "responses": { "202": { "headers": { - "Operation-Location": "{endpoint}/language/analyze-text/jobs/{jobId}" + "Operation-Location": "{endpoint}/language/analyze-text/jobs/{jobId}?api-version=2023-04-01" } } } diff --git a/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/SuccessfulConversationSummarizationTaskResult.json b/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/SuccessfulConversationSummarizationTaskResult.json new file mode 100644 index 000000000000..2311c12a9a19 --- /dev/null +++ b/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/SuccessfulConversationSummarizationTaskResult.json @@ -0,0 +1,77 @@ +{ + "operationId": "AnalyzeConversationsJobStatus", + "title": "SuccessfulConversationSummarizationTaskResult", + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "api-version": "2023-04-01", + "Endpoint": "{Endpoint}", + "jobId": "3e9e8518-492f-47f9-abd1-9a7468231086" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "displayName": "Conversation Summarization Example", + "createdDateTime": "2022-04-01T15:00:45Z", + "expirationDateTime": "2022-04-02T15:00:45Z", + "jobId": "3e9e8518-492f-47f9-abd1-9a7468231086", + "lastUpdatedDateTime": "2022-04-01T15:00:49Z", + "status": "succeeded", + "tasks": { + "completed": 1, + "failed": 0, + "inProgress": 0, + "total": 1, + "items": [ + { + "kind": "ConversationalSummarizationResults", + "lastUpdateDateTime": "2022-04-01T15:00:49Z", + "taskName": "Conversation Summarization Task 1", + "status": "succeeded", + "results": { + "conversations": [ + { + "id": "1", + "summaries": [ + { + "aspect": "chapterTitle", + "text": "Bug Triage", + "contexts": [ + { + "conversationItemId": "2", + "offset": 4, + "length": 39 + } + ] + }, + { + "aspect": "narrative", + "text": "Speaker 3 believes there are 3 remaining bugs.", + "contexts": [ + { + "conversationItemId": "2", + "offset": 4, + "length": 39 + }, + { + "conversationItemId": "3", + "offset": 0, + "length": 7 + } + ] + } + ], + "warnings": [] + } + ], + "errors": [], + "modelVersion": "latest" + } + } + ] + }, + "nextLink": "/language/analyze-conversation/jobs/3e9e8518-492f-47f9-abd1-9a7468231086?$skip=10&$top=10" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/SuccessfulConversationSummarizationTaskStatusRequest.json b/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/SuccessfulConversationSummarizationTaskStatusRequest.json new file mode 100644 index 000000000000..faab96c58233 --- /dev/null +++ b/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/SuccessfulConversationSummarizationTaskStatusRequest.json @@ -0,0 +1,61 @@ +{ + "operationId": "AnalyzeConversationsJobStatus", + "title": "SuccessfulConversationSummarizationTaskStatusRequest", + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "api-version": "2023-04-01", + "Endpoint": "{Endpoint}", + "jobId": "c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "displayName": "Analyze chat", + "createdDateTime": "2022-04-01T15:00:45Z", + "expirationDateTime": "2022-04-02T15:00:45Z", + "jobId": "3e9e8518-492f-47f9-abd1-9a7468231086", + "lastUpdatedDateTime": "2022-04-01T15:00:49Z", + "status": "succeeded", + "tasks": { + "completed": 1, + "failed": 0, + "inProgress": 0, + "total": 1, + "items": [ + { + "kind": "ConversationalSummarizationResults", + "lastUpdateDateTime": "2022-04-01T15:00:49Z", + "taskName": "analyze 1", + "status": "succeeded", + "results": { + "conversations": [ + { + "id": "20220101meeting", + "summaries": [ + { + "aspect": "issue", + "text": "Customer wants to cancel his subscription. Customer doesn't know how" + }, + { + "aspect": "resolution", + "text": "pii Auto-Fortify. \npii Gamertag.\npii E-mail.\nCanceled customer's subscription" + } + ], + "warnings": [], + "statistics": { + "transactionsCount": 1 + } + } + ], + "errors": [], + "modelVersion": "latest" + } + } + ] + }, + "nextLink": "/language/analyze-conversation/jobs/3e9e8518-492f-47f9-abd1-9a7468231086?$skip=10&$top=10" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/SuccessfulConversationSummarizationTaskSubmit.json b/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/SuccessfulConversationSummarizationTaskSubmit.json new file mode 100644 index 000000000000..692a6cebe5d8 --- /dev/null +++ b/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/SuccessfulConversationSummarizationTaskSubmit.json @@ -0,0 +1,79 @@ +{ + "operationId": "AnalyzeConversationsSubmitJob", + "title": "SuccessfulConversationSummarizationTaskSubmit", + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "api-version": "2023-04-01", + "Endpoint": "{Endpoint}", + "jobId": "{Job ID}", + "body": { + "displayName": "Conversation Summarization Example", + "analysisInput": { + "conversations": [ + { + "id": "1", + "language": "en", + "modality": "transcript", + "conversationItems": [ + { + "participantId": "speaker 1", + "id": "1", + "text": "Let's get started.", + "lexical": "", + "itn": "", + "maskedItn": "", + "conversationItemLevelTiming": { + "offset": 0, + "duration": 20000000 + } + }, + { + "participantId": "speaker 2", + "id": "2", + "text": "OK. How many remaining bugs do we have now?", + "lexical": "", + "itn": "", + "maskedItn": "", + "conversationItemLevelTiming": { + "offset": 20000000, + "duration": 50000000 + } + }, + { + "participantId": "speaker 3", + "id": "3", + "text": "Only 3.", + "lexical": "", + "itn": "", + "maskedItn": "", + "conversationItemLevelTiming": { + "offset": 50000000, + "duration": 60000000 + } + } + ] + } + ] + }, + "tasks": [ + { + "taskName": "Conversation Summarization Task 1", + "kind": "ConversationalSummarizationTask", + "parameters": { + "summaryAspects": [ + "chapterTitle", + "narrative" + ] + } + } + ] + } + }, + "responses": { + "202": { + "headers": { + "Operation-Location": "{Endpoint}/language/analyze-conversation/jobs/{jobId}?api-version=2023-04-01" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/SuccessfulConversationSummarySubmit.json b/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/SuccessfulConversationSummarySubmit.json new file mode 100644 index 000000000000..b311f55cdd41 --- /dev/null +++ b/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/SuccessfulConversationSummarySubmit.json @@ -0,0 +1,63 @@ +{ + "operationId": "AnalyzeConversationsSubmitJob", + "title": "SuccessfulConversationSummarySubmit", + "parameters": { + "Ocp-Apim-Subscription-Key": "{API key}", + "api-version": "2023-04-01", + "Endpoint": "{Endpoint}", + "jobId": "{Job ID}", + "body": { + "displayName": "Analyze conversations from Contoso meeting", + "analysisInput": { + "conversations": [ + { + "id": "20220101meeting", + "language": "en", + "modality": "text", + "domain": "generic", + "conversationItems": [ + { + "participantId": "user", + "role": "customer", + "id": "1", + "text": "Hi!" + }, + { + "participantId": "agent", + "role": "agent", + "id": "2", + "text": "Hello, how can I help you?" + }, + { + "participantId": "user", + "role": "customer", + "id": "3", + "text": "I am having trouble issuing a return of a game on my xbox: call of duty" + } + ] + } + ] + }, + "tasks": [ + { + "taskName": "analyze 1", + "kind": "ConversationalSummarizationTask", + "parameters": { + "modelVersion": "latest", + "summaryAspects": [ + "issue", + "resolution" + ] + } + } + ] + } + }, + "responses": { + "202": { + "headers": { + "Operation-Location": "{Endpoint}/language/analyze-conversation/jobs/{jobId}?api-version=2023-04-01" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/SuccessfulEntityLinkingRequest.json b/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/SuccessfulEntityLinkingRequest.json index 4c26cafd35d9..a76270e6f8e9 100644 --- a/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/SuccessfulEntityLinkingRequest.json +++ b/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/SuccessfulEntityLinkingRequest.json @@ -1,4 +1,6 @@ { + "operationId": "AnalyzeText", + "title": "SuccessfulEntityLinkingRequest", "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", "api-version": "2023-04-01", diff --git a/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/SuccessfulEntityRecognitionRequest.json b/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/SuccessfulEntityRecognitionRequest.json index 3c446c0e6d09..e2e355176a8f 100644 --- a/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/SuccessfulEntityRecognitionRequest.json +++ b/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/SuccessfulEntityRecognitionRequest.json @@ -1,4 +1,6 @@ { + "operationId": "AnalyzeText", + "title": "SuccessfulEntityRecognitionRequest", "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", "api-version": "2023-04-01", diff --git a/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/SuccessfulKeyPhraseExtractionRequest.json b/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/SuccessfulKeyPhraseExtractionRequest.json index 59098ab951ab..1c528e9587b3 100644 --- a/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/SuccessfulKeyPhraseExtractionRequest.json +++ b/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/SuccessfulKeyPhraseExtractionRequest.json @@ -1,4 +1,6 @@ { + "operationId": "AnalyzeText", + "title": "SuccessfulKeyPhraseExtractionRequest", "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", "api-version": "2023-04-01", @@ -63,7 +65,7 @@ } ], "errors": [], - "modelVersion": "2019-10-01" + "modelVersion": "2021-06-01" } } } diff --git a/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/SuccessfulLanguageDetectionRequest.json b/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/SuccessfulLanguageDetectionRequest.json index 3e96dca0095e..1fe8c2e6a8a6 100644 --- a/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/SuccessfulLanguageDetectionRequest.json +++ b/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/SuccessfulLanguageDetectionRequest.json @@ -1,4 +1,6 @@ { + "operationId": "AnalyzeText", + "title": "SuccessfulLanguageDetectionRequest", "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", "api-version": "2023-04-01", @@ -21,6 +23,10 @@ { "id": "3", "text": "Hola mundo" + }, + { + "id": "4", + "text": "Tumhara naam kya hai?" } ] } @@ -59,10 +65,19 @@ }, "id": "3", "warnings": [] + }, + { + "detectedLanguage": { + "confidenceScore": 1, + "iso6391Name": "hi", + "name": "Hindi" + }, + "id": "4", + "warnings": [] } ], "errors": [], - "modelVersion": "2020-04-01" + "modelVersion": "2021-01-05" } } } diff --git a/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/SuccessfulPiiEntityRecognitionRequest.json b/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/SuccessfulPiiEntityRecognitionRequest.json index db0fefd14d21..c349530542f7 100644 --- a/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/SuccessfulPiiEntityRecognitionRequest.json +++ b/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/SuccessfulPiiEntityRecognitionRequest.json @@ -1,4 +1,6 @@ { + "operationId": "AnalyzeText", + "title": "SuccessfulPiiEntityRecognitionRequest", "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", "api-version": "2023-04-01", @@ -41,7 +43,7 @@ "redactedText": "My SSN is ***********", "entities": [ { - "category": "U.S. Social Security Number (SSN)", + "category": "USSocialSecurityNumber", "confidenceScore": 0.65, "length": 11, "offset": 28, @@ -55,7 +57,7 @@ "redactedText": "Your ABA number - ********* - is the first 9 digits in the lower left hand corner of your personal check.", "entities": [ { - "category": "ABA Routing Number", + "category": "ABARoutingNumber", "confidenceScore": 0.75, "length": 9, "offset": 18, @@ -69,7 +71,7 @@ "redactedText": "Is ************** your Brazilian CPF number?", "entities": [ { - "category": "Brazil CPF Number", + "category": "BRCPFNumber", "confidenceScore": 0.85, "length": 14, "offset": 3, @@ -80,7 +82,7 @@ } ], "errors": [], - "modelVersion": "2019-10-01" + "modelVersion": "2021-01-15" } } } diff --git a/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/SuccessfulSentimentAnalysisRequest.json b/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/SuccessfulSentimentAnalysisRequest.json index 39c57ca40a75..ad6a30557857 100644 --- a/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/SuccessfulSentimentAnalysisRequest.json +++ b/specification/cognitiveservices/data-plane/Language/stable/2023-04-01/examples/SuccessfulSentimentAnalysisRequest.json @@ -1,4 +1,6 @@ { + "operationId": "AnalyzeText", + "title": "SuccessfulSentimentAnalysisRequest", "parameters": { "Ocp-Apim-Subscription-Key": "{API key}", "api-version": "2023-04-01", @@ -140,7 +142,7 @@ } ], "errors": [], - "modelVersion": "2020-04-01" + "modelVersion": "2021-10-01" } } }