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/Content-Moderator/text-moderation-api.md
+60-89Lines changed: 60 additions & 89 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ ms.author: pafarley
16
16
17
17
# Learn text moderation concepts
18
18
19
-
Use Content Moderator’s machine-assisted text moderation and [human review](Review-Tool-User-Guide/human-in-the-loop.md) capabilities to moderate text content.
19
+
Use Content Moderator's machine-assisted text moderation and [human review](Review-Tool-User-Guide/human-in-the-loop.md) capabilities to moderate text content.
20
20
21
21
You either block, approve or review the content based on your policies and thresholds. Use it to augment human moderation of environments where partners, employees and consumers generate text content. These include chat rooms, discussion boards, chatbots, e-commerce catalogs, and documents.
22
22
@@ -33,13 +33,13 @@ The service response includes the following information:
33
33
34
34
If the API detects any profane terms in any of the [supported languages](Text-Moderation-API-Languages.md), those terms are included in the response. The response also contains their location (`Index`) in the original text. The `ListId` in the following sample JSON refers to terms found in [custom term lists](try-terms-list-api.md) if available.
35
35
36
-
"Terms": [
37
-
{
38
-
"Index": 118,
39
-
"OriginalIndex": 118,
40
-
"ListId": 0,
41
-
"Term": "crap"
42
-
}
36
+
"Terms": [
37
+
{
38
+
"Index": 118,
39
+
"OriginalIndex": 118,
40
+
"ListId": 0,
41
+
"Term": "crap"
42
+
}
43
43
44
44
> [!NOTE]
45
45
> For the **language** parameter, assign `eng` or leave it empty to see the machine-assisted **classification** response (preview feature). **This feature supports English only**.
@@ -48,22 +48,22 @@ If the API detects any profane terms in any of the [supported languages](Text-Mo
48
48
49
49
## Classification
50
50
51
-
Content Moderator’s machine-assisted **text classification feature** supports **English only**, and helps detect potentially undesired content. The flagged content may be assessed as inappropriate depending on context. It conveys the likelihood of each category and may recommend a human review. The feature uses a trained model to identify possible abusive, derogatory or discriminatory language. This includes slang, abbreviated words, offensive, and intentionally misspelled words for review.
51
+
Content Moderator's machine-assisted **text classification feature** supports **English only**, and helps detect potentially undesired content. The flagged content may be assessed as inappropriate depending on context. It conveys the likelihood of each category and may recommend a human review. The feature uses a trained model to identify possible abusive, derogatory or discriminatory language. This includes slang, abbreviated words, offensive, and intentionally misspelled words for review.
52
52
53
53
The following extract in the JSON extract shows an example output:
54
54
55
-
"Classification": {
56
-
"ReviewRecommended": true,
57
-
"Category1": {
58
-
"Score": 1.5113095059859916E-06
59
-
},
60
-
"Category2": {
61
-
"Score": 0.12747249007225037
62
-
},
63
-
"Category3": {
64
-
"Score": 0.98799997568130493
65
-
}
66
-
}
55
+
"Classification": {
56
+
"ReviewRecommended": true,
57
+
"Category1": {
58
+
"Score": 1.5113095059859916E-06
59
+
},
60
+
"Category2": {
61
+
"Score": 0.12747249007225037
62
+
},
63
+
"Category3": {
64
+
"Score": 0.98799997568130493
65
+
}
66
+
}
67
67
68
68
### Explanation
69
69
@@ -78,86 +78,57 @@ The following extract in the JSON extract shows an example output:
78
78
The personal data feature detects the potential presence of this information:
Suppose the input text is (the ‘lzay’ and 'f0x' are intentional):
125
+
Suppose the input text is (the 'lzay' and 'f0x' are intentional):
155
126
156
-
The qu!ck brown f0x jumps over the lzay dog.
127
+
The qu!ck brown f0x jumps over the lzay dog.
157
128
158
129
If you ask for auto-correction, the response contains the corrected version of the text:
159
130
160
-
The quick brown fox jumps over the lazy dog.
131
+
The quick brown fox jumps over the lazy dog.
161
132
162
133
## Creating and managing your custom lists of terms
163
134
@@ -169,13 +140,13 @@ While the default, global list of terms works great for most cases, you may want
169
140
170
141
The following example shows the matching List ID:
171
142
172
-
"Terms": [
173
-
{
174
-
"Index": 118,
175
-
"OriginalIndex": 118,
176
-
"ListId": 231.
177
-
"Term": "crap"
178
-
}
143
+
"Terms": [
144
+
{
145
+
"Index": 118,
146
+
"OriginalIndex": 118,
147
+
"ListId": 231.
148
+
"Term": "crap"
149
+
}
179
150
180
151
The Content Moderator provides a [Term List API](https://westus.dev.cognitive.microsoft.com/docs/services/57cf755e3f9b070c105bd2c2/operations/57cf755e3f9b070868a1f67f) with operations for managing custom term lists. Start with the [Term Lists API Console](try-terms-list-api.md) and use the REST API code samples. Also check out the [Term Lists .NET quickstart](term-lists-quickstart-dotnet.md) if you are familiar with Visual Studio and C#.
Copy file name to clipboardExpand all lines: articles/cognitive-services/Content-Moderator/try-text-api.md
+57-91Lines changed: 57 additions & 91 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -59,7 +59,8 @@ For **Content-Type**, select the type of content you want to screen. For this ex
59
59
In the **Request body** box, enter some text. The following example shows an intentional typo in the text.
60
60
61
61
```
62
-
Is this a grabage or crap email [email protected], phone: 4255550111, IP: 255.255.255.255, 1234 Main Boulevard, Panapolis WA 96555. These are all UK phone numbers, the last two being Microsoft UK support numbers: +44 870 608 4000 or 0344 800 2400 or 0800 820 3300. Also, 999-99-9999 looks like a social security number (SSN).
62
+
Is this a grabage or crap email [email protected], phone: 4255550111, IP:
63
+
255.255.255.255, 1234 Main Boulevard, Panapolis WA 96555.
63
64
```
64
65
65
66
## Analyze the response
@@ -70,96 +71,61 @@ The following response shows the various insights from the API. It contains pote
70
71
> The machine-assisted 'Classification' feature is in preview and supports English only.
71
72
72
73
```json
73
-
{"OriginalText":"Is this a grabage or crap email [email protected], phone: 4255550111, IP: 255.255.255.255, 1234 Main Boulevard, Panapolis WA 96555.\r\nThese are all UK phone numbers: +44 123 456 7890 or 0234 567 8901 or 0456 789 0123.\r\nAlso, 999-99-9999 looks like a social security number (SSN).",
74
-
"NormalizedText":"Is this a grabage or crap email abcdef@ abcd. com, phone: 4255550111, IP: 255. 255. 255. 255, 1234 Main Boulevard, Panapolis WA 96555. \r\nThese are all UK phone numbers: +44 123 456 7890 or 0234 567 8901 or 0456 789 0123. \r\nAlso, 999- 99- 9999 looks like a social security number ( SSN) .",
Copy file name to clipboardExpand all lines: articles/cognitive-services/Content-Moderator/video-transcript-moderation-review-tutorial-dotnet.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -79,7 +79,7 @@ The class `Program` in `Program.cs` is the main entry point to the video moderat
79
79
If no command-line arguments are present, `Main()` calls `GetUserInputs()`. This method prompts the user to enter the path to a single video file and to specify whether a text transcript should be generated.
80
80
81
81
> [!NOTE]
82
-
> The console application uses the [Azure Media Indexer API](https://docs.microsoft.com/azure/media-services/media-services-process-content-with-indexer2) to generate transcripts from the uploaded video's audio track. The results are provided in WebVTT format. For more information on this format, see [Web Video Text Tracks Format](https://developer.mozilla.org/en-US/docs/Web/API/WebVTT_API).
82
+
> The console application uses the [Azure Media Indexer API](https://docs.microsoft.com/azure/media-services/media-services-process-content-with-indexer2) to generate transcripts from the uploaded video's audio track. The results are provided in WebVTT format. For more information on this format, see [Web Video Text Tracks Format](https://developer.mozilla.org/docs/Web/API/WebVTT_API).
83
83
84
84
### Initialize and ProcessVideo methods
85
85
@@ -220,7 +220,7 @@ The result of the video moderation job (See [video moderation quickstart](video-
220
220
A transcription of the audio from the video is also produced when the `GenerateVTT` flag is set.
221
221
222
222
> [!NOTE]
223
-
> The console application uses the [Azure Media Indexer API](https://docs.microsoft.com/azure/media-services/media-services-process-content-with-indexer2) to generate transcripts from the uploaded video's audio track. The results are provided in WebVTT format. For more information on this format, see [Web Video Text Tracks Format](https://developer.mozilla.org/en-US/docs/Web/API/WebVTT_API).
223
+
> The console application uses the [Azure Media Indexer API](https://docs.microsoft.com/azure/media-services/media-services-process-content-with-indexer2) to generate transcripts from the uploaded video's audio track. The results are provided in WebVTT format. For more information on this format, see [Web Video Text Tracks Format](https://developer.mozilla.org/docs/Web/API/WebVTT_API).
0 commit comments