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

longest_match_only default value in Matcher subclasses #161

Closed
j-rausch opened this issue Sep 22, 2018 · 0 comments
Closed

longest_match_only default value in Matcher subclasses #161

j-rausch opened this issue Sep 22, 2018 · 0 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@j-rausch
Copy link
Contributor

Describe the bug
When using a simple LambdaFunctionMatcher, I would expect the matcher to return all mentions for which the corresponding function returns True.
However, LambdaFunctionMatcher as a subclass of _NgramMatcher/_Matcher, it has the longest_match_only=True attribute.
This can lead to cases where a sub-span, for witch the lambda function returns True, will not be added as a mention, if its parent span was already matched as True by the matcher.

Expected behavior
Add all spans to the returned mentions, if the lambda function returns True. This could be accomplished by setting longest_match_only to False by default.

@lukehsiao lukehsiao added the help wanted Extra attention is required label Sep 22, 2018
@lukehsiao lukehsiao self-assigned this Sep 26, 2018
@lukehsiao lukehsiao added bug Something isn't working and removed help wanted Extra attention is required labels Sep 26, 2018
@lukehsiao lukehsiao added this to the v0.3.3 milestone Sep 26, 2018
@lukehsiao lukehsiao assigned j-rausch and unassigned j-rausch Sep 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants