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
[Text Analytics] Adding analyze and healthcare APIs (Azure#11375)
* adding analyze and health APIs
* address feedback and streamline analyze
* Adding a know issues section to README
* improve samples
* adding recordings
* fix link errors
* fix lint issues
* no karma timeout
* fix release date in changelog
* increase karma timeout
* Recorded browser #analyze tests
* Recorded even more browser tests that were missing
Co-authored-by: Will Temple <witemple@microsoft.com>
[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:
4
4
5
-
__Note:__ This SDK targets Azure Text Analytics service API version 3.1.0-preview.2.
5
+
**Note:** This SDK targets Azure Text Analytics service API version 3.1.0-preview.2.
6
6
7
7
- Language Detection
8
8
- Sentiment Analysis
9
9
- Key Phrase Extraction
10
10
- Named Entity Recognition
11
11
- Recognition of Personally Identifiable Information
12
12
- Linked Entity Recognition
13
+
- Healthcare Analysis
14
+
- Batch Processing
13
15
14
16
Use the client library to:
15
17
16
18
- Detect what language input text is written in.
17
19
- Determine what customers think of your brand or topic by analyzing raw text for clues about positive or negative sentiment.
18
20
- Automatically extract key phrases to quickly identify the main points.
19
-
- Identify and categorize entities in your text as people, places, organizations, date/time, quantities, percentages, currencies, and more.
21
+
- Identify and categorize entities in your text as people, places, organizations, date/time, quantities, percentages, currencies, healthcare specific, and more.
@@ -320,7 +329,7 @@ const client = new TextAnalyticsClient("<endpoint>", new AzureKeyCredential("<AP
320
329
constdocuments= [
321
330
"Redmond is a city in King County, Washington, United States, located 15 miles east of Seattle.",
322
331
"I need to take my cat to the veterinarian.",
323
-
"I will travel to South America in the summer.",
332
+
"I will travel to South America in the summer."
324
333
];
325
334
326
335
asyncfunctionmain() {
@@ -382,6 +391,113 @@ async function main() {
382
391
main();
383
392
```
384
393
394
+
### Analyze Healthcare Entities
395
+
396
+
Healthcare analysis identifies healthcare entities. For example, given input text "Prescribed 100mg ibuprofen, taken twice daily", the service returns "100mg" categorized as Dosage, "ibuprofen" as MedicationName, and "twice daily" as Frequency.
console.log(`\t- Entity ${entity.text} of type ${entity.category}`);
485
+
}
486
+
} else {
487
+
console.error("\tError:", doc.error);
488
+
}
489
+
}
490
+
}
491
+
}
492
+
493
+
main();
494
+
```
495
+
496
+
## Known Issues
497
+
498
+
- Currently, the `beginAnalyze` API accepts `includeStatistics` in its options bag, a feature that was not yet supported by the service at the time of the current release. This feature is expected to be supported soon after the release.
499
+
-`beginAnalyzeHealthcare` is still in gated preview and can not be used with AAD credentials.
500
+
385
501
## Troubleshooting
386
502
387
503
### Enable logs
@@ -421,4 +537,4 @@ If you'd like to contribute to this library, please read the [contributing guide
Copy file name to clipboardExpand all lines: sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_analyze/recording_bad_request_empty_string.json
0 commit comments