}
*/
@SuppressWarnings("unchecked")
public void setExtents(Context[] extentContexts) {
HashList entities = new HashList();
/** Extents which are not in a coreference chain. */
List<Context> singletons = new ArrayList<Context>();
List<Context> allExtents = new ArrayList<Context>();
//populate data structures
for (int ei = 0, el = extentContexts.length; ei < el; ei++) {
Context ec = extentContexts[ei];
//System.err.println("SimilarityModel: setExtents: ec("+ec.getId()+") "+ec.getNameType()+" "+ec);
if (ec.getId() == -1) {
singletons.add(ec);
}
else {
entities.put(ec.getId(), ec);
}
allExtents.add(ec);
}
int axi = 0;
Map<Integer, Set<String>> headSets = constructHeadSets(entities);
Map<Integer, Set<String>> nameSets = constructNameSets(entities);
for (Iterator<Integer> ei = entities.keySet().iterator(); ei.hasNext();) {
Integer key = ei.next();
Set<String> entityNameSet = nameSets.get(key);
if (entityNameSet.isEmpty()) {
continue;
}
List<Context> entityContexts = (List<Context>) entities.get(key);
Set<Context> exclusionSet = constructExclusionSet(key, entities, headSets, nameSets, singletons);
if (entityContexts.size() == 1) {
}
for (int xi1 = 0, xl = entityContexts.size(); xi1 < xl; xi1++) {
Context ec1 = entityContexts.get(xi1);