TextModerationExtensions.DetectLanguageAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.
public static System.Threading.Tasks.Task<Microsoft.Azure.CognitiveServices.ContentModerator.Models.DetectedLanguage> DetectLanguageAsync (this Microsoft.Azure.CognitiveServices.ContentModerator.ITextModeration operations, string textContentType, System.IO.Stream textContent, System.Threading.CancellationToken cancellationToken = default);
static member DetectLanguageAsync : Microsoft.Azure.CognitiveServices.ContentModerator.ITextModeration * string * System.IO.Stream * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.CognitiveServices.ContentModerator.Models.DetectedLanguage>
<Extension()>
Public Function DetectLanguageAsync (operations As ITextModeration, textContentType As String, textContent As Stream, Optional cancellationToken As CancellationToken = Nothing) As Task(Of DetectedLanguage)
Parameters
- operations
- ITextModeration
The operations group for this extension method.
- textContentType
- String
The content type. Possible values include: 'text/plain', 'text/html', 'text/xml', 'text/markdown'
- textContent
- Stream
Content to screen.
- cancellationToken
- CancellationToken
The cancellation token.
Returns
Applies to
Azure SDK for .NET