Partilhar via


ITextModeration.DetectLanguageWithHttpMessagesAsync Método

Definição

Essa operação detectará o idioma do conteúdo de entrada fornecido. Retorna a <href="http://www-01.sil.org/iso639-3/codes.asp"> Código ISO 639-3</> a para o idioma predominante que compreende o texto enviado. Mais de 110 idiomas com suporte.

public System.Threading.Tasks.Task<Microsoft.Rest.HttpOperationResponse<Microsoft.Azure.CognitiveServices.ContentModerator.Models.DetectedLanguage>> DetectLanguageWithHttpMessagesAsync (string textContentType, System.IO.Stream textContent, System.Collections.Generic.Dictionary<string,System.Collections.Generic.List<string>> customHeaders = default, System.Threading.CancellationToken cancellationToken = default);
abstract member DetectLanguageWithHttpMessagesAsync : string * System.IO.Stream * 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.DetectedLanguage>>
Public Function DetectLanguageWithHttpMessagesAsync (textContentType As String, textContent As Stream, Optional customHeaders As Dictionary(Of String, List(Of String)) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of HttpOperationResponse(Of DetectedLanguage))

Parâmetros

textContentType
String

O tipo de conteúdo. Os valores possíveis incluem: 'text/plain', 'text/html', 'text/xml', 'text/markdown'

textContent
Stream

Conteúdo para tela.

customHeaders
Dictionary<String,List<String>>

Os cabeçalhos que serão adicionados à solicitação.

cancellationToken
CancellationToken

O token de cancelamento.

Retornos

Exceções

Gerada quando a operação retornou um código de status inválido

Gerada quando não é possível desserializar a resposta

Gerado quando um parâmetro necessário é nulo

Aplica-se a