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

fix: ignore_case in pattern_matching_skill #477

Merged
merged 3 commits into from
Sep 25, 2018

Conversation

vikmary
Copy link
Contributor

@vikmary vikmary commented Sep 25, 2018

PatternMatchingSkill didn't work correctly with ignore_case=True when patterns contained non lower-cased words.

self.regex = regex
self.ignore_case = ignore_case
if self.ignore_case and (patterns is not None):
patterns = [pattern.lower() for pattern in patterns]
Copy link
Contributor

Choose a reason for hiding this comment

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

this can mess up uppercase metacharacters in regular expressions

@seliverstov seliverstov merged commit fc53755 into dev Sep 25, 2018
@yoptar yoptar deleted the fix/pattern-matching-skill branch September 26, 2018 07:53
surkovv pushed a commit to surkovv/DeepPavlov that referenced this pull request Aug 24, 2022
* fix: ignore_case in pattern_matching_skill

* fix: do not lowercase None pattern

* fix: lowecase only nonregex patterns
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.

3 participants