Note

Please see Azure Cognitive Services for Speech documentation for the latest supported speech solutions.

RecognizedPhrase.ConstructSmlFromSemantics Method

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

'Declaration
Public Function ConstructSmlFromSemantics As IXPathNavigable
'Usage
Dim instance As RecognizedPhrase
Dim returnValue As IXPathNavigable

returnValue = instance.ConstructSmlFromSemantics()
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.

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

See Also

Reference

RecognizedPhrase Class

RecognizedPhrase Members

Microsoft.Speech.Recognition Namespace