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

RegexMatcher modifications to accept the a list of rules as Param #4

Merged
merged 3 commits into from
Oct 3, 2017

Conversation

showy
Copy link
Contributor

@showy showy commented Sep 27, 2017

  • RegexMatcher now accepts rulesList and rulesFile params

 - RegexMatcher now accepts rulesList and rulesFile params
@showy showy requested a review from saif-ellafi September 27, 2017 12:50
Copy link
Contributor

@saif-ellafi saif-ellafi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Logic looks good! please improve things on the resolveRules and few naming items:

  1. resolveRules():
    If the user provides empty string, let it fail, I would
    a. remove the empty checkings
    b. use get(rulesFile), this returns an Option and will be defined if user provided a value, if not defined, call getDefault(rulesFile) which will return the default value. This is all Params API. I do this in other annotators:
    get(param).orElse(getDefault(param)).getOrElse(...) and this can replace the function.

  2. rulesFile -> rulesPath would be more consistent with what other annotators call the path file related params.

@saif-ellafi saif-ellafi merged commit 13dcdcc into master Oct 3, 2017
@showy showy deleted the regex_matcher_fix branch November 3, 2017 05:21
saif-ellafi added a commit that referenced this pull request Jul 13, 2019
saif-ellafi added a commit that referenced this pull request Aug 22, 2019
saif-ellafi added a commit that referenced this pull request Aug 23, 2019
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.

2 participants