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
Your app's `package.json` file will be updated with the dependencies.
79
79
Create a file named `index.js` and add the following:
80
80
81
-
#### [Version 3.0-preview](#tab/version-3)
81
+
#### [Version 3.0](#tab/version-3)
82
82
83
83
```javascript
84
84
"use strict";
@@ -123,7 +123,7 @@ The response object is a list containing the analysis information for each docum
123
123
124
124
## Client Authentication
125
125
126
-
#### [Version 3.0-preview](#tab/version-3)
126
+
#### [Version 3.0](#tab/version-3)
127
127
128
128
Create a new `TextAnalyticsClient` object with your key and endpoint as parameters.
129
129
@@ -141,7 +141,7 @@ Create a new [TextAnalyticsClient](https://docs.microsoft.com/javascript/api/@az
141
141
142
142
## Sentiment analysis
143
143
144
-
#### [Version 3.0-preview](#tab/version-3)
144
+
#### [Version 3.0](#tab/version-3)
145
145
146
146
Create an array of strings containing the document you want to analyze. Call the client's `analyzeSentiment()` method and get the returned `SentimentBatchResult` object. Iterate through the list of results, and print each document's ID, document level sentiment with confidence scores. For each document, result contains sentence level sentiment along with offsets, length, and confidence scores.
147
147
@@ -208,7 +208,7 @@ Run your code with `node index.js` in your console window.
208
208
209
209
## Language detection
210
210
211
-
#### [Version 3.0-preview](#tab/version-3)
211
+
#### [Version 3.0](#tab/version-3)
212
212
213
213
Create an array of strings containing the document you want to analyze. Call the client's `detectLanguage()` method and get the returned `DetectLanguageResultCollection`. Then iterate through the results, and print each document's ID with respective primary language.
@@ -348,24 +342,24 @@ Run your code with `node index.js` in your console window.
348
342
Document ID: 0
349
343
Name: Altair 8800 ID: Altair 8800 URL: https://en.wikipedia.org/wiki/Altair_8800 Data Source: Wikipedia
350
344
Matches:
351
-
Text: Altair 8800 Score: 0.78
345
+
Text: Altair 8800 Score: 0.88
352
346
Name: Bill Gates ID: Bill Gates URL: https://en.wikipedia.org/wiki/Bill_Gates Data Source: Wikipedia
353
347
Matches:
354
-
Text: Bill Gates Score: 0.55
355
-
Text: Gates Score: 0.55
348
+
Text: Bill Gates Score: 0.63
349
+
Text: Gates Score: 0.63
356
350
Name: Paul Allen ID: Paul Allen URL: https://en.wikipedia.org/wiki/Paul_Allen Data Source: Wikipedia
357
351
Matches:
358
-
Text: Paul Allen Score: 0.53
352
+
Text: Paul Allen Score: 0.60
359
353
Name: Microsoft ID: Microsoft URL: https://en.wikipedia.org/wiki/Microsoft Data Source: Wikipedia
360
354
Matches:
361
-
Text: Microsoft Score: 0.47
362
-
Text: Microsoft Score: 0.47
355
+
Text: Microsoft Score: 0.55
356
+
Text: Microsoft Score: 0.55
363
357
Name: April 4 ID: April 4 URL: https://en.wikipedia.org/wiki/April_4 Data Source: Wikipedia
364
358
Matches:
365
-
Text: April 4 Score: 0.25
359
+
Text: April 4 Score: 0.32
366
360
Name: BASIC ID: BASIC URL: https://en.wikipedia.org/wiki/BASIC Data Source: Wikipedia
367
361
Matches:
368
-
Text: BASIC Score: 0.28
362
+
Text: BASIC Score: 0.33
369
363
```
370
364
371
365
#### [Version 2.1](#tab/version-2)
@@ -413,7 +407,7 @@ Document ID: 2
413
407
414
408
## Key phrase extraction
415
409
416
-
#### [Version 3.0-preview](#tab/version-3)
410
+
#### [Version 3.0](#tab/version-3)
417
411
418
412
Create an array of strings containing the document you want to analyze. Call the client's `extractKeyPhrases()` method and get the returned `ExtractKeyPhrasesResult` object. Iterate through the results and print each document's ID, and any detected key phrases.
0 commit comments