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
傳回
回傳 作為 RecognizedPhrase XPath 可導航物件的語意 SML 描述。
範例
在以下範例中,一個方法回傳一個包含已識別片語語意 SML 的字串。
private string GetSemanticsSML(RecognizedPhrase result)
{
if (result.Semantics.Count > 0)
{
return result.ConstructSmlFromSemantics().CreateNavigator().OuterXml;
}
else
{
return null;
}
}