NishantShri4 commented on code in PR #758: URL: https://github.com/apache/opennlp/pull/758#discussion_r2056014469
########## opennlp-tools/src/main/java/opennlp/tools/ml/maxent/GISTrainer.java: ########## @@ -709,4 +727,25 @@ synchronized double getLoglikelihood() { return loglikelihood; } } + + /** + * 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 LogLikelihoodThresholdBreached(trainingParameters); + } + + /** + * Get the {@link TrainingProgressMonitor} associated with this Trainer. + * @param trainingConfig If {@link TrainingConfiguration} is null or + * {@link TrainingConfiguration#progMon()} is null then return a 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