Map<Integer, Mention> golds = document.allGoldMentions;
logger.fine("=======ERROR ANALYSIS=========================================================");
// Temporary sieve for getting ordered antecedents
DeterministicCorefSieve tmpSieve = new ExactStringMatch();
for (int i = 0 ; i < orderedMentionsBySentence.size(); i++) {
List<Mention> orderedMentions = orderedMentionsBySentence.get(i);
for (int j = 0 ; j < orderedMentions.size(); j++) {
Mention m = orderedMentions.get(j);
logger.fine("=========Line: "+i+"\tmention: "+j+"=======================================================");
logger.fine(m.spanToString()+"\tmentionID: "+m.mentionID+"\tcorefClusterID: "+m.corefClusterID+"\tgoldCorefClusterID: "+m.goldCorefClusterID);
CorefCluster corefCluster = corefClusters.get(m.corefClusterID);
if (corefCluster != null) {
corefCluster.printCorefCluster(logger);
} else {
logger.finer("CANNOT find coref cluster for cluster " + m.corefClusterID);
}
logger.fine("-------------------------------------------------------");
boolean oneRecallErrorPrinted = false;
boolean onePrecisionErrorPrinted = false;
boolean alreadyChoose = false;
for (int sentJ = i; sentJ >= 0; sentJ--) {
List<Mention> l = tmpSieve.getOrderedAntecedents(sentJ, i, orderedMentions, orderedMentionsBySentence, m, j, corefClusters, dictionaries);
// Sort mentions by length whenever we have two mentions beginning at the same position and having the same head
for(int ii = 0; ii < l.size(); ii++) {
for(int jj = 0; jj < l.size(); jj++) {
if(l.get(ii).headString.equals(l.get(jj).headString) &&