void MaxEntTrainer::Add_Event(EventSet &events, const char *name, const char *data) { const string delims(" "); MaxEntEvent *event = new MaxEntEvent; getIds(data, *event, delims); event->classId(getClassId(name)); event->count(1); events.push_back(event); }
void MaxEntTrainer::readEvents(istream& istrm, EventSet& events) { string line, cls; const string delims(" "); while ((istrm>>cls) && getline(istrm, line)) { MaxEntEvent* event = new MaxEntEvent; getIds(line, *event, delims); event->classId(getClassId(cls)); event->count(1); events.push_back(event); } }