List of usage examples for edu.stanford.nlp.util StringUtils argsToPropertiesWithResolve
public static Properties argsToPropertiesWithResolve(String[] args)
From source file:semRewrite.substitutor.MUC.java
License:Open Source License
/**************************************************************** * @return a Stanford pipeline// w w w. ja v a2 s.co m */ public StanfordCoreNLP initPipeline() { Properties props = new Properties(); //props.setProperty("annotators", "tokenize, ssplit, pos, lemma, ner, parse, dcoref"); props.setProperty("annotators", "tokenize, ssplit, pos, lemma, ner, entitymentions, parse, depparse, hcoref"); props.setProperty("tokenize.options", "ptb3Escaping=false"); //String[] configFileProp = {"-props","/home/apease/Programs/stanford-corenlp-full-2015-04-20/CoreNLP/build/resources/main/edu/stanford/nlp/hcoref/properties/coref-default-dep.properties"}; String[] configFileProp = { "-props", System.getenv("COREF") }; props.putAll(StringUtils.argsToPropertiesWithResolve(configFileProp)); System.out.println("MUC.toCoref(): before initialized pipeline"); StanfordCoreNLP pipeline = new StanfordCoreNLP(props); System.out.println("MUC.toCoref(): initialized pipeline"); return pipeline; }