com.wcohen.ss.expt
Class Blocker

java.lang.Object
  extended by com.wcohen.ss.expt.Blocker
Direct Known Subclasses:
NullBlocker, TokenBlocker

public abstract class Blocker
extends java.lang.Object

Produces candidate pairs from a MatchData structure, and provides access to those candidate pairs.


Nested Class Summary
static class Blocker.Pair
          Holds a pair of instances, with mutable distance between them.
 
Field Summary
protected  boolean clusterMode
           
 
Constructor Summary
Blocker()
           
 
Method Summary
abstract  void block(MatchData data)
          Load matchdata and prepare it for production of candidate pairs.
protected  int countCorrectPairs(MatchData data)
          Compute number of correct pairs betwn src1 and src2, where src2>src1
abstract  Blocker.Pair getPair(int i)
          Get the i-th candidate pair, as produced from most recently block()-ed data
abstract  int numCorrectPairs()
          Return total number of correct pairs in the dataset.
 void setClusterMode(boolean flag)
          In clusterMode, consider pairings between instances from the same source.
 void setClusterMode(java.lang.Boolean flag)
           
abstract  int size()
          Return number of candidate pairs, as produced from most recently block()-ed data
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

clusterMode

protected boolean clusterMode
Constructor Detail

Blocker

public Blocker()
Method Detail

block

public abstract void block(MatchData data)
Load matchdata and prepare it for production of candidate pairs.


getPair

public abstract Blocker.Pair getPair(int i)
Get the i-th candidate pair, as produced from most recently block()-ed data


size

public abstract int size()
Return number of candidate pairs, as produced from most recently block()-ed data


setClusterMode

public final void setClusterMode(boolean flag)
In clusterMode, consider pairings between instances from the same source. If clusterMode is false, only consider pairing between instances from different sources.


setClusterMode

public final void setClusterMode(java.lang.Boolean flag)

numCorrectPairs

public abstract int numCorrectPairs()
Return total number of correct pairs in the dataset.


countCorrectPairs

protected int countCorrectPairs(MatchData data)
Compute number of correct pairs betwn src1 and src2, where src2>src1