Package opennlp.tools.monitoring
Class DefaultTrainingProgressMonitor
java.lang.Object
opennlp.tools.monitoring.DefaultTrainingProgressMonitor
- All Implemented Interfaces:
- TrainingProgressMonitor
The default implementation of 
TrainingProgressMonitor.
 This publishes model training progress to the chosen logging destination.- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoiddisplay(boolean clear) Displays the training progress and optionally clears the recorded progress (to save memory).voidfinishedIteration(int iteration, int numberCorrectEvents, int totalEvents, TrainingMeasure measure, double measureValue) Captures the Iteration progress.voidfinishedTraining(int iterations, StopCriteria<?> stopCriteria) Captures the training completion progress.booleanChecks whether the training has finished.
- 
Constructor Details- 
DefaultTrainingProgressMonitorpublic DefaultTrainingProgressMonitor()
 
- 
- 
Method Details- 
finishedIterationpublic void finishedIteration(int iteration, int numberCorrectEvents, int totalEvents, TrainingMeasure measure, double measureValue) Captures the Iteration progress.- Specified by:
- finishedIterationin interface- TrainingProgressMonitor
- Parameters:
- iteration- The completed iteration number.
- numberCorrectEvents- Number of correctly predicted events in this iteration.
- totalEvents- Total count of events processed in this iteration.
- measure-- TrainingMeasure.
- measureValue- measure value corresponding to the applicable- TrainingMeasure.
 
- 
finishedTrainingCaptures the training completion progress.- Specified by:
- finishedTrainingin interface- TrainingProgressMonitor
- Parameters:
- iterations- Total number of iterations configured for the training.
- stopCriteria-- StopCriteriafor the training.
 
- 
displaypublic void display(boolean clear) Displays the training progress and optionally clears the recorded progress (to save memory). Callers of this method can invoke it periodically during training, to avoid holding too much progress related data in memory.- Specified by:
- displayin interface- TrainingProgressMonitor
- Parameters:
- clear- Set to true to clear the recorded progress.
 
- 
isTrainingFinishedpublic boolean isTrainingFinished()Checks whether the training has finished.- Specified by:
- isTrainingFinishedin interface- TrainingProgressMonitor
- Returns:
- trueif the training has finished,- falseif the training is not yet completed.
 
 
-