TextModeration.ScreenTextWithHttpMessagesAsync(String, Stream, String, Nullable<Boolean>, Nullable<Boolean>, String, Nullable<Boolean>, Dictionary<String,List<String>>, CancellationToken) Method

Definition

Detect profanity and match against custom and shared blacklists

public System.Threading.Tasks.Task<Microsoft.Rest.HttpOperationResponse<Microsoft.Azure.CognitiveServices.ContentModerator.Models.Screen>> ScreenTextWithHttpMessagesAsync (string textContentType, System.IO.Stream textContent, string language = default, bool? autocorrect = False, bool? pII = False, string listId = default, bool? classify = False, System.Collections.Generic.Dictionary<string,System.Collections.Generic.List<string>> customHeaders = default, System.Threading.CancellationToken cancellationToken = default);
abstract member ScreenTextWithHttpMessagesAsync : string * System.IO.Stream * string * Nullable<bool> * Nullable<bool> * string * Nullable<bool> * System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Rest.HttpOperationResponse<Microsoft.Azure.CognitiveServices.ContentModerator.Models.Screen>>
override this.ScreenTextWithHttpMessagesAsync : string * System.IO.Stream * string * Nullable<bool> * Nullable<bool> * string * Nullable<bool> * System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Rest.HttpOperationResponse<Microsoft.Azure.CognitiveServices.ContentModerator.Models.Screen>>
Public Function ScreenTextWithHttpMessagesAsync (textContentType As String, textContent As Stream, Optional language As String = Nothing, Optional autocorrect As Nullable(Of Boolean) = False, Optional pII As Nullable(Of Boolean) = False, Optional listId As String = Nothing, Optional classify As Nullable(Of Boolean) = False, Optional customHeaders As Dictionary(Of String, List(Of String)) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of HttpOperationResponse(Of Screen))

Parameters

textContentType
System.String

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

textContent
System.IO.Stream

Content to screen.

language
System.String

Language of the text.

autocorrect
System.Nullable<System.Boolean>

Autocorrect text.

pII
System.Nullable<System.Boolean>

Detect personal identifiable information.

listId
System.String

The list Id.

classify
System.Nullable<System.Boolean>

Classify input.

customHeaders
System.Collections.Generic.Dictionary<System.String,System.Collections.Generic.List<System.String>>

Headers that will be added to request.

cancellationToken
System.Threading.CancellationToken

The cancellation token.

Returns

System.Threading.Tasks.Task<HttpOperationResponse<Screen>>

Implements

Exceptions

Thrown when the operation returned an invalid status code

Thrown when unable to deserialize the response

Thrown when a required parameter is null

System.ArgumentNullException

Thrown when a required parameter is null

Remarks

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

Applies to