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

TextModeration class

表示 TextModeration 的类。

构造函数

TextModeration(ContentModeratorClientContext)

创建 TextModeration。

方法

detectLanguage(TextContentType1, HttpRequestBody, RequestOptionsBase)

此操作检测给定输入内容的语言。 返回构成所提交文本的主要语言的 ISO 639-3 代码 。 支持 110 多种语言。

detectLanguage(TextContentType1, HttpRequestBody, RequestOptionsBase, ServiceCallback<DetectedLanguage>)
detectLanguage(TextContentType1, HttpRequestBody, ServiceCallback<DetectedLanguage>)
screenText(TextContentType, HttpRequestBody, ServiceCallback<Screen>)
screenText(TextContentType, HttpRequestBody, TextModerationScreenTextOptionalParams)

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

screenText(TextContentType, HttpRequestBody, TextModerationScreenTextOptionalParams, ServiceCallback<Screen>)

构造函数详细信息

TextModeration(ContentModeratorClientContext)

创建 TextModeration。

new TextModeration(client: ContentModeratorClientContext)

参数

client
ContentModeratorClientContext

对服务客户端的引用。

方法详细信息

detectLanguage(TextContentType1, HttpRequestBody, RequestOptionsBase)

此操作检测给定输入内容的语言。 返回构成所提交文本的主要语言的 ISO 639-3 代码 。 支持 110 多种语言。

function detectLanguage(textContentType: TextContentType1, textContent: HttpRequestBody, options?: RequestOptionsBase): Promise<TextModerationDetectLanguageResponse>

参数

textContentType
TextContentType1

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

textContent
HttpRequestBody

到屏幕的内容。

options
RequestOptionsBase

可选参数

返回

Promise<Models.TextModerationDetectLanguageResponse>

detectLanguage(TextContentType1, HttpRequestBody, RequestOptionsBase, ServiceCallback<DetectedLanguage>)

function detectLanguage(textContentType: TextContentType1, textContent: HttpRequestBody, options: RequestOptionsBase, callback: ServiceCallback<DetectedLanguage>)

参数

textContentType
TextContentType1

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

textContent
HttpRequestBody

到屏幕的内容。

options
RequestOptionsBase

可选参数

detectLanguage(TextContentType1, HttpRequestBody, ServiceCallback<DetectedLanguage>)

function detectLanguage(textContentType: TextContentType1, textContent: HttpRequestBody, callback: ServiceCallback<DetectedLanguage>)

参数

textContentType
TextContentType1

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

textContent
HttpRequestBody

到屏幕的内容。

screenText(TextContentType, HttpRequestBody, ServiceCallback<Screen>)

function screenText(textContentType: TextContentType, textContent: HttpRequestBody, callback: ServiceCallback<Screen>)

参数

textContentType
TextContentType

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

textContent
HttpRequestBody

到屏幕的内容。

callback

ServiceCallback<Screen>

回调

screenText(TextContentType, HttpRequestBody, TextModerationScreenTextOptionalParams)

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

function screenText(textContentType: TextContentType, textContent: HttpRequestBody, options?: TextModerationScreenTextOptionalParams): Promise<TextModerationScreenTextResponse>

参数

textContentType
TextContentType

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

textContent
HttpRequestBody

到屏幕的内容。

返回

Promise<Models.TextModerationScreenTextResponse>

screenText(TextContentType, HttpRequestBody, TextModerationScreenTextOptionalParams, ServiceCallback<Screen>)

function screenText(textContentType: TextContentType, textContent: HttpRequestBody, options: TextModerationScreenTextOptionalParams, callback: ServiceCallback<Screen>)

参数

textContentType
TextContentType

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

textContent
HttpRequestBody

到屏幕的内容。

callback

ServiceCallback<Screen>

回调