public Familiar_Phrase(ISpeechPhraseInfo new_phrase, Familiar_Result new_result) { phrase = new_phrase; result = new_result; // This is a little hacked up but it's very efficient id = result.options.Count + 1; process(); }
private XmlElement log_properties(ISpeechPhraseProperty property, XmlDocument writer, ISpeechPhraseInfo info) { XmlElement element = writer.CreateElement("property"); element.SetAttribute("name", property.Name); element.SetAttribute("value", property.Value.ToString()); element.SetAttribute("confidence", property.EngineConfidence.ToString()); string text = info.GetText(property.FirstElement, property.NumberOfElements, true); if (text != null) { XmlElement text_element = writer.CreateElement("text"); element.AppendChild(text_element); } if (property.Children != null) { foreach (ISpeechPhraseProperty child in property.Children) { element.AppendChild(log_properties(child, writer, info)); } } return(element); }