你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

ITextModeration.ScreenTextWithHttpMessagesAsync 方法

定义

检测不雅内容,并匹配自定义和共享的黑名单

public System.Threading.Tasks.Task<Microsoft.Rest.HttpOperationResponse<Microsoft.Azure.CognitiveServices.ContentModerator.Models.Screen>> ScreenTextWithHttpMessagesAsync (string textContentType, System.IO.Stream textContent, string language = default, bool? autocorrect = False, bool? pII = False, string listId = default, bool? classify = False, System.Collections.Generic.Dictionary<string,System.Collections.Generic.List<string>> customHeaders = default, System.Threading.CancellationToken cancellationToken = default);
abstract member ScreenTextWithHttpMessagesAsync : string * System.IO.Stream * string * Nullable<bool> * Nullable<bool> * string * Nullable<bool> * System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Rest.HttpOperationResponse<Microsoft.Azure.CognitiveServices.ContentModerator.Models.Screen>>
Public Function ScreenTextWithHttpMessagesAsync (textContentType As String, textContent As Stream, Optional language As String = Nothing, Optional autocorrect As Nullable(Of Boolean) = False, Optional pII As Nullable(Of Boolean) = False, Optional listId As String = Nothing, Optional classify As Nullable(Of Boolean) = False, Optional customHeaders As Dictionary(Of String, List(Of String)) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of HttpOperationResponse(Of Screen))

参数

textContentType
String

内容类型。 可能的值包括:“text/plain”、“text/html”、“text/xml”、“text/markdown”

textContent
Stream

内容到屏幕。

language
String

文本语言。

autocorrect
Nullable<Boolean>

自动更正文本。

pII
Nullable<Boolean>

检测个人身份信息。

listId
String

列表 ID。

classify
Nullable<Boolean>

对输入进行分类。

customHeaders
Dictionary<String,List<String>>

将添加到请求的标头。

cancellationToken
CancellationToken

取消标记。

返回

例外

操作返回无效状态代码时引发

无法反序列化响应时引发

当所需的参数为 null 时引发

注解

检测超过 100 种语言的亵渎内容,并匹配自定义和共享的黑名单。

适用于