Question concerning PyTerrier's query language syntax
MaximeLeclerc opened this issue · comments
Hi,
I'm working on a IR research project and I have a few questions about PyTerrier's query language. One specific goal I'd like to achieve would be to search for documents that match a term that starts with a series of letters. I saw that there is some documentation here: http://terrier.org/docs/v5.1/querylanguage.html
Let's say I want to match the following terms inside documents: "conform conformity conformed description descriptive"
. In that case, should my topic/query data frame contain the following?
"#prefix(conform) #prefix(descript)"
Thanks a lot and have a great day, Maxime
Hi @MaximeLeclerc.
Yes, the advanced "matchop" query language of Terrier that you link to is available from PyTerrier. Terrier's BatchRetrieve detects matchop constructs and switches to that queryparser automatically.
I have made a short notebook with examples:
https://colab.research.google.com/drive/1bEADUGryXk2Z50703JsbQnlKp6svoML4?usp=sharing
Hope this helps
NB: If you were to try other PyTerrier-accessible retrieval backends, such as PyT_ColBERT, Pyt_PISA, this query language would not apply.
Craig
Hi Craig,
Super, thanks a lot for your reply and for the notebook with examples!
Have a great day, Maxime