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

傳回

回傳 作為 RecognizedPhrase XPath 可導航物件的語意 SML 描述。

範例

在以下範例中,一個方法回傳一個包含已識別片語語意 SML 的字串。

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

適用於