Skip to content
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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

thygesen
Copy link
Contributor

@thygesen thygesen commented Aug 7, 2019

No description provided.

@thygesen thygesen requested a review from kottmann August 7, 2019 21:18
@thygesen thygesen force-pushed the cmd_args_config branch 2 times, most recently from 0aaae35 to cee66cd Compare August 7, 2019 23:09
@thygesen thygesen force-pushed the cmd_args_config branch 4 times, most recently from ba878fc to 40fb6d1 Compare August 8, 2019 12:14
@thygesen thygesen requested a review from kottmann August 8, 2019 20:04
tf-ner-poc/pom.xml Outdated Show resolved Hide resolved
return allowUNK;
}

public void setAllowUNK(boolean allowUNK) {

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.

Copy link
Contributor Author

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;

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.

Copy link
Contributor Author

@thygesen thygesen left a 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) {
Copy link
Contributor Author

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.

@mawiesne mawiesne requested a review from rzo1 July 23, 2024 06:57
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+)?");
Copy link
Contributor

@mawiesne mawiesne Jul 23, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants