InputStream in = getClass().getClassLoader().getResourceAsStream(
"opennlp/tools/namefind/OnlyWithEntitiesWithTypes.train");
ObjectStream<NameSample> sampleStream = new NameSampleDataStream(
new PlainTextByLineStream(new MockInputStreamFactory(in), "UTF-8"));
TrainingParameters params = new TrainingParameters();
params.put(TrainingParameters.ITERATIONS_PARAM, Integer.toString(70));
params.put(TrainingParameters.CUTOFF_PARAM, Integer.toString(1));