public void AddAttribute(string intentName, NLUEntity entity, AttributePair attribute) { if (!this.attributeMap.Keys.Contains(intentName)) { Dictionary <string, List <AttributePair> > wordToAttribute = new Dictionary <string, List <AttributePair> >(); this.attributeMap.Add(intentName, wordToAttribute); } string key = entity.GetIdentity(); if (!this.attributeMap[intentName].Keys.Contains(key)) { this.attributeMap[intentName].Add(key, new List <AttributePair>()); } this.attributeMap[intentName][key].Add(attribute); }