You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`-X POST <endpoint>`| Specifies your endpoint for accessing the API. |
377
-
|`-H Content-Type: application/json`| The content type for sending JSON data. |
378
-
|`-H "Ocp-Apim-Subscription-Key:<key>`| Specifies the key for accessing the API. |
379
-
|`-d <documents>`| The JSON containing the documents you want to send. |
374
+
### Summarization sample document
380
375
381
-
The following cURL commands are executed from a BASH shell. Edit these commands with your own JSON values.
376
+
For this project, you need a **source document** uploaded to your **source container**. You can download our [Microsoft Word sample document](https://raw.githubusercontent.com/Azure-Samples/cognitive-services-REST-api-samples/master/curl/Language/native-document-summarization.docx) or [Adobe PDF](https://raw.githubusercontent.com/Azure-Samples/cognitive-services-REST-api-samples/master/curl/Language/native-document-summarization.pdf) for this quickstart. The source language is English.
382
377
383
-
##Document summarization
378
+
### Build the POST request
384
379
385
-
### Document extractive summarization example
380
+
1. Using your preferred editor or IDE, create a new directory for your app named `native-document`.
381
+
1. Create a new json file called **document-summarization.json** in your **native-document** directory.
386
382
387
-
The following example will get you started with document extractive summarization:
383
+
1. Copy and paste the Document Summarization **request sample** into your `document-summarization.json` file. Replace **`{your-source-container-SAS-URL}`** and **`{your-target-container-SAS-URL}`** with values from your Azure portal Storage account containers instance:
388
384
389
-
1. Copy the command below into a text editor. The BASH example uses the `\` line continuation character. If your console or terminal uses a different line continuation character, use that character instead.
385
+
***Request sample***
390
386
391
-
```bash
392
-
curl -i -X POST $LANGUAGE_ENDPOINT/language/analyze-text/jobs?api-version=2023-04-01 \
"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 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’s 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."
2. Open a command prompt window (for example: BASH).
409
+
### Run the POST request
422
410
423
-
3. Paste the command from the text editor into the command prompt window, then run the command.
411
+
Before you run the **POST** request, replace `{your-language-resource-endpoint}` and `{your-key}` with the endpoint value from your Azure portal Language resource instance.
424
412
425
-
4. Get the `operation-location` from the response header. The value will look similar to the following URL:
413
+
> [!IMPORTANT]
414
+
> Remember to remove the key from your code when you're done, and never post it publicly. For production, use a secure way of storing and accessing your credentials like [Azure Key Vault](/azure/key-vault/general/overview). For more information, *see* Azure AI services [security](/azure/ai-services/security-features).
5. To get the results of the request, use the following cURL command. Be sure to replace `<my-job-id>` with the numerical ID value you received from the previous `operation-location` response header:
You receive a 202 (Success) response that includes a read-only Operation-Location header. The value of this header contains a jobId that can be queried to get the status of the asynchronous operation and retrieve the results using a GET request:
442
+
443
+
:::image type="content" source="media/operation-location-result-id.png" alt-text="Screenshot showing the operation-location value in the POST response.":::
444
+
445
+
### Get analyze results (GET request)
446
+
447
+
1. After your successful **POST** request, poll the operation-location header returned in the POST request to view the processed data.
448
+
449
+
1. Here's the structure of the **GET** request:
450
+
451
+
```http
452
+
GET {cognitive-service-endpoint}/language/analyze-documents/jobs/{jobId}?api-version=2023-11-15-preview
453
+
```
454
+
455
+
1. Before you run the command, make these changes:
456
+
457
+
* Replace {**jobId**} with the Operation-Location header from the POST response.
458
+
459
+
* Replace {**your-language-resource-endpoint**} and {**your-key**} with the values from your Language service instance in the Azure portal.
### Text extractive summarization example JSON response
471
+
#### Examine the response
472
+
473
+
You receive a 200 (Success) response with JSON output. The **status** field indicates the result of the operation. If the operation isn't complete, the value of **status** is "running" or "notStarted", and you should call the API again, either manually or through a script. We recommend an interval of one second or more between calls.
"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.",
468
-
"rankScore": 0.69,
469
-
"offset": 0,
470
-
"length": 160
471
-
},
472
-
{
473
-
"text": "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).",
474
-
"rankScore": 0.66,
475
-
"offset": 324,
476
-
"length": 192
477
-
},
478
-
{
479
-
"text": "At the intersection of all three, there’s 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.",
480
-
"rankScore": 0.63,
481
-
"offset": 517,
482
-
"length": 203
483
-
},
484
-
{
485
-
"text": "We believe XYZ-code will enable us to fulfill our long-term vision: cross-domain transfer learning, spanning modalities and languages.",
486
-
"rankScore": 1.0,
487
-
"offset": 721,
488
-
"length": 134
489
-
},
490
-
{
491
-
"text": "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.",
492
-
"rankScore": 0.74,
493
-
"offset": 856,
494
-
"length": 159
495
-
},
496
-
{
497
-
"text": "I believe the joint XYZ-code is a foundational component of this aspiration, if grounded with external knowledge sources in the downstream AI tasks.",
Copy file name to clipboardExpand all lines: articles/ai-services/language-service/summarization/overview.md
+15-40Lines changed: 15 additions & 40 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -69,31 +69,6 @@ This documentation contains the following article types:
69
69
***[Quickstarts](quickstart.md?pivots=rest-api&tabs=conversation-summarization)** are getting-started instructions to guide you through making requests to the service.
70
70
***[How-to guides](how-to/conversation-summarization.md)** contain instructions for using the service in more specific or customized ways.
This documentation contains the following article types:
75
-
76
-
***[Quickstarts](quickstart.md?pivots=rest-api&tabs=text-summarization)** are getting-started instructions to guide you through making requests to the service.
77
-
***[How-to guides](how-to/document-summarization.md)** contain instructions for using the service in more specific or customized ways.
78
-
79
-
Document summarization uses natural language processing techniques to generate a summary for documents. There are two supported API approaches to automatic summarization: extractive and abstractive.
80
-
81
-
---
82
-
83
-
# [Text summarization](#tab/text-summarization)
84
-
85
-
A native document refers to the file format used to create the original document such as Microsoft Word (docx) or a portable document file (pdf). Native document support eliminates the need for text preprocessing prior to using Azure AI Language resource capabilities. Currently, native document support is available for both [**AbstractiveSummarization**](../summarization/how-to/document-summarization.md#try-text-abstractive-summarization) and [**ExtractiveSummarization**](../summarization/how-to/document-summarization.md#try-text-extractive-summarization) capabilities.
86
-
87
-
Currently **Text Summarization** supports the following native document formats:
|Microsoft Word|`.docx`|A Microsoft Word document file.|
94
-
95
-
For more information, *see*[**Use native documents for language processing**](../native-document-support/use-native-documents.md)
96
-
97
72
## Key features for conversation summarization
98
73
99
74
Conversation summarization supports the following features:
@@ -104,14 +79,6 @@ Conversation summarization supports the following features:
104
79
*[**Narrative summarization**](how-to/conversation-summarization.md#get-narrative-summarization): Generates detail call notes, meeting notes or chat summaries of the input conversation.
105
80
*[**Follow-up tasks**](how-to/conversation-summarization.md#get-narrative-summarization): Gives a list of follow-up tasks discussed in the input conversation.
106
81
107
-
## When to use issue and resolution summarization
108
-
109
-
* When there are aspects of an "issue" and "resolution" such as:
110
-
* The reason for a service chat/call (the issue).
111
-
* That resolution for the issue.
112
-
* You only want a summary that focuses on related information about issues and resolutions.
113
-
* When there are two participants in the conversation, and you want to summarize what each had said.
114
-
115
82
As an example, consider the following example conversation:
116
83
117
84
**Agent**: "*Hello, you're chatting with Rene. How may I help you?*"
@@ -139,16 +106,26 @@ Conversation summarization feature would simplify the text as follows:
139
106
| Customer wants to use the wifi connection on their Smart Brew 300. But it didn't work. | One or two sentences | issue |
140
107
| Checked if the power light is blinking slowly. Checked the Contoso coffee app. It had no prompt. Tried to do a factory reset. | One or more sentences, generated from multiple lines of the transcript. | resolution |
***[Quickstarts](quickstart.md?pivots=rest-api&tabs=text-summarization)** are getting-started instructions to guide you through making requests to the service.
114
+
***[How-to guides](how-to/document-summarization.md)** contain instructions for using the service in more specific or customized ways.
147
115
148
-
No information currently available.
116
+
Document summarization uses natural language processing techniques to generate a summary for documents. There are two supported API approaches to automatic summarization: extractive and abstractive.
149
117
150
-
---
118
+
A native document refers to the file format used to create the original document such as Microsoft Word (docx) or a portable document file (pdf). Native document support eliminates the need for text preprocessing prior to using Azure AI Language resource capabilities. Currently, native document support is available for both [**AbstractiveSummarization**](../summarization/how-to/document-summarization.md#try-text-abstractive-summarization) and [**ExtractiveSummarization**](../summarization/how-to/document-summarization.md#try-text-extractive-summarization) capabilities.
151
119
120
+
Currently **Text Summarization** supports the following native document formats:
0 commit comments