Skip to content

Commit 3705fdb

Browse files
committed
Updated NDS sample
1 parent aacb034 commit 3705fdb

File tree

2 files changed

+39
-32
lines changed

2 files changed

+39
-32
lines changed

articles/ai-services/language-service/named-entity-recognition/how-to-call.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: How to perform Named Entity Recognition (NER)
33
titleSuffix: Azure AI services
4-
description: This article will show you how to extract named entities from text.
4+
description: This article shows you how to extract named entities from text.
55
#services: cognitive-services
66
author: jboback
77
manager: nitinme
@@ -37,7 +37,7 @@ The API attempts to detect the [defined entity categories](concepts/named-entity
3737

3838
## Getting NER results
3939

40-
When you get results from NER, you can stream the results to an application or save the output to a file on the local system. The API response will include [recognized entities](concepts/named-entity-categories.md), including their categories and subcategories, and confidence scores.
40+
When you get results from NER, you can stream the results to an application or save the output to a file on the local system. The API response includes [recognized entities](concepts/named-entity-categories.md), including their categories and subcategories, and confidence scores.
4141

4242
## Select which entities to be returned
4343

@@ -46,7 +46,7 @@ The API attempts to detect the [defined entity types and tags](concepts/named-en
4646
**Input:**
4747

4848
> [!NOTE]
49-
> In this example, it returns only the **Location** entity type.
49+
> In this example, it returns only the **"Location"** entity type.
5050
5151
```bash
5252
{
@@ -110,13 +110,13 @@ Using these parameters we can successfully filter on only `Location` entity type
110110

111111
## Additional output attributes
112112

113-
In order to provide users with more insight into an entity's types and provide increased usability, NER supports these additional attributes in the output:
113+
In order to provide users with more insight into an entity's types and provide increased usability, NER supports these attributes in the output:
114114

115115
|Name of the attribute|Type |Definition |
116116
|---------------------|------------|-----------------------------------------|
117-
|`type` |String |The most specific type of detected entity.<br><br>For example, “Seattle” is a City, a GPE (Geo Political Entity) and a Location. The most granular classification for “Seattle” is that it is a City. The type would be “City” for the text “Seattle".|
118-
|`tags` |List (tags) |A list of tag objects which expresses the affinity of the detected entity to a hierarchy or any other grouping.<br><br>A tag contains two fields:<br>1. `name`: A unique name for the tag.<br>2. `confidenceScore`: The associated confidence score for a tag ranging from <br><br>This unique tagName will be used to filter in the `inclusionList` and `exclusionList` parameters
119-
|`metadata` |Object |Metadata is an object containing additional data about the entity type detected. It changes based on the field `metadataKind`.
117+
|`type` |String |The most specific type of detected entity.<br><br>For example, “Seattle” is a `City`, a `GPE` (Geo Political Entity) and a `Location`. The most granular classification for “Seattle” is that it is a `City`. The type would be “City” for the text “Seattle".|
118+
|`tags` |List (tags) |A list of tag objects which expresses the affinity of the detected entity to a hierarchy or any other grouping.<br><br>A tag contains two fields:<br>1. `name`: A unique name for the tag.<br>2. `confidenceScore`: The associated confidence score for a tag ranging from <br><br>This unique tagName is be used to filter in the `inclusionList` and `exclusionList` parameters
119+
|`metadata` |Object |Metadata is an object containing more data about the entity type detected. It changes based on the field `metadataKind`.
120120

121121
## Sample output
122122

articles/ai-services/language-service/native-document-support/use-native-documents.md

Lines changed: 32 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -169,32 +169,39 @@ For this quickstart, you need a **source document** uploaded to your **source co
169169
***Request sample***
170170

171171
```json
172-
{
173-
"displayName": "Extracting Location & US Region",
174-
"analysisInput": {
175-
"documents": [
176-
{
177-
"language": "en-US",
178-
"id": "Output-excel-file",
179-
"source": {
180-
"location": "{your-source-blob-with-SAS-URL}"
181-
},
182-
"target": {
183-
"location": "{your-target-container-with-SAS-URL}"
184-
}
172+
{
173+
"displayName": "Document PII Redaction example",
174+
"analysisInput": {
175+
"documents": [
176+
{
177+
"language": "en-US",
178+
"id": "Output-1",
179+
"source": {
180+
"location": "{your-source-blob-with-SAS-URL}"
181+
},
182+
"target": {
183+
"location": "{your-target-container-with-SAS-URL}"
184+
}
185185
}
186-
]
187-
},
188-
"tasks": [
189-
{
190-
"kind": "PiiEntityRecognition",
191-
"parameters":{
192-
"excludePiiCategories" : ["PersonType", "Category2", "Category3"],
193-
"redactionPolicy": "UseRedactionCharacterWithRefId"
194-
}
195-
}
196-
]
197-
}
186+
]
187+
},
188+
"tasks": [
189+
{
190+
"kind": "PiiEntityRecognition",
191+
"taskName": "Redact PII Task 1",
192+
"parameters": {
193+
"redactionPolicy": {
194+
"policyKind": "entityMask" // Optional. Defines redactionPolicy; changes behavior based on value. Options: noMask, characterMask (default), and entityMask.
195+
},
196+
"piiCategories": [
197+
"Person",
198+
"Organization"
199+
],
200+
"excludeExtractionData": false // Default is false. If true, only the redacted document is stored, without extracted entities data.
201+
}
202+
}
203+
]
204+
}
198205
```
199206

200207
* The source `location` value is the SAS URL for the **source document (blob)**, not the source container SAS URL.

0 commit comments

Comments
 (0)