【发布时间】:2015-12-20 20:43:56
【问题描述】:
我正在使用斯坦福 CoreNLP 工具,我需要将链分离为: “(参见功能要求编号 150)。”
我的代码的结果是(在 corelabels 中): [(见,功能,要求,数量,150)。]
什么时候应该: [(,see,functional, requirements, number, 150,),.]
代码段为:
public List<CoreMap> armador(String text){
Properties props;
StanfordCoreNLP pipeline;
props.put("annotators", "tokenize,ssplit,pos");
props.put("ssplit.eolonly", "true");
props.put("tokenize.whitespace", "true");
pipeline = new StanfordCoreNLP(props);
Annotation document = new Annotation(text);
pipeline.annotate(document);
List<CoreMap> result = document.get(CoreAnnotations.SentencesAnnotation.class);
return result;
}
谢谢,对不起我的英语!
【问题讨论】:
标签: java stanford-nlp tokenize