//Note: I tried LinkerMode.EVAL for a long time
// before realizing that this was the problem
"models/coref", LinkerMode.TEST);
int sentenceNumber = 0;
Mention[] extents = treebankLinker.getMentionFinder().getMentions(
new DefaultParse(chosen_parse, sentenceNumber));
// construct new parses for mentions which don't have constituents.
// for (int ei = 0, en = extents.length; ei < en; ei++) {
for (final Mention mention : extents) {
// System.err.println("PennTreebankLiner.main: "+ei+" "+extents[ei]);
// if (extents[ei].getParse() == null) {
if (mention.getParse() == null) {
Parse snp = new Parse(p.getText(), mention.getSpan(), "NML",
1.0, null);
p.insert(snp);
mention.setParse(new DefaultParse(snp, sentenceNumber));
}
}
document.addAll(Arrays.asList(extents));