protected internal virtual void Add(int nFeatFrame, History history, int number) { Pair <int, string> wT; int general = maxentTagger.extractors.Size(); if (nFeatFrame < general) { wT = new Pair <int, string>(nFeatFrame, maxentTagger.extractors.Extract(nFeatFrame, history)); } else { wT = new Pair <int, string>(nFeatFrame, maxentTagger.extractorsRare.Extract(nFeatFrame - general, history)); } if (tempHash.Contains(wT)) { ListInstances li = tempHash[wT]; // TODO: can we clean this call up somehow? perhaps make the // TemplateHash aware of the TaggerExperiments if we need to, or // vice-versa? if (TaggerExperiments.IsPopulated(nFeatFrame, li.GetNum(), maxentTagger)) { li.Add(number); } } else { ListInstances li = new ListInstances(); li.Add(number); tempHash[wT] = li; } }
protected internal virtual void AddPrev(int nFeatFrame, History history) { Pair <int, string> wT; int general = maxentTagger.extractors.Size(); if (nFeatFrame < general) { wT = new Pair <int, string>(nFeatFrame, maxentTagger.extractors.Extract(nFeatFrame, history)); } else { wT = new Pair <int, string>(nFeatFrame, maxentTagger.extractorsRare.Extract(nFeatFrame - general, history)); } if (tempHash.Contains(wT)) { (tempHash[wT]).Inc(); } else { ListInstances li = new ListInstances(); li.Inc(); tempHash[wT] = li; } }