List of usage examples for opennlp.tools.namefind TokenNameFinderModel serialize
@SuppressWarnings("unchecked") public final void serialize(OutputStream out) throws IOException
From source file:de.tudarmstadt.ukp.dkpro.core.opennlp.OpenNlpNamedEntityRecognizerTrainer.java
@Override public void collectionProcessComplete() throws AnalysisEngineProcessException { try {/* w w w. j av a 2 s. c o m*/ stream.close(); } catch (IOException e) { throw new AnalysisEngineProcessException(e); } TokenNameFinderModel model; try { model = future.get(); } catch (InterruptedException | ExecutionException e) { throw new AnalysisEngineProcessException(e); } try (OutputStream out = new FileOutputStream(targetLocation)) { model.serialize(out); } catch (IOException e) { throw new AnalysisEngineProcessException(e); } }