/// <summary> /// Takes an occurance and adds it into the syntatic categories /// dictionary. /// </summary> /// <param name="occurance"></param> private void AddToSyntaticCategory(SyntaticOccurance occurance) { if (!SyntaticCategories.ContainsKey(occurance.Category)) { SyntaticCategories.Add(occurance.Category, new List <SyntaticOccurance>()); } SyntaticCategories[occurance.Category].Add(occurance); }
/// <summary> /// Updates all of the different occurances and all of the /// SyntaticCategories dictionary. /// </summary> public void UpdateCategories() { SyntaticCategories.Clear(); foreach (SyntaticOccurance occurance in mSyntaticOccurances) { occurance.UpdateCategory(); AddToSyntaticCategory(occurance); } }
/// <summary> /// Clears all occurances and syntatic categories. /// </summary> public void Clear() { SyntaticCategories.Clear(); mSyntaticOccurances.Clear(); }