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
Create a Maven project in your preferred IDE or development environment. Then add the following dependency to your project's *pom.xml* file. You can find the implementation syntax [for other build tools](https://mvnrepository.com/artifact/com.azure/azure-ai-textanalytics/1.0.0-beta.3) online.
30
+
Create a Maven project in your preferred IDE or development environment. Then add the following dependency to your project's *pom.xml* file. You can find the implementation syntax [for other build tools](https://mvnrepository.com/artifact/com.azure/azure-ai-textanalytics/1.0.0-beta.4) online.
31
31
32
32
```xml
33
33
<dependencies>
34
34
<dependency>
35
35
<groupId>com.azure</groupId>
36
36
<artifactId>azure-ai-textanalytics</artifactId>
37
-
<version>1.0.0-beta.3</version>
37
+
<version>1.0.0-beta.4</version>
38
38
</dependency>
39
39
</dependencies>
40
40
```
@@ -45,6 +45,7 @@ Create a Maven project in your preferred IDE or development environment. Then ad
45
45
Create a Java file named `TextAnalyticsSamples.java`. Open the file and add the following `import` statements:
Create a new function called `recognizePIIEntitiesExample()` that takes the client that you created earlier, and call its `recognizePiiEntities()` function. The returned `RecognizePiiEntitiesResult` object will contain a list of `NamedEntity` if successful, or an `errorMessage` if not.
String text ="Insurance policy for SSN on file 123-12-1234 is here by approved.";
213
-
214
-
for (PiiEntity entity : client.recognizePiiEntities(text)) {
215
-
System.out.printf(
216
-
"Recognized personal identifiable information entity: %s, entity category: %s, %nentity sub-category: %s, score: %s.%n",
217
-
entity.getText(),
218
-
entity.getCategory(),
219
-
entity.getSubCategory(),
220
-
entity.getConfidenceScore());
221
-
}
222
-
}
223
-
```
224
-
225
-
### Output
226
-
227
-
```console
228
-
Recognized personal identifiable information entity: 123-12-1234, entity category: U.S. Social Security Number (SSN),
229
-
entity sub-category: null, score: 0.85.
230
-
```
231
-
232
204
## Entity linking
233
205
234
206
Create a new function called `recognizeLinkedEntitiesExample()` that takes the client that you created earlier, and call its `recognizeLinkedEntities()` function. The returned `RecognizeLinkedEntitiesResult` object will contain a list of `LinkedEntity` if successful, or an `errorMessage` if not. 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