throws IOException {
Map<String, String> manifestInfoEntries = new HashMap<String, String>();
ModelUtil.addCutoffAndIterations(manifestInfoEntries, cutoff, iterations);
AbstractModel model = GIS.trainModel(iterations, new TwoPassDataIndexer(
new DocumentCategorizerEventStream(samples, featureGenerators), cutoff));
return new DoccatModel(languageCode, model, manifestInfoEntries);
}