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

Precedence optimization fails when applied to spans which cover more than one token #221

Closed
thomaskrause opened this issue Sep 29, 2013 · 1 comment
Assignees
Labels
Milestone

Comments

@thomaskrause
Copy link
Member

Take e.g. this query on pcc2

NP & NP & NP &  #1 . #2 & #2 . #3

In ANNIS 2 this gave us 2 results, but ANNIS 3 incorrectly applies the precedence optimization and the query gets translated to

NP & NP & NP &  #1 . #2 & #2 . #3 & #1 . #3

which results in only 1 match. The correct optimization would be

NP & NP & NP &  #1 . #2 & #2 . #3 & #1 .* #3
@ghost ghost assigned thomaskrause Sep 29, 2013
thomaskrause added a commit to thomaskrause/ANNIS that referenced this issue Sep 29, 2013
Precedence optimization fails when applied to spans which cover more than one token

Take e.g. this query on pcc2
NP & NP & NP &  #1 . #2 & #2 . #3

In ANNIS 2 this gave us 2 results, but since ANNIS 3 incorrectly applies the precedence optimization the query gets translated to

NP & NP & NP &  #1 . #2 & #2 . #3 & #1 . #3

and has only 1 match. The correct optimization would be

NP & NP & NP &  #1 . #2 & #2 . #3 & #1 .* #3

This commit adds proper test cases for this situation and gives a fix
@pixeldrama
Copy link
Contributor

The correct optimization also provides only one match in ANNIS 3.0.0:

one-match

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

No branches or pull requests

2 participants