ConstructSmlFromSemantics Method
From Microsoft Speech Platform SDK 11
| RecognizedPhrase..::..ConstructSmlFromSemantics Method |
| RecognizedPhrase Class Example See Also Send Feedback |
Returns a semantic markup language (SML) document for the semantic information in the RecognizedPhrase object.
Namespace:
Microsoft.Speech.Recognition
Assembly:
Microsoft.Speech (in Microsoft.Speech.dll)
Syntax
| Visual Basic (Declaration) |
|---|
Public Function ConstructSmlFromSemantics As IXPathNavigable |
| Visual Basic (Usage) |
|---|
Dim instance As RecognizedPhrase Dim returnValue As IXPathNavigable returnValue = instance.ConstructSmlFromSemantics() |
| C# |
|---|
public IXPathNavigable ConstructSmlFromSemantics() |
Return Value
Type: System.Xml.XPath..::..IXPathNavigableReturns an SML description of the semantics of the RecognizedPhrase as an XPath navigable object.
Examples
In the following example, a method returns a string that contains the SML for the semantics of a recognized phrase.
private string GetSemanticsSML(RecognizedPhrase result)
{
if (result.Semantics.Count > 0)
{
return result.ConstructSmlFromSemantics().CreateNavigator().OuterXml;
}
else
{
return null;
}
} | |