Compartilhar via


TextModerations Interface

public interface TextModerations

An instance of this class provides access to all the operations defined in TextModerations.

Method Summary

Modifier and Type Method and Description
DetectedLanguage detectLanguage(String textContentType, byte[] textContent)

This operation will detect the language of given input content. Returns the <a href="http://www-01.sil.org/iso639-3/codes.asp">ISO 639-3 code</a> for the predominant language comprising the submitted text. Over 110 languages supported.

Observable<DetectedLanguage> detectLanguageAsync(String textContentType, byte[] textContent)

This operation will detect the language of given input content. Returns the <a href="http://www-01.sil.org/iso639-3/codes.asp">ISO 639-3 code</a> for the predominant language comprising the submitted text. Over 110 languages supported.

TextModerationsScreenTextDefinitionStages.WithTextContentType screenText()

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

Screen screenText(String textContentType, byte[] textContent, ScreenTextOptionalParameter screenTextOptionalParameter)

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

Observable<Screen> screenTextAsync(String textContentType, byte[] textContent, ScreenTextOptionalParameter screenTextOptionalParameter)

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

Method Details

detectLanguage

public DetectedLanguage detectLanguage(String textContentType, byte[] textContent)

This operation will detect the language of given input content. Returns the <a href="http://www-01.sil.org/iso639-3/codes.asp">ISO 639-3 code</a> for the predominant language comprising the submitted text. Over 110 languages supported.

Parameters:

textContentType - The content type. Possible values include: 'text/plain', 'text/html', 'text/xml', 'text/markdown'.
textContent - Content to screen.

Returns:

the DetectedLanguage object if successful.

Throws:

IllegalArgumentException - thrown if parameters fail the validation
APIErrorException - thrown if the request is rejected by server
RuntimeException - all other wrapped checked exceptions if the request fails to be sent

detectLanguageAsync

public Observable detectLanguageAsync(String textContentType, byte[] textContent)

This operation will detect the language of given input content. Returns the <a href="http://www-01.sil.org/iso639-3/codes.asp">ISO 639-3 code</a> for the predominant language comprising the submitted text. Over 110 languages supported.

Parameters:

textContentType - The content type. Possible values include: 'text/plain', 'text/html', 'text/xml', 'text/markdown'.
textContent - Content to screen.

Returns:

the observable to the DetectedLanguage object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

screenText

public TextModerationsScreenTextDefinitionStages.WithTextContentType screenText()

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

Returns:

the first stage of the screenText call

screenText

public Screen screenText(String textContentType, byte[] textContent, ScreenTextOptionalParameter screenTextOptionalParameter)

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

Parameters:

textContentType - The content type. Possible values include: 'text/plain', 'text/html', 'text/xml', 'text/markdown'.
textContent - Content to screen.
screenTextOptionalParameter - the object representing the optional parameters to be set before calling this API

Returns:

the Screen object if successful.

Throws:

IllegalArgumentException - thrown if parameters fail the validation
APIErrorException - thrown if the request is rejected by server
RuntimeException - all other wrapped checked exceptions if the request fails to be sent

screenTextAsync

public Observable screenTextAsync(String textContentType, byte[] textContent, ScreenTextOptionalParameter screenTextOptionalParameter)

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

Parameters:

textContentType - The content type. Possible values include: 'text/plain', 'text/html', 'text/xml', 'text/markdown'.
textContent - Content to screen.
screenTextOptionalParameter - the object representing the optional parameters to be set before calling this API

Returns:

the observable to the Screen object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

Applies to