Skip to content

Commit f3e0d43

Browse files
Summarization API for 2022-10-01-preview (#19523)
* patch now 3 * patch now 4 * patch now 5 * test encoding * test encoding * doc abs req * text sum * conv * example * BOM * revert * add timing * add missing parent * custom api * more descriptions * add more required fields * add custom task and result * add more description to summary controls * fix base class bug, add lab features, ext phrase c * add CustomAbstractiveSummarizationLROResults * add examples * auth example * remove dup * require storage * remove invalid example, rename item id * fix example * add more description * fix invalid char in example, unify enum value * remove customization * fix example * revert ext sum, denorm conv * fix typo * 10 * spec * revert * remove lab features, rename timing, narrative * fix examples * merge upstream * Revert "merge upstream" This reverts commit 07fc9c6. * fetch upstream * common ver * get 07-01 back to readme * revert changes to extractive summarization * prettier * add word Co-authored-by: Yuantao Wang <yuantw@microsoft.com>
1 parent 37c9b56 commit f3e0d43

10 files changed

+557
-12
lines changed

custom-words.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ aapl
99
AATP
1010
abcxyz
1111
ABFS
12+
Abstractive
1213
ABGRABGR
1314
Accel
1415
ACCELCONTAINER

dev/cognitiveservices/data-plane/Language/analyzeconversations.json

Lines changed: 72 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"info": {
44
"title": "Microsoft Cognitive Language Service - Analyze Conversations",
55
"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.",
6-
"version": "2022-07-01-preview"
6+
"version": "2022-10-01-preview"
77
},
88
"securityDefinitions": {
99
"apim_key": {
@@ -132,6 +132,9 @@
132132
},
133133
"Successful Conversation Summarization Analysis Job Request": {
134134
"$ref": "./examples/conversations/SuccessfulConversationSummarySubmit.json"
135+
},
136+
"Successful Conversation Summarization Task Submit": {
137+
"$ref": "./examples/conversations/SuccessfulConversationSummarizationTaskSubmit.json"
135138
}
136139
},
137140
"x-ms-long-running-operation": true
@@ -176,6 +179,9 @@
176179
},
177180
"Successful Get Text Conversation Analysis Job Status Request": {
178181
"$ref": "./examples/conversations/SuccessfulConversationSummarizationTaskStatusRequest.json"
182+
},
183+
"Successful Get Conversation Summarization Result": {
184+
"$ref": "./examples/conversations/SuccessfulConversationSummarizationTaskResult.json"
179185
}
180186
}
181187
}
@@ -1772,7 +1778,7 @@
17721778
"properties": {
17731779
"itn": {
17741780
"type": "string",
1775-
"description": "Inverse Text Normalization representation of input. The inverse-text-normalized form is the recognized text from Microsofts Speech to Text API, with phone numbers, numbers, abbreviations, and other transformations applied."
1781+
"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."
17761782
},
17771783
"maskedItn": {
17781784
"type": "string",
@@ -1786,12 +1792,16 @@
17861792
"type": "string",
17871793
"description": "The lexical form of the recognized text from speech to text API with the actual words recognized."
17881794
},
1789-
"audioTimings": {
1795+
"wordLevelTimings": {
17901796
"type": "array",
17911797
"description": "The list of word level audio timing information",
17921798
"items": {
17931799
"$ref": "#/definitions/WordLevelTiming"
17941800
}
1801+
},
1802+
"conversationItemLevelTiming": {
1803+
"description": "Conversation item level audio timing. This still can help on AI quality if word level audio timings are not available.",
1804+
"$ref": "#/definitions/ConversationItemLevelTiming"
17951805
}
17961806
}
17971807
},
@@ -2044,18 +2054,41 @@
20442054
"type": "string",
20452055
"enum": [
20462056
"issue",
2047-
"resolution"
2057+
"resolution",
2058+
"chapterTitle",
2059+
"narrative"
20482060
],
20492061
"x-ms-enum": {
20502062
"name": "SummaryAspect",
2051-
"modelAsString": true
2063+
"modelAsString": true,
2064+
"values": [
2065+
{
2066+
"value": "issue",
2067+
"description": "A summary of issues in transcripts of web chats and service call transcripts between customer-service agents, and your customers."
2068+
},
2069+
{
2070+
"value": "resolution",
2071+
"description": "A summary of resolutions in transcripts of web chats and service call transcripts between customer-service agents, and your customers."
2072+
},
2073+
{
2074+
"value": "chapterTitle",
2075+
"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."
2076+
},
2077+
{
2078+
"value": "narrative",
2079+
"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."
2080+
}
2081+
]
20522082
}
20532083
}
20542084
}
20552085
},
20562086
"allOf": [
20572087
{
20582088
"$ref": "common.json#/definitions/PreBuiltTaskParameters"
2089+
},
2090+
{
2091+
"$ref": "common.json#/definitions/AbstractiveSummarizationTaskParametersBase"
20592092
}
20602093
]
20612094
},
@@ -2129,6 +2162,13 @@
21292162
},
21302163
"text": {
21312164
"type": "string"
2165+
},
2166+
"contexts": {
2167+
"type": "array",
2168+
"description": "The context list of the summary.",
2169+
"items": {
2170+
"$ref": "#/definitions/ItemizedSummaryContext"
2171+
}
21322172
}
21332173
},
21342174
"required": [
@@ -2291,6 +2331,33 @@
22912331
"$ref": "common.json#/definitions/RequestStatistics"
22922332
}
22932333
]
2334+
},
2335+
"ConversationItemLevelTiming": {
2336+
"type": "object",
2337+
"description": "The conversation item level audio timing.",
2338+
"allOf": [
2339+
{
2340+
"$ref": "#/definitions/AudioTiming"
2341+
}
2342+
]
2343+
},
2344+
"ItemizedSummaryContext": {
2345+
"type": "object",
2346+
"description": "The context of the summary with conversation item id.",
2347+
"required": [
2348+
"conversationItemId"
2349+
],
2350+
"properties": {
2351+
"conversationItemId": {
2352+
"type": "string",
2353+
"description": "Reference to the id of ConversationItem."
2354+
}
2355+
},
2356+
"allOf": [
2357+
{
2358+
"$ref": "common.json#/definitions/SummaryContext"
2359+
}
2360+
]
22942361
}
22952362
},
22962363
"parameters": {

dev/cognitiveservices/data-plane/Language/analyzetext.json

Lines changed: 138 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"info": {
44
"title": "Microsoft Cognitive Language Service - Text Analysis",
55
"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 <a href=\"https://docs.microsoft.com/en-us/azure/cognitive-services/language-service/overview\">https://docs.microsoft.com/en-us/azure/cognitive-services/language-service/overview</a>.0",
6-
"version": "2022-07-01-preview"
6+
"version": "2022-10-01-preview"
77
},
88
"securityDefinitions": {
99
"apim_key": {
@@ -139,6 +139,9 @@
139139
},
140140
"Successful Healthcare Post Request": {
141141
"$ref": "./examples/text/SuccessfulHealthcarePostRequest.json"
142+
},
143+
"Successful Submit Abstractive Summarization Task": {
144+
"$ref": "./examples/text/SuccessfulAbstractiveSummarizationTaskSubmit.json"
142145
}
143146
},
144147
"x-ms-long-running-operation": true
@@ -189,6 +192,9 @@
189192
},
190193
"Successful Get Text Analysis Health Request": {
191194
"$ref": "./examples/text/SuccessfulHealthcareTaskStatusRequest.json"
195+
},
196+
"Successful Get Abstractive Summarization Result": {
197+
"$ref": "./examples/text/SuccessfulAbstractiveSummarizationTaskResult.json"
192198
}
193199
}
194200
}
@@ -264,7 +270,8 @@
264270
"ExtractiveSummarization",
265271
"CustomEntityRecognition",
266272
"CustomSingleLabelClassification",
267-
"CustomMultiLabelClassification"
273+
"CustomMultiLabelClassification",
274+
"AbstractiveSummarization"
268275
],
269276
"x-ms-enum": {
270277
"name": "AnalyzeTextLROTaskKind",
@@ -300,7 +307,8 @@
300307
"ExtractiveSummarizationLROResults",
301308
"CustomEntityRecognitionLROResults",
302309
"CustomSingleLabelClassificationLROResults",
303-
"CustomMultiLabelClassificationLROResults"
310+
"CustomMultiLabelClassificationLROResults",
311+
"AbstractiveSummarizationLROResults"
304312
],
305313
"x-ms-enum": {
306314
"name": "AnalyzeTextLROResultsKind",
@@ -2718,6 +2726,133 @@
27182726
"type": "string"
27192727
}
27202728
}
2729+
},
2730+
"AbstractiveSummarizationLROTask": {
2731+
"type": "object",
2732+
"description": "An object representing the task definition for an Abstractive Summarization task.",
2733+
"required": [
2734+
"parameters"
2735+
],
2736+
"properties": {
2737+
"parameters": {
2738+
"$ref": "#/definitions/AbstractiveSummarizationTaskParameters"
2739+
}
2740+
},
2741+
"allOf": [
2742+
{
2743+
"$ref": "#/definitions/AnalyzeTextLROTask"
2744+
}
2745+
],
2746+
"x-ms-discriminator-value": "AbstractiveSummarization"
2747+
},
2748+
"AbstractiveSummarizationTaskParameters": {
2749+
"type": "object",
2750+
"description": "Supported parameters for the pre-build Abstractive Summarization task.",
2751+
"allOf": [
2752+
{
2753+
"$ref": "common.json#/definitions/AbstractiveSummarizationTaskParametersBase"
2754+
},
2755+
{
2756+
"$ref": "common.json#/definitions/PreBuiltTaskParameters"
2757+
}
2758+
]
2759+
},
2760+
"AbstractiveSummarizationLROResults": {
2761+
"type": "object",
2762+
"description": "An object representing the results for an Abstractive Summarization task.",
2763+
"properties": {
2764+
"results": {
2765+
"$ref": "#/definitions/AbstractiveSummarizationResult"
2766+
}
2767+
},
2768+
"allOf": [
2769+
{
2770+
"$ref": "#/definitions/AnalyzeTextLROResult"
2771+
}
2772+
],
2773+
"required": [
2774+
"results"
2775+
],
2776+
"x-ms-discriminator-value": "AbstractiveSummarizationLROResults"
2777+
},
2778+
"AbstractiveSummarizationResultBase": {
2779+
"type": "object",
2780+
"description": "An object representing the summarization results of each document.",
2781+
"properties": {
2782+
"documents": {
2783+
"type": "array",
2784+
"description": "Response by document",
2785+
"items": {
2786+
"allOf": [
2787+
{
2788+
"$ref": "#/definitions/AbstractiveSummaryDocumentResult"
2789+
},
2790+
{
2791+
"$ref": "#/definitions/DocumentDetectedLanguage"
2792+
}
2793+
]
2794+
}
2795+
}
2796+
},
2797+
"required": [
2798+
"documents"
2799+
]
2800+
},
2801+
"AbstractiveSummarizationResult": {
2802+
"type": "object",
2803+
"description": "An object representing the pre-build summarization results of each document.",
2804+
"allOf": [
2805+
{
2806+
"$ref": "#/definitions/AbstractiveSummarizationResultBase"
2807+
},
2808+
{
2809+
"$ref": "common.json#/definitions/PreBuiltResult"
2810+
}
2811+
],
2812+
"required": [
2813+
"documents"
2814+
]
2815+
},
2816+
"AbstractiveSummaryDocumentResult": {
2817+
"type": "object",
2818+
"description": "An object representing the summarization result of a single document.",
2819+
"properties": {
2820+
"summaries": {
2821+
"type": "array",
2822+
"description": "A list of abstractive summaries.",
2823+
"items": {
2824+
"$ref": "#/definitions/AbstractiveSummary"
2825+
}
2826+
}
2827+
},
2828+
"allOf": [
2829+
{
2830+
"$ref": "#/definitions/DocumentResult"
2831+
}
2832+
],
2833+
"required": [
2834+
"summaries"
2835+
]
2836+
},
2837+
"AbstractiveSummary": {
2838+
"type": "object",
2839+
"description": "An object representing a single summary with context for given document.",
2840+
"properties": {
2841+
"text": {
2842+
"type": "string",
2843+
"description": "The text of the summary."
2844+
},
2845+
"contexts": {
2846+
"type": "array",
2847+
"description": "The context list of the summary.",
2848+
"items": {
2849+
"$ref": "common.json#/definitions/SummaryContext"
2850+
}
2851+
}
2852+
},
2853+
"required": [
2854+
"text"
2855+
]
27212856
}
27222857
},
27232858
"parameters": {}

0 commit comments

Comments
 (0)