List of usage examples for edu.stanford.nlp.pipeline DeterministicCorefAnnotator DeterministicCorefAnnotator
public DeterministicCorefAnnotator(Properties props)
From source file:org.aksw.simba.cetus.preprocessing.PronounReplacingSupplierDecorator.java
License:Open Source License
public static PronounReplacingSupplierDecorator create(DocumentSupplier documentSource) { Properties props = new Properties(); InputStream is;//from w w w .j a v a 2 s . co m is = PronounReplacingSupplierDecorator.class.getClassLoader() .getResourceAsStream(STANFORD_NLP_PROPERTIES_FILE); if (is == null) { LOGGER.error("Couldn't load stanford properties file (\"" + STANFORD_NLP_PROPERTIES_FILE + "\") from class path. Returning null."); return null; } try { props.load(is); } catch (IOException e) { LOGGER.error("Couldn't load stanford properties file. Returning null.", e); return null; } finally { IOUtils.closeQuietly(is); } DeterministicCorefAnnotator annotator = new DeterministicCorefAnnotator(props); return new PronounReplacingSupplierDecorator(documentSource, annotator); }