hu.birot.OTKit.learning
Class ConstraintMotion

java.lang.Object
  extended by hu.birot.OTKit.learning.ConstraintMotion

public abstract class ConstraintMotion
extends java.lang.Object

An approach to rearrange the constraints in a hierarchy, once a winner–loser pair is given to the learning algorithm. Concrete instances of ConstrainMotion must define the boolean method update(Hierarchy H, Candidate w, Candidate l).


Constructor Summary
ConstraintMotion()
           
 
Method Summary
 boolean update(Grammar G, Candidate w, Candidate l)
          A pair of winner–loser candidates update the hierarchy of the Grammar, based on the assumption that w must be better than l.
abstract  boolean update(Hierarchy H, Candidate w, Candidate l)
          A pair of winner–loser candidates update the hierarchy, based on the assumption that w must be better than l.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConstraintMotion

public ConstraintMotion()
Method Detail

update

public abstract boolean update(Hierarchy H,
                               Candidate w,
                               Candidate l)

A pair of winner–loser candidates update the hierarchy, based on the assumption that w must be better than l.

The winner candidate w is typically provided by the target grammar, so this is the candidate that is meant to be correct. The loser candidate l is typically provided by the grammar of the learner, so it reflects it reflects the learner's grammar. The difference between w and l typically reflects the discrepancy between the target grammar and the learner's grammar. Consequently, the learning algorithm will update the learner's hierarchy H.

Parameters:
H - Hierarchy to be updated.
w - Winner candidate.
l - Loser candidate
Returns:
True if hierarchy has been updated; false if hierarchy has been left unchanged.

update

public boolean update(Grammar G,
                      Candidate w,
                      Candidate l)

A pair of winner–loser candidates update the hierarchy of the Grammar, based on the assumption that w must be better than l.

The winner candidate w is typically provided by the target grammar, so this is the candidate that is meant to be correct. The loser candidate l is typically provided by the grammar of the learner, so it reflects it reflects the learner's grammar. The difference between w and l typically reflects the discrepancy between the target grammar and the learner's grammar. Consequently, the learning algorithm will update the learner's hierarchy H.

Parameters:
G - Grammar whose hierarchy has to be updated.
w - Winner candidate.
l - Loser candidate
Returns:
True if grammar has been updated; false if grammar has been left unchanged.