Fixed Issue 17: Conflated triples - all rows are producing triple with "s" :" $Name_0".
Also exposed "id" field for recon objects. git-svn-id: http://google-refine.googlecode.com/svn/trunk@720 7d457c2a-affb-35e4-300a-418c747d4874
This commit is contained in:
parent
992cb964eb
commit
8412aa72dd
@ -141,7 +141,9 @@ public class Recon implements HasFields, Jsonizable {
|
||||
}
|
||||
|
||||
public Object getField(String name, Properties bindings) {
|
||||
if ("best".equals(name)) {
|
||||
if ("id".equals(name)) {
|
||||
return id;
|
||||
} else if ("best".equals(name)) {
|
||||
return candidates != null && candidates.size() > 0 ? candidates.get(0) : null;
|
||||
} else if ("candidates".equals(name)) {
|
||||
return candidates;
|
||||
|
@ -75,7 +75,6 @@ public class ReconMarkNewTopicsOperation extends EngineDependentMassCellOperatio
|
||||
int cellIndex;
|
||||
List<CellChange> cellChanges;
|
||||
Map<String, Recon> sharedRecons = new HashMap<String, Recon>();
|
||||
Map<Long, Recon> dupReconMap = new HashMap<Long, Recon>();
|
||||
long historyEntryID;
|
||||
|
||||
public RowVisitor init(int cellIndex, List<CellChange> cellChanges, long historyEntryID) {
|
||||
@ -103,20 +102,12 @@ public class ReconMarkNewTopicsOperation extends EngineDependentMassCellOperatio
|
||||
sharedRecons.put(s, recon);
|
||||
}
|
||||
} else {
|
||||
long reconID = cell.recon == null ? 0 : cell.recon.id;
|
||||
if (dupReconMap.containsKey(reconID)) {
|
||||
recon = dupReconMap.get(reconID);
|
||||
recon.judgmentBatchSize++;
|
||||
} else {
|
||||
recon = cell.recon == null ? new Recon(historyEntryID) : cell.recon.dup(historyEntryID);
|
||||
recon.match = null;
|
||||
recon.matchRank = -1;
|
||||
recon.judgment = Judgment.New;
|
||||
recon.judgmentBatchSize = 1;
|
||||
recon.judgmentAction = "mass";
|
||||
|
||||
dupReconMap.put(reconID, recon);
|
||||
}
|
||||
recon = cell.recon == null ? new Recon(historyEntryID) : cell.recon.dup(historyEntryID);
|
||||
recon.match = null;
|
||||
recon.matchRank = -1;
|
||||
recon.judgment = Judgment.New;
|
||||
recon.judgmentBatchSize = 1;
|
||||
recon.judgmentAction = "mass";
|
||||
}
|
||||
|
||||
Cell newCell = new Cell(cell.value, recon);
|
||||
|
Loading…
Reference in New Issue
Block a user