public Document() { positions = Generics.newHashMap(); mentionheadPositions = Generics.newHashMap(); roleSet = Generics.newHashSet(); corefClusters = Generics.newHashMap(); goldCorefClusters = null; allPredictedMentions = Generics.newHashMap(); allGoldMentions = Generics.newHashMap(); speakers = Generics.newHashMap(); speakerPairs = Generics.newHashSet(); incompatibles = TwoDimensionalSet.hashSet(); incompatibleClusters = TwoDimensionalSet.hashSet(); acronymCache = TwoDimensionalMap.hashMap(); }
public void mergeAcronymCache(CorefCluster to, CorefCluster from) { TwoDimensionalSet<Integer, Integer> replacements = TwoDimensionalSet.hashSet(); for (Integer first : acronymCache.firstKeySet()) { for (Integer second : acronymCache.get(first).keySet()) { if (acronymCache.get(first, second)) { Integer other = null; if (first == from.clusterID) { other = second; } else if (second == from.clusterID) { other = first; } if (other != null && other != to.clusterID) { int cid1 = Math.min(other, to.clusterID); int cid2 = Math.max(other, to.clusterID); replacements.add(cid1, cid2); } } } } for (Integer first : replacements.firstKeySet()) { for (Integer second : replacements.secondKeySet(first)) { acronymCache.put(first, second, true); } } }
TwoDimensionalSet<String, String> binaryProductions = TwoDimensionalSet.hashSet(); if (op.simplifiedModel) { binaryProductions.add("", "");
public Document() { positions = Generics.newHashMap(); mentionheadPositions = Generics.newHashMap(); roleSet = Generics.newHashSet(); corefClusters = Generics.newHashMap(); goldCorefClusters = null; allPredictedMentions = Generics.newHashMap(); allGoldMentions = Generics.newHashMap(); speakers = Generics.newHashMap(); speakerPairs = Generics.newHashSet(); incompatibles = TwoDimensionalSet.hashSet(); incompatibleClusters = TwoDimensionalSet.hashSet(); acronymCache = TwoDimensionalMap.hashMap(); }
public void mergeAcronymCache(CorefCluster to, CorefCluster from) { TwoDimensionalSet<Integer, Integer> replacements = TwoDimensionalSet.hashSet(); for (Integer first : acronymCache.firstKeySet()) { for (Integer second : acronymCache.get(first).keySet()) { if (acronymCache.get(first, second)) { Integer other = null; if (first == from.clusterID) { other = second; } else if (second == from.clusterID) { other = first; } if (other != null && other != to.clusterID) { int cid1 = Math.min(other, to.clusterID); int cid2 = Math.max(other, to.clusterID); replacements.add(cid1, cid2); } } } } for (Integer first : replacements.firstKeySet()) { for (Integer second : replacements.secondKeySet(first)) { acronymCache.put(first, second, true); } } }
public Document() { positions = Generics.newHashMap(); mentionheadPositions = Generics.newHashMap(); roleSet = Generics.newHashSet(); corefClusters = Generics.newHashMap(); goldCorefClusters = null; allPredictedMentions = Generics.newHashMap(); allGoldMentions = Generics.newHashMap(); speakers = Generics.newHashMap(); speakerPairs = Generics.newHashSet(); incompatibles = TwoDimensionalSet.hashSet(); incompatibleClusters = TwoDimensionalSet.hashSet(); acronymCache = TwoDimensionalMap.hashMap(); }
public void mergeAcronymCache(CorefCluster to, CorefCluster from) { TwoDimensionalSet<Integer, Integer> replacements = TwoDimensionalSet.hashSet(); for (Integer first : acronymCache.firstKeySet()) { for (Integer second : acronymCache.get(first).keySet()) { if (acronymCache.get(first, second)) { Integer other = null; if (first == from.clusterID) { other = second; } else if (second == from.clusterID) { other = first; } if (other != null && other != to.clusterID) { int cid1 = Math.min(other, to.clusterID); int cid2 = Math.max(other, to.clusterID); replacements.add(cid1, cid2); } } } } for (Integer first : replacements.firstKeySet()) { for (Integer second : replacements.secondKeySet(first)) { acronymCache.put(first, second, true); } } }
TwoDimensionalSet<String, String> binaryProductions = TwoDimensionalSet.hashSet(); if (op.simplifiedModel) { binaryProductions.add("", "");
TwoDimensionalSet<String, String> binaryProductions = TwoDimensionalSet.hashSet(); if (op.simplifiedModel) { binaryProductions.add("", "");