ConstructSmlFromSemantics Method

Microsoft Speech Platform SDK 11

Collapse imageExpand ImageCopy imageCopyHover image

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..::..IXPathNavigable

Returns 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.

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

See Also