TextModeration class
表示 TextModeration 的类。
构造函数
| Text |
创建 TextModeration。 |
方法
构造函数详细信息
TextModeration(ContentModeratorClientContext)
创建 TextModeration。
new TextModeration(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<TextModerationDetectLanguageResponse>
承诺<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
可选参数
- callback
回调
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
要屏幕的内容。
- callback
回调
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
回调
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<TextModerationScreenTextResponse>
承诺<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
回调