NishantShri4 commented on code in PR #758: URL: https://github.com/apache/opennlp/pull/758#discussion_r2056021530
########## opennlp-tools/src/main/java/opennlp/tools/ml/perceptron/PerceptronTrainer.java: ########## @@ -432,4 +450,25 @@ private static boolean isPerfectSquare(int n) { return root * root == n; } + /** + * Get the {@link StopCriteria} associated with this Trainer. + * @param trainingConfig - If {@link TrainingConfiguration} is null or + * {@link TrainingConfiguration#stopCriteria()} is null then return a default {@link StopCriteria}. + */ + private StopCriteria getStopCriteria(TrainingConfiguration trainingConfig) { + return trainingConfig != null && trainingConfig.stopCriteria() != null + ? trainingConfig.stopCriteria() : new IterDeltaAccuracyUnderTolerance(trainingParameters); + } + + /** + * Get the {@link TrainingProgressMonitor} associated with this Trainer. + * @param trainingConfig - If {@link TrainingConfiguration} is null or + * {@link TrainingConfiguration#progMon()}is null then + * return the default {@link TrainingProgressMonitor}. + */ Review Comment: Thanks. Done. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@opennlp.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org