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

TextModerationExtensions.DetectLanguage 方法

定义

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

public static Microsoft.Azure.CognitiveServices.ContentModerator.Models.DetectedLanguage DetectLanguage (this Microsoft.Azure.CognitiveServices.ContentModerator.ITextModeration operations, string textContentType, System.IO.Stream textContent);
static member DetectLanguage : Microsoft.Azure.CognitiveServices.ContentModerator.ITextModeration * string * System.IO.Stream -> Microsoft.Azure.CognitiveServices.ContentModerator.Models.DetectedLanguage
<Extension()>
Public Function DetectLanguage (operations As ITextModeration, textContentType As String, textContent As Stream) As DetectedLanguage

参数

operations
ITextModeration

此扩展方法的操作组。

textContentType
String

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

textContent
Stream

内容到屏幕。

返回

适用于