RecognizedPhrase.ConstructSmlFromSemantics 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
返回对象中 RecognizedPhrase 语义信息的语义标记语言 (SML) 文档。
public:
System::Xml::XPath::IXPathNavigable ^ ConstructSmlFromSemantics();
public System.Xml.XPath.IXPathNavigable ConstructSmlFromSemantics();
member this.ConstructSmlFromSemantics : unit -> System.Xml.XPath.IXPathNavigable
Public Function ConstructSmlFromSemantics () As IXPathNavigable
返回
返回作为 XPath 可导航对象的语义的 RecognizedPhrase SML 说明。
示例
在下面的示例中,方法返回一个字符串,其中包含已识别短语语义的 SML。
private string GetSemanticsSML(RecognizedPhrase result)
{
if (result.Semantics.Count > 0)
{
return result.ConstructSmlFromSemantics().CreateNavigator().OuterXml;
}
else
{
return null;
}
}