bestAnte = processDem(anaphor, ll, jcas);
}
if(bestAnte.prob > CorefConsts.COREF_THRESHOLD){
CoreferenceRelation cr = new CoreferenceRelation(jcas);
RelationArgument ra1 = new RelationArgument(jcas);
ra1.setId(bestAnte.m.getId());
ra1.setArgument(bestAnte.m.getContent());
ra1.setRole("antecedent");
RelationArgument ra2 = new RelationArgument(jcas);
ra2.setId(anaphor.getId());
ra2.setArgument(anaphor.getContent());
ra2.setRole("anaphor");
cr.setArg1(ra1);
cr.setArg2(ra2);
cr.setConfidence(bestAnte.prob);
ra1.addToIndexes();
ra2.addToIndexes();
cr.addToIndexes();
ppt.union(m2q.get(anaphor), m2q.get(bestAnte.m));
if(anaphor instanceof PronounMarkable){
// if the anaphor is a pronoun then it won't be in the cas as an identifiedannotation so we need to add it.
IdentifiedAnnotation ia = new IdentifiedAnnotation(jcas);