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/language-service/personally-identifiable-information/concepts/conversations-entity-categories.md
+3-24Lines changed: 3 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -191,7 +191,7 @@ This category contains the following entity:
191
191
192
192
Any credit card number, any security code on the back, or the expiration date is considered as PII.
193
193
194
-
To get this entity category, add `CreditCardNumber` to the `pii-categories` parameter. `CreditCardNumber` will be returned in the API response if detected.
194
+
To get this entity category, add `CreditCard` to the `pii-categories` parameter. `CreditCard` will be returned in the API response if detected.
195
195
196
196
:::column-end:::
197
197
:::column span="2":::
@@ -202,27 +202,6 @@ This category contains the following entity:
202
202
:::column-end:::
203
203
:::row-end:::
204
204
205
-
## Government and country/region-specific identification
205
+
## Next steps
206
206
207
-
### United States
208
-
209
-
:::row:::
210
-
:::column span="":::
211
-
**Entity**
212
-
213
-
U.S. Social Security Number (SSN)
214
-
215
-
:::column-end:::
216
-
:::column span="2":::
217
-
**Details**
218
-
219
-
To get this entity category, add `USSocialSecurityNumber` to the `pii-categories` parameter. `USSocialSecurityNumber` will be returned in the API response if detected.
220
-
221
-
:::column-end:::
222
-
:::column span="":::
223
-
**Supported document languages**
224
-
225
-
`en`
226
-
227
-
:::column-end:::
228
-
:::row-end:::
207
+
[How to detect PII in conversations](../how-to-call-for-conversations.md)
Copy file name to clipboardExpand all lines: articles/cognitive-services/language-service/personally-identifiable-information/how-to-call-for-conversations.md
+241-4Lines changed: 241 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,8 +9,8 @@ ms.service: cognitive-services
9
9
ms.subservice: language-service
10
10
ms.topic: how-to
11
11
ms.date: 05/10/2022
12
-
ms.author: bidishac
13
-
ms.custom:
12
+
ms.author: aahi
13
+
ms.reviewer: bidishac
14
14
---
15
15
16
16
@@ -25,9 +25,13 @@ For transcripts, the API also enables redaction of audio segments, which contain
25
25
26
26
By default, this feature will use the latest available AI model on your input. You can also configure your API requests to use a specific [model version](../concepts/model-lifecycle.md).
27
27
28
-
### Input languages
28
+
### Language support
29
29
30
-
Currently the conversational PII preview API only supports English language and is available in the following three regions East US, North Europe and UK south.
30
+
Currently the conversational PII preview API only supports English language.
31
+
32
+
### Region support
33
+
34
+
Currently the conversational PII preview API supports the following regions: East US, North Europe and UK south.
31
35
32
36
## Submitting data
33
37
@@ -41,10 +45,243 @@ The API will attempt to detect all the [defined entity categories](concepts/conv
41
45
42
46
For spoken transcripts, the entities detected will be returned on the `redactionSource` parameter value provided. Currently, the supported values for `redactionSource` are `text`, `lexical`, `itn`, and `maskedItn` (which maps to Microsoft Speech to Text API's `display`\\`displayText`, `lexical`, `itn` and `maskedItn` format respectively). Additionally, for the spoken transcript input, this API will also provide audio timing information to empower audio redaction. For using the audioRedaction feature, use the optional `includeAudioRedaction` flag with `true` value. The audio redaction is performed based on the lexical input format.
43
47
48
+
44
49
## Getting PII results
45
50
46
51
When you get results from PII detection, 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/conversations-entity-categories.md), including their categories and subcategories, and confidence scores. The text string with the PII entities redacted will also be returned.
Use the following example if you have conversations transcribed using the Speech service's [speech-to-text](../../Speech-Service/speech-to-text.md) feature:
87
+
88
+
```bash
89
+
curl -i -X POST https://your-language-endpoint-here/language/analyze-conversations?api-version=2022-05-15-preview \
90
+
-H "Content-Type: application/json" \
91
+
-H "Ocp-Apim-Subscription-Key: your-key-here" \
92
+
-d \
93
+
'
94
+
{
95
+
"displayName": "Analyze conversations from xxx",
96
+
"analysisInput": {
97
+
"conversations": [
98
+
{
99
+
"id": "23611680-c4eb-4705-adef-4aa1c17507b5",
100
+
"language": "en",
101
+
"modality": "transcript",
102
+
"conversationItems": [
103
+
{
104
+
"participantId": "agent_1",
105
+
"id": "8074caf7-97e8-4492-ace3-d284821adacd",
106
+
"text": "Good morning.",
107
+
"lexical": "good morning",
108
+
"itn": "good morning",
109
+
"maskedItn": "good morning",
110
+
"audioTimings": [
111
+
{
112
+
"word": "good",
113
+
"offset": 11700000,
114
+
"duration": 2100000
115
+
},
116
+
{
117
+
"word": "morning",
118
+
"offset": 13900000,
119
+
"duration": 3100000
120
+
}
121
+
]
122
+
},
123
+
{
124
+
"participantId": "agent_1",
125
+
"id": "0d67d52b-693f-4e34-9881-754a14eec887",
126
+
"text": "Can I have your name?",
127
+
"lexical": "can i have your name",
128
+
"itn": "can i have your name",
129
+
"maskedItn": "can i have your name",
130
+
"audioTimings": [
131
+
{
132
+
"word": "can",
133
+
"offset": 44200000,
134
+
"duration": 2200000
135
+
},
136
+
{
137
+
"word": "i",
138
+
"offset": 46500000,
139
+
"duration": 800000
140
+
},
141
+
{
142
+
"word": "have",
143
+
"offset": 47400000,
144
+
"duration": 1500000
145
+
},
146
+
{
147
+
"word": "your",
148
+
"offset": 49000000,
149
+
"duration": 1500000
150
+
},
151
+
{
152
+
"word": "name",
153
+
"offset": 50600000,
154
+
"duration": 2100000
155
+
}
156
+
]
157
+
},
158
+
{
159
+
"participantId": "customer_1",
160
+
"id": "08684a7a-5433-4658-a3f1-c6114fcfed51",
161
+
"text": "Sure that is John Doe.",
162
+
"lexical": "sure that is john doe",
163
+
"itn": "sure that is john doe",
164
+
"maskedItn": "sure that is john doe",
165
+
"audioTimings": [
166
+
{
167
+
"word": "sure",
168
+
"offset": 5400000,
169
+
"duration": 6300000
170
+
},
171
+
{
172
+
"word": "that",
173
+
"offset": 13600000,
174
+
"duration": 2300000
175
+
},
176
+
{
177
+
"word": "is",
178
+
"offset": 16000000,
179
+
"duration": 1300000
180
+
},
181
+
{
182
+
"word": "john",
183
+
"offset": 17400000,
184
+
"duration": 2500000
185
+
},
186
+
{
187
+
"word": "doe",
188
+
"offset": 20000000,
189
+
"duration": 2700000
190
+
}
191
+
]
192
+
}
193
+
]
194
+
}
195
+
]
196
+
},
197
+
"tasks": [
198
+
{
199
+
"taskName": "analyze 1",
200
+
"kind": "ConversationalPIITask",
201
+
"parameters": {
202
+
"modelVersion": "2022-05-15-preview",
203
+
"redactionSource": "text",
204
+
"includeAudioRedaction": true,
205
+
"piiCategories": [
206
+
"all"
207
+
]
208
+
}
209
+
}
210
+
]
211
+
}
212
+
`
213
+
```
214
+
215
+
## Submit text chats
216
+
217
+
Use the following example if you have conversations that originated in text. For example, conversations through a text-based chat client.
218
+
219
+
```bash
220
+
curl -i -X POST https://your-language-endpoint-here/language/analyze-conversations?api-version=2022-05-15-preview \
221
+
-H "Content-Type: application/json" \
222
+
-H "Ocp-Apim-Subscription-Key: your-key-here" \
223
+
-d \
224
+
'
225
+
{
226
+
"displayName": "Analyze conversations from xxx",
227
+
"analysisInput": {
228
+
"conversations": [
229
+
{
230
+
"id": "23611680-c4eb-4705-adef-4aa1c17507b5",
231
+
"language": "en",
232
+
"modality": "text",
233
+
"conversationItems": [
234
+
{
235
+
"participantId": "agent_1",
236
+
"id": "8074caf7-97e8-4492-ace3-d284821adacd",
237
+
"text": "Good morning."
238
+
},
239
+
{
240
+
"participantId": "agent_1",
241
+
"id": "0d67d52b-693f-4e34-9881-754a14eec887",
242
+
"text": "Can I have your name?"
243
+
},
244
+
{
245
+
"participantId": "customer_1",
246
+
"id": "08684a7a-5433-4658-a3f1-c6114fcfed51",
247
+
"text": "Sure that is John Doe."
248
+
}
249
+
]
250
+
}
251
+
]
252
+
},
253
+
"tasks": [
254
+
{
255
+
"taskName": "analyze 1",
256
+
"kind": "ConversationalPIITask",
257
+
"parameters": {
258
+
"modelVersion": "2022-05-15-preview"
259
+
}
260
+
}
261
+
]
262
+
}
263
+
`
264
+
```
265
+
266
+
267
+
## Get the result
268
+
269
+
Get the `operation-location` from the response header. The value will look similar to the following URL:
To get the results of the request, use the following cURL command. Be sure to replace `my-job-id` with the numerical ID value you received from the previous `operation-location` response header:
276
+
277
+
```bash
278
+
curl -X GET https://your-language-endpoint/language/analyze-conversations/jobs/my-job-id \
# What is Personally Identifiable Information (PII) detection in Azure Cognitive Service for Language?
17
17
18
-
PII detection is one of the features offered by [Azure Cognitive Service for Language](../overview.md), a collection of machine learning and AI algorithms in the cloud for developing intelligent applications that involve written language. The PII detection feature can identify, categorize, and redact sensitive information in unstructured text. For example: phone numbers, email addresses, and forms of identification.
18
+
PII detection is one of the features offered by [Azure Cognitive Service for Language](../overview.md), a collection of machine learning and AI algorithms in the cloud for developing intelligent applications that involve written language. The PII detection feature can identify, categorize, and redact sensitive information in unstructured text. For example: phone numbers, email addresses, and forms of identification. The method for utilizing PII in conversations is different than other use cases, and articles for this use have been separated.
19
19
20
20
*[**Quickstarts**](quickstart.md) are getting-started instructions to guide you through making requests to the service.
21
21
*[**How-to guides**](how-to-call.md) contain instructions for using the service in more specific or customized ways.
Use this article to get started detecting and redacting sensitive information in text, using the NER and PII client library and REST API. Follow these steps to try out examples code for mining text:
21
21
22
+
> [!NOTE]
23
+
> This quickstart only covers PII detection in documents. To learn more about detecting PII in conversations, see [How to detect and redact PII in conversations](how-to-call-for-conversations.md).
0 commit comments