hu.birot.OTKit.learning
Class OnlineLearning

java.lang.Object
  extended by hu.birot.OTKit.learning.Learning
      extended by hu.birot.OTKit.learning.OnlineLearning

public abstract class OnlineLearning
extends Learning

An online learning algorithm.

Its abstract method learn(Grammar G, Production P, Candidate cand) has to specify how grammar G is updated, whenever the learner receives the piece of learning data cand. As most online learning processes are error driven, the learner most also possess a production algorithm P and use it to produce a "loser candidate" (to be compared to cand). Note that grammar G is used both as the input and the "output", as G is altered by the method.

See class OnlineLearningExamples for concrete implementations.

See Also:
OnlineLearningExamples

Constructor Summary
OnlineLearning()
           
 
Method Summary
 boolean learn(Grammar G, Form F, Candidate cand)
          One step of online learning, updating grammar G based on learning data cand.
abstract  boolean learn(Grammar G, Production P, Candidate cand)
          One step of online learning, updating grammar G based on learning data cand.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OnlineLearning

public OnlineLearning()
Method Detail

learn

public abstract boolean learn(Grammar G,
                              Production P,
                              Candidate cand)
One step of online learning, updating grammar G based on learning data cand. Production P is used to produce a "loser candidate" from G.

Parameters:
G - Grammar to be updated.
P - Production approach used to produce a "loser candidate".
cand - Candidate corresponding to a piece of learning data.
Returns:
true if G is changed; false if no learning takes place.

learn

public boolean learn(Grammar G,
                     Form F,
                     Candidate cand)
One step of online learning, updating grammar G based on learning data cand. Form F is used as the surface form of the "loser candidate". Same as learn(Grammar G, Production P, Candidate cand), but ProductionExamples.constant(F) is used.

Parameters:
G - Grammar to be updated.
F - Form to be used as the surface form of the "loser candidate".
cand - Candidate corresponding to a piece of learning data.
Returns:
true if G is changed; false if no learning takes place.