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

Constrain CQP subqueries to span match #334

Merged
merged 2 commits into from
Jan 31, 2024
Merged

Constrain CQP subqueries to span match #334

merged 2 commits into from
Jan 31, 2024

Conversation

arildm
Copy link
Member

@arildm arildm commented Jan 25, 2024

As described in #289, the subquery cqp2 sometimes yields more matches within a match of the parent query cqp.

Aside from the "vara säker att" example by @janiemi, we've seen this in the NPEGL corpus (restricted access). Clicking the CC.Fi category opens a KWIC with 4 matches, where there should be only 2. Unlike #289, this is not because we are reducing by a structural attribute, but because NPEGL has mode-specific code that merges some rows.

The suggestion in this pull request is to wrap the subquery in <match> [...] []* </match>. This ensures that each match corresponds to one parent match.

@arildm arildm merged commit c531656 into dev Jan 31, 2024
3 checks passed
@arildm arildm deleted the cqp-subquery branch January 31, 2024 13:42
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.

None yet

1 participant