opennlp.model.EventStream attachEvents = new ParserEventStream(parseSamples, rules,
ParserEventTypeEnum.ATTACH);
AbstractModel attachModel = train(attachEvents, iterations, cut);
// TODO: Remove cast for HeadRules
return new ParserModel(languageCode, buildModel, checkModel,
attachModel, posModel, chunkModel,
(opennlp.tools.parser.lang.en.HeadRules) rules, ParserType.TREEINSERT);
}