List of usage examples for edu.stanford.nlp.ling SentenceUtils listToString
public static <T extends CoreMap> String listToString(List<T> list, String... keys)
From source file:edu.cmu.ark.nlp.question.QuestionUtil.java
License:Open Source License
public static List<String> getSentences(String document) { List<String> res = new ArrayList<String>(); StringReader reader = new StringReader(preprocess(document)); DocumentPreprocessor docPreprocessor = new DocumentPreprocessor(reader); for (List<HasWord> sentence : docPreprocessor) { res.add(SentenceUtils.listToString(sentence, true)); }/*from www . j ava2s.c o m*/ return res; }