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
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*.
39
39
40
-
#### [Version 3.0-preview](#tab/version-3)
40
+
#### [Version 3.0](#tab/version-3)
41
41
42
-
Install the client library by right-clicking on the solution in the **Solution Explorer** and selecting **Manage NuGet Packages**. In the package manager that opens select **Browse**, check **Include prerelease**, and search for `Azure.AI.TextAnalytics`. Select version `1.0.0-preview.4`, and then **Install**. You can also use the [Package Manager Console](https://docs.microsoft.com/nuget/consume-packages/install-use-packages-powershell#find-and-install-a-package).
42
+
Install the client library by right-clicking on the solution in the **Solution Explorer** and selecting **Manage NuGet Packages**. In the package manager that opens select **Browse**, check **Include prerelease**, and search for `Azure.AI.TextAnalytics`. Select version `1.0.0-preview.5`, and then **Install**. You can also use the [Package Manager Console](https://docs.microsoft.com/nuget/consume-packages/install-use-packages-powershell#find-and-install-a-package).
43
43
44
44
> [!TIP]
45
45
> Want to view the whole quickstart code file at once? You can find it [on GitHub](https://github.com/Azure-Samples/cognitive-services-quickstart-code/blob/master/dotnet/TextAnalytics/program.cs), which contains the code examples in this quickstart.
@@ -53,7 +53,7 @@ Install the client library by right-clicking on the solution in the **Solution E
53
53
54
54
---
55
55
56
-
#### [Version 3.0-preview](#tab/version-3)
56
+
#### [Version 3.0](#tab/version-3)
57
57
58
58
Open the *program.cs* file and add the following `using` directives:
59
59
@@ -116,7 +116,7 @@ Replace the application's `Main` method. You will define the methods called here
116
116
117
117
The Text Analytics client is a `TextAnalyticsClient` object that authenticates to Azure using your key, and provides functions to accept text as single strings or as a batch. You can send text to the API synchronously, or asynchronously. The response object will contain the analysis information for each document you send.
118
118
119
-
If you're using version `3.0-preview` of the service, you can use an optional `TextAnalyticsClientOptions` instance to initialize the client with various default settings (for example default language or country/region hint). You can also authenticate using an Azure Active Directory token.
119
+
If you're using version `3.0` of the service, you can use an optional `TextAnalyticsClientOptions` instance to initialize the client with various default settings (for example default language or country/region hint). You can also authenticate using an Azure Active Directory token.
120
120
121
121
## Code examples
122
122
@@ -128,7 +128,7 @@ If you're using version `3.0-preview` of the service, you can use an optional `T
128
128
129
129
## Authenticate the client
130
130
131
-
#### [Version 3.0-preview](#tab/version-3)
131
+
#### [Version 3.0](#tab/version-3)
132
132
133
133
Make sure your main method from earlier creates a new client object with your endpoint and credentials.
134
134
@@ -150,7 +150,7 @@ Create a method to instantiate the [TextAnalyticsClient](https://docs.microsoft.
150
150
151
151
## Sentiment analysis
152
152
153
-
#### [Version 3.0-preview](#tab/version-3)
153
+
#### [Version 3.0](#tab/version-3)
154
154
155
155
Create a new function called `SentimentAnalysisExample()` that takes the client that you created earlier, and call its `AnalyzeSentiment()` function. The returned `Response<DocumentSentiment>` object will contain the sentiment label and score of the entire input document, as well as a sentiment analysis for each sentence if successful. If there was an error, it will throw a `RequestFailedException`.
Create a new function called `LanguageDetectionExample()` that takes the client that you created earlier, and call its `DetectLanguage()` function. The returned `Response<DetectedLanguage>` object will contain the detected language along with its name and ISO-6391 code. If there was an error, it will throw a `RequestFailedException`.
@@ -253,11 +250,11 @@ Language: English
253
250
254
251
## Named Entity Recognition (NER)
255
252
256
-
#### [Version 3.0-preview](#tab/version-3)
253
+
#### [Version 3.0](#tab/version-3)
257
254
258
255
259
256
> [!NOTE]
260
-
> New in version `3.0-preview`:
257
+
> New in version `3.0`:
261
258
> * Entity linking is now a separated from entity recognition.
Name: Altair 8800, ID: Altair 8800, URL: https://en.wikipedia.org/wiki/Altair_8800 Data Source: Wikipedia
322
322
Matches:
323
323
Text: Altair 8800
324
-
Length: 11, Score: 0.78
324
+
Score: 0.88
325
325
326
326
Name: Bill Gates, ID: Bill Gates, URL: https://en.wikipedia.org/wiki/Bill_Gates Data Source: Wikipedia
327
327
Matches:
328
328
Text: Bill Gates
329
-
Length: 10, Score: 0.55
329
+
Score: 0.63
330
330
331
331
Text: Gates
332
-
Length: 5, Score: 0.55
332
+
Score: 0.63
333
333
334
334
Name: Paul Allen, ID: Paul Allen, URL: https://en.wikipedia.org/wiki/Paul_Allen Data Source: Wikipedia
335
335
Matches:
336
336
Text: Paul Allen
337
-
Length: 10, Score: 0.53
337
+
Score: 0.60
338
338
339
339
Name: Microsoft, ID: Microsoft, URL: https://en.wikipedia.org/wiki/Microsoft Data Source: Wikipedia
340
340
Matches:
341
341
Text: Microsoft
342
-
Length: 9, Score: 0.47
342
+
Score: 0.55
343
343
344
344
Text: Microsoft
345
-
Length: 9, Score: 0.47
345
+
Score: 0.55
346
346
347
347
Name: April 4, ID: April 4, URL: https://en.wikipedia.org/wiki/April_4 Data Source: Wikipedia
348
348
Matches:
349
349
Text: April 4
350
-
Length: 7, Score: 0.25
350
+
Score: 0.32
351
351
352
352
Name: BASIC, ID: BASIC, URL: https://en.wikipedia.org/wiki/BASIC Data Source: Wikipedia
353
353
Matches:
354
354
Text: BASIC
355
-
Length: 5, Score: 0.28
355
+
Score: 0.33
356
356
```
357
357
358
358
#### [Version 2.1](#tab/version-2)
@@ -369,7 +369,7 @@ Create a new function called `RecognizeEntitiesExample()` that takes the client
369
369
370
370
## Key phrase extraction
371
371
372
-
#### [Version 3.0-preview](#tab/version-3)
372
+
#### [Version 3.0](#tab/version-3)
373
373
374
374
Create a new function called `KeyPhraseExtractionExample()` that takes the client that you created earlier, and call its `ExtractKeyPhrases()` function. The returned `<Response<IReadOnlyCollection<string>>` object will contain the list of detected key phrases. If there was an error, it will throw a `RequestFailedException`.
0 commit comments