com.wcohen.ss.api
Class StringDistanceTeacher

java.lang.Object
  extended by com.wcohen.ss.api.StringDistanceTeacher
Direct Known Subclasses:
BasicTeacher, MatchDataTeacher

public abstract class StringDistanceTeacher
extends java.lang.Object

Train a StringDistanceLearner and return the learned StringDistance, using some unspecified source of information to train the learner.


Constructor Summary
StringDistanceTeacher()
           
 
Method Summary
protected abstract  DistanceInstanceIterator distanceExamplePool()
          A pool of unlabeled pairs of strings over which distances will be computed, to be used for supervised learning.
protected abstract  DistanceInstanceIterator distanceInstancePool()
          A pool of unlabeled pairs of strings over which distances will be computed, to be used for active or semi-supervised learning.
protected abstract  boolean hasAnswers()
          Return true if this teacher can answer more queries.
protected abstract  DistanceInstance labelInstance(DistanceInstance distanceInstance)
          Label an instance queried by the learner.
protected abstract  StringWrapperIterator stringWrapperIterator()
          Strings over which distances will be computed.
 StringDistance train(StringDistanceLearner learner)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringDistanceTeacher

public StringDistanceTeacher()
Method Detail

train

public final StringDistance train(StringDistanceLearner learner)

stringWrapperIterator

protected abstract StringWrapperIterator stringWrapperIterator()
Strings over which distances will be computed.


distanceInstancePool

protected abstract DistanceInstanceIterator distanceInstancePool()
A pool of unlabeled pairs of strings over which distances will be computed, to be used for active or semi-supervised learning.


distanceExamplePool

protected abstract DistanceInstanceIterator distanceExamplePool()
A pool of unlabeled pairs of strings over which distances will be computed, to be used for supervised learning.


labelInstance

protected abstract DistanceInstance labelInstance(DistanceInstance distanceInstance)
Label an instance queried by the learner. Return null if the query can't be answered.


hasAnswers

protected abstract boolean hasAnswers()
Return true if this teacher can answer more queries.