如何使用Stanford parser将文本或段落拆分成句子
有没有什么方法可以提取句子,比如为Ruby提供的getSentencesFromString()
发布于 2016-03-11 03:28:16
@Kevin答案中的一个变体将解决这个问题,如下所示:
for(CoreMap sentence: sentences) {
String sentenceText = sentence.get(TextAnnotation.class)
}这将为您提供句子信息,而不会影响其他注释器。
https://stackoverflow.com/questions/9492707
复制相似问题