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
回呼