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
Copy file name to clipboardExpand all lines: articles/cognitive-services/text-analytics/includes/quickstarts/csharp-sdk.md
+4-33Lines changed: 4 additions & 33 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,7 +39,7 @@ Using the Visual Studio IDE, create a new .NET Core console app. This will creat
39
39
40
40
#### [Version 3.0-preview](#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.3`, 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.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).
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.
@@ -58,6 +58,7 @@ Install the client library by right-clicking on the solution in the **Solution E
58
58
Open the *program.cs* file and add the following `using` directives:
59
59
60
60
```csharp
61
+
usingAzure;
61
62
usingSystem;
62
63
usingSystem.Globalization;
63
64
usingAzure.AI.TextAnalytics;
@@ -68,7 +69,7 @@ In the application's `Program` class, create variables for your resource's key a
@@ -116,14 +116,13 @@ 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`, you can use an optional `TextAnalyticsClientOptions` instance to initialize the client with various default settings (for example default language or country hint). You can also authenticate using an Azure Active Directory token.
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 hint). You can also authenticate using an Azure Active Directory token.
*[Detect personal information](#detect-personal-information)
127
126
*[Entity linking](#entity-linking)
128
127
*[Key phrase extraction](#key-phrase-extraction)
129
128
@@ -259,7 +258,6 @@ Language: English
259
258
260
259
> [!NOTE]
261
260
> New in version `3.0-preview`:
262
-
> * Entity recognition now includes the ability to detect personal information in text.
263
261
> * Entity linking is now a separated from entity recognition.
264
262
265
263
@@ -289,33 +287,6 @@ Named Entities:
289
287
Length: 9, Score: 0.80
290
288
```
291
289
292
-
## Detect personal information
293
-
294
-
Create a new function called `EntityPIIExample()` that takes the client that you created earlier, call its `RecognizePiiEntities()` function and iterate through the results. Similar to the previous function the returned `Response<IReadOnlyCollection<CategorizedEntity>>` object will contain the list of detected entities. If there was an error, it will throw a `RequestFailedException`.
Text: 123-12-1234, Category: U.S. Social Security Number (SSN), Sub-Category:
315
-
Length: 11, Score: 0.85
316
-
```
317
-
318
-
319
290
## Entity linking
320
291
321
292
Create a new function called `EntityLinkingExample()` that takes the client that you created earlier, call its `RecognizeLinkedEntities()` function and iterate through the results. The returned `Response<IReadOnlyCollection<LinkedEntity>>` represents the list of detected entities. If there was an error, it will throw a `RequestFailedException`. Since linked entities are uniquely identified, occurrences of the same entity are grouped under a `LinkedEntity` object as a list of `LinkedEntityMatch` objects.
0 commit comments