你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

TextModerationExtensions.DetectLanguageAsync 方法

定义

此操作检测给定输入内容的语言。 返回 <href=“http://www-01.sil.org/iso639-3/codes.asp">包含所提交文本的主要语言的 ISO 639-3 代码</a> 。 支持 110 多种语言。

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)

参数

operations
ITextModeration

此扩展方法的操作组。

textContentType
String

内容类型。 可能的值包括:“text/plain”、“text/html”、“text/xml”、“text/markdown”

textContent
Stream

到屏幕的内容。

cancellationToken
CancellationToken

取消标记。

返回

适用于