-
Notifications
You must be signed in to change notification settings - Fork 6
Description
Hi,
I'm currently using the korp-backend without the frontend for parallel corpora, and I struggle with parallel queries on multiple corpora.
The syntax described in the manual for CQP queries doesn't work if you have multiple corpora. The following works fine with one corpus, but that's all. If you add another corpus, it is unclear which corpus is aligned with which one and the cqp parser struggles:
[lemma="kala"] :OTHER-EN [lemma="fish"]
However, playing with queries sent by the korp frontend, it seems that the API was in fact scaled for multiple parallel corpora. This queries two parallel corpora at once for instance.
I found nothing about this (nice) feature in the API doc, and the syntax is not completely self-explanatory. Is this an undocumented Korp feature, or a CQP feature which I missed? At least the code below seems to indicate how it works. Still, it would be nice to have a clear description of this somewhere!
korp-backend/korp/views/query.py
Lines 385 to 389 in fef7f75
| # Handle aligned corpora | |
| if "|" in corpus: | |
| linked = corpus.split("|") | |
| cqpnew = [] | |