-
Notifications
You must be signed in to change notification settings - Fork 33
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
TF_NER_POC: Make training configurable #38
base: master
Are you sure you want to change the base?
Conversation
0aaae35
to
cee66cd
Compare
ba878fc
to
40fb6d1
Compare
40fb6d1
to
06c1020
Compare
return allowUNK; | ||
} | ||
|
||
public void setAllowUNK(boolean allowUNK) { |
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.
The setters should be private, if this was not set during training, it might not worker properly, we should anyway always have the UNK token, and not make it optional.
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.
I dont agree. The PredictionConfiguration is not read from the trained model. Therefore you need to able to set the values.
} | ||
|
||
public void setAllowNUM(boolean allowNUM) { | ||
this.allowNUM = allowNUM; |
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.
This should be private, and only change during training time.
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.
I dont agree. see other comment.
return allowUNK; | ||
} | ||
|
||
public void setAllowUNK(boolean allowUNK) { |
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.
I dont agree. The PredictionConfiguration is not read from the trained model. Therefore you need to able to set the values.
06c1020
to
75d2ea1
Compare
private final boolean allowUnk = true; | ||
private boolean lowerCase = false; | ||
private boolean allowUnk = true; | ||
private boolean allowNum = false; | ||
|
||
private final Pattern digitPattern = Pattern.compile("\\d+(,\\d+)*(\\.\\d+)?"); |
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.
This pattern can't be declared final any longer, as this PR introduces a setter for this, see below.
No description provided.