修改列表corelabell的元素?

时间:2013-02-18 15:47:30

标签: java list stanford-nlp

List<CoreLabel> tks = doc.get(SentencesAnnotation.class).get(cm.sentNum - 1).get(TokensAnnotation.class);
for (int i = cm.startIndex - 1; i < cm.endIndex - 1; i++) {
    clust.append(tks.get(i).get(TextAnnotation.class) + " ");
}
for (int i = m.startIndex - 1; i < m.endIndex - 1; i++) {
    clust2.append(tks.get(i).get(TextAnnotation.class) + " ");
    pos = new StringBuffer(tks.get(i).tag());
}
clust2 = new StringBuffer(clust2.toString().trim());

现在我的目标是用clust替换clust2 ???? 如何修改句子???

0 个答案:

没有答案
相关问题