-
Notifications
You must be signed in to change notification settings - Fork 453
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OPENNLP-1150: TokenNameFinderTrainerTool should use ModelUtil.createD… #281
base: main
Are you sure you want to change the base?
Conversation
…efaultTrainingParameters() when mlParams is null
@@ -115,7 +114,7 @@ public void run(String format, String[] args) { | |||
|
|||
mlParams = CmdLineUtil.loadTrainingParameters(params.getParams(), true); | |||
if (mlParams == null) { | |||
mlParams = new TrainingParameters(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the public constructor for TrainingParameters
be made private?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably set default somewhere in case they are missing. This change here would set the defaults to the default training parameters.
No, please don’t make the constructor private. opennlp-tools is used as a library also. If you make the TrainingParameters constructor private, you can ONLY create training parameters via a file. Also a defaultTrainingParameters method uses this constructor.
From: Jeff Zemerick <[email protected]>
Reply-To: apache/opennlp <[email protected]>
Date: Monday, October 23, 2017 at 7:32 AM
To: apache/opennlp <[email protected]>
Cc: Subscribed <[email protected]>
Subject: Re: [apache/opennlp] OPENNLP-1150: TokenNameFinderTrainerTool should use ModelUtil.createD… (#281)
@jzonthemtn commented on this pull request.
________________________________
In opennlp-tools/src/main/java/opennlp/tools/cmdline/namefind/TokenNameFinderTrainerTool.java<#281 (comment)>:
@@ -115,7 +114,7 @@ public void run(String format, String[] args) {
mlParams = CmdLineUtil.loadTrainingParameters(params.getParams(), true);
if (mlParams == null) {
- mlParams = new TrainingParameters();
Should the public constructor for TrainingParameters be made private?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<#281 (review)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/ADl9e7QyZInReTI2dTWY6Z-wdMA1jmFuks5svHk0gaJpZM4QCh66>.
|
Thanks, @danielruss. Maybe a javadoc comment on the |
Folks could we merge this into master after fixing the javadocs @kojisekig |
Thanks everyone for reviewing this! As @jzonthemtn commented, when I created this patch, I thought we could add the notice in the javadoc of TrainingParameters constructor so that users can know the existence of ModelUtil.createDefaultTrainingParameters(), but I noticed that the javadoc of ModelUtil.createDefaultTrainingParameters() says
So I didn't touch them. :) Can someone explain the background on this? |
…efaultTrainingParameters() when mlParams is null
Thank you for contributing to Apache OpenNLP.
In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:
For all changes:
Is there a JIRA ticket associated with this PR? Is it referenced
in the commit message?
Does your PR title start with OPENNLP-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.
Has your PR been rebased against the latest commit within the target branch (typically master)?
Is your initial contribution a single, squashed commit?
For code changes:
For documentation related changes:
Note:
Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible.