public SingletonAnnotator(String host, int port, Properties properties, String annotator) { Properties forClient = new Properties(); for (Object o : properties.keySet()) { String key = o.toString(); String value = properties.getProperty(key); forClient.setProperty(key, value); forClient.setProperty(annotator + '.' + key, value); } if (lazy) { forClient.setProperty("annotators", annotator); forClient.setProperty("enforceRequirements", "false"); } else { String annotators = "tokenize,ssplit,pos,lemma,ner,parse,mention,coref,natlog,openie,sentiment"; if (!annotators.contains(annotator)) { annotators += "," + annotator; } forClient.setProperty("annotators", annotators); } this.client = new StanfordCoreNLPClient(forClient, host, port, key, secret); }
StanfordCoreNLPClient client = new StanfordCoreNLPClient(props, backends); client.run(); try {
public SingletonAnnotator(String host, int port, Properties properties, String annotator) { Properties forClient = new Properties(); for (Object o : properties.keySet()) { String key = o.toString(); String value = properties.getProperty(key); forClient.setProperty(key, value); forClient.setProperty(annotator + '.' + key, value); } if (lazy) { forClient.setProperty("annotators", annotator); forClient.setProperty("enforceRequirements", "false"); } else { String annotators = "tokenize,ssplit,pos,lemma,ner,parse,mention,coref,natlog,openie,sentiment"; if (!annotators.contains(annotator)) { annotators += "," + annotator; } forClient.setProperty("annotators", annotators); } this.client = new StanfordCoreNLPClient(forClient, host, port, key, secret); }
StanfordCoreNLPClient client = new StanfordCoreNLPClient(props, backends); client.run(); try {