@azure/ai-text-analytics 5.1.1-alpha.20210715.1 → 5.1.1-alpha.20220725.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +14 -13
  3. package/dist/index.js +758 -367
  4. package/dist/index.js.map +1 -1
  5. package/dist-esm/src/analyzeActionsResult.js +9 -9
  6. package/dist-esm/src/analyzeActionsResult.js.map +1 -1
  7. package/dist-esm/src/analyzeHealthcareEntitiesResult.js +4 -4
  8. package/dist-esm/src/analyzeHealthcareEntitiesResult.js.map +1 -1
  9. package/dist-esm/src/analyzeSentimentResult.js +5 -5
  10. package/dist-esm/src/analyzeSentimentResult.js.map +1 -1
  11. package/dist-esm/src/analyzeSentimentResultArray.js +1 -1
  12. package/dist-esm/src/analyzeSentimentResultArray.js.map +1 -1
  13. package/dist-esm/src/azureKeyCredentialPolicy.js +2 -2
  14. package/dist-esm/src/azureKeyCredentialPolicy.js.map +1 -1
  15. package/dist-esm/src/detectLanguageResult.js +1 -1
  16. package/dist-esm/src/detectLanguageResult.js.map +1 -1
  17. package/dist-esm/src/detectLanguageResultArray.js +1 -1
  18. package/dist-esm/src/detectLanguageResultArray.js.map +1 -1
  19. package/dist-esm/src/extractKeyPhrasesResult.js +1 -1
  20. package/dist-esm/src/extractKeyPhrasesResult.js.map +1 -1
  21. package/dist-esm/src/extractKeyPhrasesResultArray.js +1 -1
  22. package/dist-esm/src/extractKeyPhrasesResultArray.js.map +1 -1
  23. package/dist-esm/src/generated/generatedClient.js +41 -3
  24. package/dist-esm/src/generated/generatedClient.js.map +1 -1
  25. package/dist-esm/src/generated/index.js +0 -1
  26. package/dist-esm/src/generated/index.js.map +1 -1
  27. package/dist-esm/src/generated/models/index.js +514 -1
  28. package/dist-esm/src/generated/models/index.js.map +1 -1
  29. package/dist-esm/src/generated/models/mappers.js +5 -0
  30. package/dist-esm/src/generated/models/mappers.js.map +1 -1
  31. package/dist-esm/src/generated/models/parameters.js +1 -0
  32. package/dist-esm/src/generated/models/parameters.js.map +1 -1
  33. package/dist-esm/src/index.js +3 -3
  34. package/dist-esm/src/index.js.map +1 -1
  35. package/dist-esm/src/lro/analyze/operation.js +29 -71
  36. package/dist-esm/src/lro/analyze/operation.js.map +1 -1
  37. package/dist-esm/src/lro/analyze/poller.js +3 -3
  38. package/dist-esm/src/lro/analyze/poller.js.map +1 -1
  39. package/dist-esm/src/lro/health/operation.js +41 -82
  40. package/dist-esm/src/lro/health/operation.js.map +1 -1
  41. package/dist-esm/src/lro/health/poller.js +3 -3
  42. package/dist-esm/src/lro/health/poller.js.map +1 -1
  43. package/dist-esm/src/lro/poller.js +1 -1
  44. package/dist-esm/src/lro/poller.js.map +1 -1
  45. package/dist-esm/src/recognizeCategorizedEntitiesResult.js +1 -1
  46. package/dist-esm/src/recognizeCategorizedEntitiesResult.js.map +1 -1
  47. package/dist-esm/src/recognizeCategorizedEntitiesResultArray.js +1 -1
  48. package/dist-esm/src/recognizeCategorizedEntitiesResultArray.js.map +1 -1
  49. package/dist-esm/src/recognizeLinkedEntitiesResult.js +1 -1
  50. package/dist-esm/src/recognizeLinkedEntitiesResult.js.map +1 -1
  51. package/dist-esm/src/recognizeLinkedEntitiesResultArray.js +1 -1
  52. package/dist-esm/src/recognizeLinkedEntitiesResultArray.js.map +1 -1
  53. package/dist-esm/src/recognizePiiEntitiesResult.js +1 -1
  54. package/dist-esm/src/recognizePiiEntitiesResult.js.map +1 -1
  55. package/dist-esm/src/recognizePiiEntitiesResultArray.js +1 -1
  56. package/dist-esm/src/recognizePiiEntitiesResultArray.js.map +1 -1
  57. package/dist-esm/src/textAnalyticsClient.js +58 -149
  58. package/dist-esm/src/textAnalyticsClient.js.map +1 -1
  59. package/dist-esm/src/textAnalyticsResult.js +4 -14
  60. package/dist-esm/src/textAnalyticsResult.js.map +1 -1
  61. package/dist-esm/src/util.js +44 -29
  62. package/dist-esm/src/util.js.map +1 -1
  63. package/package.json +34 -36
  64. package/types/ai-text-analytics.d.ts +70 -31
  65. package/CHANGELOG.md +0 -144
  66. package/dist-esm/src/generated/generatedClientContext.js +0 -42
  67. package/dist-esm/src/generated/generatedClientContext.js.map +0 -1
  68. package/dist-esm/src/tracing.js +0 -12
  69. package/dist-esm/src/tracing.js.map +0 -1
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2020 Microsoft
3
+ Copyright (c) 2022 Microsoft
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Azure Text Analytics client library for JavaScript
2
2
 
