TextModeration class

Class representing a TextModeration.

Constructors

TextModeration(ContentModeratorClientContext)

Create a TextModeration.

Methods

detectLanguage(TextContentType1, HttpRequestBody, RequestOptionsBase)

This operation will detect the language of given input content. Returns the ISO 639-3 code for the predominant language comprising the submitted text. Over 110 languages supported.

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

Detects profanity in more than 100 languages and match against custom and shared blacklists.

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

Constructor Details

TextModeration(ContentModeratorClientContext)

Create a TextModeration.

new TextModeration(client: ContentModeratorClientContext)

Parameters

client
ContentModeratorClientContext

Reference to the service client.

Method Details

detectLanguage(TextContentType1, HttpRequestBody, RequestOptionsBase)

This operation will detect the language of given input content. Returns the ISO 639-3 code for the predominant language comprising the submitted text. Over 110 languages supported.

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

Parameters

textContentType
TextContentType1

The content type. Possible values include: 'text/plain', 'text/html', 'text/xml', 'text/markdown'

textContent
HttpRequestBody

Content to screen.

options
RequestOptionsBase

The optional parameters

Returns

Promise<Models.TextModerationDetectLanguageResponse>

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

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

Parameters

textContentType
TextContentType1

The content type. Possible values include: 'text/plain', 'text/html', 'text/xml', 'text/markdown'

textContent
HttpRequestBody

Content to screen.

options
RequestOptionsBase

The optional parameters

callback

ServiceCallback<DetectedLanguage>

The callback

detectLanguage(TextContentType1, HttpRequestBody, ServiceCallback<DetectedLanguage>)

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

Parameters

textContentType
TextContentType1

The content type. Possible values include: 'text/plain', 'text/html', 'text/xml', 'text/markdown'

textContent
HttpRequestBody

Content to screen.

callback

ServiceCallback<DetectedLanguage>

The callback

screenText(TextContentType, HttpRequestBody, ServiceCallback<Screen>)

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

Parameters

textContentType
TextContentType

The content type. Possible values include: 'text/plain', 'text/html', 'text/xml', 'text/markdown'

textContent
HttpRequestBody

Content to screen.

callback

ServiceCallback<Screen>

The callback

screenText(TextContentType, HttpRequestBody, TextModerationScreenTextOptionalParams)

Detects profanity in more than 100 languages and match against custom and shared blacklists.

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

Parameters

textContentType
TextContentType

The content type. Possible values include: 'text/plain', 'text/html', 'text/xml', 'text/markdown'

textContent
HttpRequestBody

Content to screen.

options
TextModerationScreenTextOptionalParams

The optional parameters

Returns

Promise<Models.TextModerationScreenTextResponse>

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

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

Parameters

textContentType
TextContentType

The content type. Possible values include: 'text/plain', 'text/html', 'text/xml', 'text/markdown'

textContent
HttpRequestBody

Content to screen.

options
TextModerationScreenTextOptionalParams

The optional parameters

callback

ServiceCallback<Screen>

The callback