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
> <ahref="https://microsoft.qualtrics.com/jfe/form/SV_0Cl5zkG3CnDjq6O?PLanguage=CSHARP&Pillar=Language&Product=Summarization&Page=quickstart&Section=Create-environment-variables"target="_target">I ran into an issue</a>
44
+
40
45
### Create a new .NET Core application
41
46
42
47
Using the Visual Studio IDE, create a new .NET Core console app. This will create a "Hello World" project with a single C# source file: *program.cs*.
@@ -56,7 +61,7 @@ Install the client library by right-clicking on the solution in the **Solution E
56
61
57
62
## Code example
58
63
59
-
Copy the following code into your *program.cs* file. Remember to replace the `key` variable with the key for your resource, and replace the `endpoint` variable with the endpoint for your resource. Then run the code.
64
+
Copy the following code into your *program.cs* file. Then run the code.
60
65
61
66
[!INCLUDE [find the key and endpoint for a resource](../../../includes/find-azure-resource-info.md)]
Copy file name to clipboardExpand all lines: articles/cognitive-services/language-service/summarization/includes/quickstarts/java-sdk.md
+10-4Lines changed: 10 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,9 +46,14 @@ Create a Maven project in your preferred IDE or development environment. Then ad
46
46
> [!div class="nextstepaction"]
47
47
> <ahref="https://microsoft.qualtrics.com/jfe/form/SV_0Cl5zkG3CnDjq6O?PLanguage=CSHARP&Pillar=Language&Product=Summarization&Page=quickstart&Section=Set-up-the-environment"target="_target">I ran into an issue</a>
> <ahref="https://microsoft.qualtrics.com/jfe/form/SV_0Cl5zkG3CnDjq6O?PLanguage=JAVA&Pillar=Language&Product=Summarization&Page=quickstart&Section=Create-environment-variables"target="_target">I ran into an issue</a>
53
+
49
54
## Code example
50
55
51
-
Create a Java file named `Example.java`. Open the file and copy the below code. Remember to replace the `key` variable with the key for your resource, and replace the `endpoint` variable with the endpoint for your resource. Then run the code.
56
+
Create a Java file named `Example.java`. Open the file and copy the below code. Then run the code.
52
57
53
58
[!INCLUDE [find the key and endpoint for a resource](../../../includes/find-azure-resource-info.md)]
> <ahref="https://microsoft.qualtrics.com/jfe/form/SV_0Cl5zkG3CnDjq6O?PLanguage=JAVASCRIPT&Pillar=Language&Product=Summarization&Page=quickstart&Section=Create-environment-variables"target="_target">I ran into an issue</a>
36
+
32
37
### Create a new Node.js application
33
38
34
39
In a console window (such as cmd, PowerShell, or Bash), create a new directory for your app, and navigate to it.
Open the file and copy the below code. Remember to replace the `key` variable with the key for your resource, and replace the `endpoint` variable with the endpoint for your resource. Then run the code.
66
+
Open the file and copy the below code. Then run the code.
62
67
63
68
[!INCLUDE [find the key and endpoint for a resource](../../../includes/find-azure-resource-info.md)]
Copy file name to clipboardExpand all lines: articles/cognitive-services/language-service/summarization/includes/quickstarts/python-sdk.md
+10-4Lines changed: 10 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,10 +33,15 @@ Use this quickstart to create a text summarization application with the client l
33
33
34
34
> [!div class="nextstepaction"]
35
35
> <a href="> [!div class="nextstepaction"]
36
-
> <ahref="https://microsoft.qualtrics.com/jfe/form/SV_0Cl5zkG3CnDjq6O?PLanguage=JAVASCRIPT&Pillar=Language&Product=Summarization&Page=quickstart&Section=Code-example"target="_target">I ran into an issue</a>" target="_target">I ran into an issue</a>
36
+
> <ahref="https://microsoft.qualtrics.com/jfe/form/SV_0Cl5zkG3CnDjq6O?PLanguage=PYTHON&Pillar=Language&Product=Summarization&Page=quickstart&Section=Code-example"target="_target">I ran into an issue</a>" target="_target">I ran into an issue</a>
> <ahref="https://microsoft.qualtrics.com/jfe/form/SV_0Cl5zkG3CnDjq6O?PLanguage=PYTHON&Pillar=Language&Product=Summarization&Page=quickstart&Section=Create-environment-variables"target="_target">I ran into an issue</a>
44
+
40
45
### Install the client library
41
46
42
47
After installing Python, you can install the client library with:
Create a new Python file and copy the below code. Remember to replace the `key` variable with the key for your resource, and replace the `endpoint` variable with the endpoint for your resource. Then run the code.
69
+
Create a new Python file and copy the below code. Then run the code.
65
70
66
71
[!INCLUDE [find the key and endpoint for a resource](../../../includes/find-azure-resource-info.md)]
Copy file name to clipboardExpand all lines: articles/cognitive-services/language-service/summarization/includes/quickstarts/rest-api.md
+24-25Lines changed: 24 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,12 +34,18 @@ Use this quickstart to send text summarization requests using the REST API. In t
34
34
> [!div class="nextstepaction"]
35
35
> <ahref="https://microsoft.qualtrics.com/jfe/form/SV_0Cl5zkG3CnDjq6O?PLanguage=REST API&Pillar=Language&Product=Summarization&Page=quickstart&Section=Prerequisites"target="_target">I ran into an issue</a>
> <ahref="https://microsoft.qualtrics.com/jfe/form/SV_0Cl5zkG3CnDjq6O?PLanguage=REST API&Pillar=Language&Product=Summarization&Page=quickstart&Section=Create-environment-variables"target="_target">I ran into an issue</a>
43
+
37
44
## Example request
38
45
39
46
> [!NOTE]
40
47
> * The following BASH examples use the `\` line continuation character. If your console or terminal uses a different line continuation character, use that character.
41
48
> * You can find language specific samples on [GitHub](https://github.com/Azure-Samples/cognitive-services-quickstart-code).
42
-
> * Go to the Azure portal and find the key and endpoint for the Language resource you created in the prerequisites. They will be located on the resource's **key and endpoint** page, under **resource management**. Then replace the strings in the code below with your key and endpoint.
43
49
To call the API, you need the following information:
44
50
45
51
Choose the type of summarization you would like to perform, and select one of the tabs below to see an example API call:
@@ -60,7 +66,7 @@ Choose the type of summarization you would like to perform, and select one of th
60
66
|`-H "Ocp-Apim-Subscription-Key:<key>`| Specifies the key for accessing the API. |
61
67
|`-d <documents>`| The JSON containing the documents you want to send. |
62
68
63
-
The following cURL commands are executed from a BASH shell. Edit these commands with your own resource name, resource key, and JSON values.
69
+
The following cURL commands are executed from a BASH shell. Edit these commands with your own JSON values.
64
70
65
71
## Document summarization
66
72
@@ -71,9 +77,9 @@ The following example will get you started with document extractive summarizatio
71
77
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.
72
78
73
79
```bash
74
-
curl -i -X POST https://<your-language-resource-endpoint>/language/analyze-text/jobs?api-version=2022-10-01-preview \
80
+
curl -i -X POST $LANGUAGE_ENDPOINT/language/analyze-text/jobs?api-version=2022-10-01-preview \
6. 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:
119
+
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:
117
120
118
121
```bash
119
-
curl -X GET https://<your-language-resource-endpoint>/language/analyze-text/jobs/<my-job-id>?api-version=2022-10-01-preview \
122
+
curl -X GET $LANGUAGE_ENDPOINT/language/analyze-text/jobs/<my-job-id>?api-version=2022-10-01-preview \
@@ -209,9 +212,9 @@ The following example will get you started with conversation issue and resolutio
209
212
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.
210
213
211
214
```bash
212
-
curl -i -X POST https://<your-language-resource-endpoint>/language/analyze-conversations/jobs?api-version=2022-10-01-preview \
215
+
curl -i -X POST $LANGUAGE_ENDPOINT/language/analyze-conversations/jobs?api-version=2022-10-01-preview \
@@ -291,26 +294,22 @@ curl -i -X POST https://<your-language-resource-endpoint>/language/analyze-conve
291
294
```
292
295
Only the `resolution` aspect supports sentenceCount. If you do not specify the `sentenceCount` parameter, the model will determine the summary's length. Note that `sentenceCount` is just the approximation of sentence count of output summary, range 1 to 7.
293
296
294
-
2. Make the following changes in the command where needed:
295
-
- Replace the value `your-language-resource-key` with your key.
296
-
- Replace the first part of the request URL `your-language-resource-endpoint` with your endpoint URL.
297
-
298
-
3. Open a command prompt window (for example: BASH).
297
+
2. Open a command prompt window (for example: BASH).
299
298
300
-
4. Paste the command from the text editor into the command prompt window, then run the command.
299
+
3. Paste the command from the text editor into the command prompt window, then run the command.
301
300
302
-
5. Get the `operation-location` from the response header. The value will look similar to the following URL:
301
+
4. Get the `operation-location` from the response header. The value will look similar to the following URL:
6. 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:
307
+
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:
309
308
310
309
```bash
311
-
curl -X GET https://<your-language-resource-endpoint>/language/analyze-conversations/jobs/<my-job-id>?api-version=2022-10-01-preview \
310
+
curl -X GET $LANGUAGE_ENDPOINT/language/analyze-conversations/jobs/<my-job-id>?api-version=2022-10-01-preview \
0 commit comments