*/
public static POSModel train(String languageCode, ObjectStream<POSSample> samples, POSDictionary tagDictionary,
Dictionary ngramDictionary, int cutoff, int iterations) throws IOException {
GISModel posModel = opennlp.maxent.GIS.trainModel(iterations,
new TwoPassDataIndexer(new POSSampleEventStream(samples,
new DefaultPOSContextGenerator(ngramDictionary)), cutoff));
return new POSModel(languageCode, posModel, tagDictionary, ngramDictionary);
}