/// <summary>
        /// Constructor that creates an instance from a SemanticValue object's
        /// internal data. The newly created instance aims to represent the same
        /// data a SemanticValue object does.
        /// </summary>
        /// <param name="keyName">The key under which this semantic value instance is
        /// referenced by its parent. Can be null for the the root value</param>
        /// <param name="semanticValue"></param>
        public RecognizedSemanticValue(string keyName, SemanticValue semanticValue)
        {
            this.KeyName    = keyName;
            this.Confidence = semanticValue.Confidence;
            this.Value      = semanticValue.Value;

            // Copy children as well
            Children = new DssDictionary <string, RecognizedSemanticValue>();
            foreach (KeyValuePair <string, SemanticValue> child in semanticValue)
            {
                Children.Add(child.Key, new RecognizedSemanticValue(child.Key, child.Value));
            }
        }