if(useUber) {
List<Event> evs = new ArrayList<Event>();
for(String prevTagg : evsByPrev.keySet()) {
evs.addAll(evsByPrev.get(prevTagg));
}
DataIndexer di = new TwoPassDataIndexer(new EventCollectorAsStream(new SimpleEventCollector(evs)), featureCutOff);
ubermodel = GIS.trainModel(trainingCycles, di);
} else {
for(String prevTagg : evsByPrev.keySet()) {
if(Oscar3Props.getInstance().verbose) System.out.println(prevTagg);
List<Event> evs = evsByPrev.get(prevTagg);
if(featureSel) {
evs = new FeatureSelector().selectFeatures(evs);
}
if(evs.size() == 1) {
evs.add(evs.get(0));
}
DataIndexer di = null;
try {
di = new TwoPassDataIndexer(new EventCollectorAsStream(new SimpleEventCollector(evs)), featureCutOff);
gmByPrev.put(prevTagg, GIS.trainModel(trainingCycles, di));
} catch (Exception e) {
di = new TwoPassDataIndexer(new EventCollectorAsStream(new SimpleEventCollector(evs)), 1);