3
- [Azure TextAnalytics](https://azure.microsoft.com/services/cognitive-services/text-analytics/) is a cloud-based service that provides advanced natural language processing over raw text, and includes six main functions:
3
+ [Azure Text Analytics](https://azure.microsoft.com/services/cognitive-services/text-analytics/) is a cloud-based service that provides advanced natural language processing over raw text, and includes six main functions:
4
4
 
5
5
  **Note:** This SDK targets Azure Text Analytics service API version 3.1.0.
6
6
 
@@ -22,6 +22,7 @@ Use the client library to:
22
22
  - Perform multiple of the above tasks at once.
23
23
 
24
24
  Key links:
25
+
25
26
  - [Source code](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/textanalytics/ai-text-analytics/)
26
27
  - [Package (NPM)](https://www.npmjs.com/package/@azure/ai-text-analytics)
27
28
  - [API reference documentation](https://docs.microsoft.com/javascript/api/@azure/ai-text-analytics)
@@ -60,7 +61,7 @@ npm install @azure/ai-text-analytics
60
61
 
61
62
  To create a client object to access the Text Analytics API, you will need the `endpoint` of your Text Analytics resource and a `credential`. The Text Analytics client can use either Azure Active Directory credentials or an API key credential to authenticate.
62
63
 
63
- You can find the endpoint for your text analytics resource either in the [Azure Portal][azure_portal] or by using the [Azure CLI][azure_cli] snippet below:
64
+ You can find the endpoint for your Text Analytics resource either in the [Azure Portal][azure_portal] or by using the [Azure CLI][azure_cli] snippet below:
64
65
 
65
66
  ```bash
66
67
  az cognitiveservices account show --name <your-resource-name> --resource-group <your-resource-group-name> --query "endpoint"
@@ -120,7 +121,7 @@ For example, each document can be passed as a string in an array, e.g.
120
121
  const documents = [
121
122
  "I hated the movie. It was so slow!",
122
123
  "The movie made it into my top ten favorites.",
123
- "What a great movie!"
124
+ "What a great movie!",
124
125
  ];
125
126
  ```
126
127
 
@@ -130,7 +131,7 @@ or, if you wish to pass in a per-item document `id` or `language`/`countryHint`,
130
131
  const textDocumentInputs = [
131
132
  { id: "1", language: "en", text: "I hated the movie. It was so slow!" },
132
133
  { id: "2", language: "en", text: "The movie made it into my top ten favorites." },
133
- { id: "3", language: "en", text: "What a great movie!" }
134
+ { id: "3", language: "en", text: "What a great movie!" },
134
135
  ];
135
136
  ```
136
137
 
@@ -193,7 +194,7 @@ const client = new TextAnalyticsClient("<endpoint>", new AzureKeyCredential("<AP
193
194
  const documents = [
194
195
  "I did not like the restaurant. The food was too spicy.",
195
196
  "The restaurant was decorated beautifully. The atmosphere was unlike any other restaurant I've been to.",
196
- "The food was yummy. :)"
197
+ "The food was yummy. :)",
197
198
  ];
198
199
 
199
200
  async function main() {
@@ -228,7 +229,7 @@ const client = new TextAnalyticsClient("<endpoint>", new AzureKeyCredential("<AP
228
229
  const documents = [
229
230
  "Microsoft was founded by Bill Gates and Paul Allen.",
230
231
  "Redmond is a city in King County, Washington, United States, located 15 miles east of Seattle.",
231
- "Jeff bought three dozen eggs because there was a 50% discount."
232
+ "Jeff bought three dozen eggs because there was a 50% discount.",
232
233
  ];
233
234
 
234
235
  async function main() {
@@ -258,7 +259,7 @@ const { TextAnalyticsClient, AzureKeyCredential } = require("@azure/ai-text-anal
258
259
  const client = new TextAnalyticsClient("<endpoint>", new AzureKeyCredential("<API key>"));
259
260
  const documents = [
260
261
  "The employee's SSN is 555-55-5555.",
261
- "The employee's phone number is (555) 555-5555."
262
+ "The employee's phone number is (555) 555-5555.",
262
263
  ];
263
264
  async function main() {
264
265
  const results = await client.recognizePiiEntities(documents, "en");
@@ -288,7 +289,7 @@ const client = new TextAnalyticsClient("<endpoint>", new AzureKeyCredential("<AP
288
289
  const documents = [
289
290
  "Microsoft was founded by Bill Gates and Paul Allen.",
290
291
  "Easter Island, a Chilean territory, is a remote volcanic island in Polynesia.",
291
- "I use Azure Functions to develop my product."
292
+ "I use Azure Functions to develop my product.",
292
293
  ];
293
294
 
294
295
  async function main() {
@@ -330,7 +331,7 @@ const client = new TextAnalyticsClient("<endpoint>", new AzureKeyCredential("<AP
330
331
  const documents = [
331
332
  "Redmond is a city in King County, Washington, United States, located 15 miles east of Seattle.",
332
333
  "I need to take my cat to the veterinarian.",
333
- "I will travel to South America in the summer."
334
+ "I will travel to South America in the summer.",
334
335
  ];
335
336
 
336
337
  async function main() {
@@ -363,7 +364,7 @@ const client = new TextAnalyticsClient("<endpoint>", new AzureKeyCredential("<AP
363
364
  const documents = [
364
365
  "This is written in English.",
365
366
  "Il documento scritto in italiano.",
366
- "Dies ist in deutscher Sprache verfasst."
367
+ "Dies ist in deutscher Sprache verfasst.",
367
368
  ];
368
369
 
369
370
  async function main() {
@@ -403,7 +404,7 @@ const client = new TextAnalyticsClient("<endpoint>", new AzureKeyCredential("<AP
403
404
 
404
405
  const documents = [
405
406
  "Prescribed 100mg ibuprofen, taken twice daily.",
406
- "Patient does not suffer from high blood pressure."
407
+ "Patient does not suffer from high blood pressure.",
407
408
  ];
408
409
 
409
410
  async function main() {
@@ -437,14 +438,14 @@ const documents = [
437
438
  "Microsoft was founded by Bill Gates and Paul Allen.",
438
439
  "The employee's SSN is 555-55-5555.",
439
440
  "Easter Island, a Chilean territory, is a remote volcanic island in Polynesia.",
440
- "I use Azure Functions to develop my product."
441
+ "I use Azure Functions to develop my product.",
441
442
  ];
442
443
 
443
444
  async function main() {
444
445
  const actions = {
445
446
  recognizeEntitiesActions: [{ modelVersion: "latest" }],
446
447
  recognizePiiEntitiesActions: [{ modelVersion: "latest" }],
447
- extractKeyPhrasesActions: [{ modelVersion: "latest" }]
448
+ extractKeyPhrasesActions: [{ modelVersion: "latest" }],
448
449
  };
449
450
  const poller = await client.beginAnalyzeActions(documents, actions);
450
451
  const resultPages = await poller.pollUntilDone();