RecognizedPhrase.ConstructSmlFromSemantics 方法

定義

傳回 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

傳回

IXPathNavigable

傳回 RecognizedPhrase 語意的 SML 描述,作為 XPath 可巡覽物件。

範例

在下列範例中,方法會傳回字串,其中包含可辨識片語之語義的 SML。

private string GetSemanticsSML(RecognizedPhrase result)  
{  
  if (result.Semantics.Count > 0)  
  {  
    return result.ConstructSmlFromSemantics().CreateNavigator().OuterXml;  
  }  
  else  
  {  
    return null;  
  }  
}  

備註

如需有關語義標記語言 (SML) 的詳細資訊,請參閱 語義標記語言參考

適用於