Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Issue with "meet" in CQL

19 views
Skip to first unread message

Pahor de Maiti, Kristina

unread,
Oct 21, 2024, 2:20:30 AM10/21/24
to NoSketch Engine
Dear noSkE team,

I am trying to exclude a list of particular words from the close vicinity of my search word. For this, I would like to use the meet function. It seems, however, that I am using it incorrectly, since the results are not what I'd expect. I did not find exact instructions on SkE page about CQL, but I want to use negation with meet. Since the results are not correct, I am now wandering whether negation cannot be coupled with meet or, probably more likely, I am using wrong syntax.

As can be seen on the image below, where I used filter to check the correctness of the output, the negation in the query is not respected. I know I can do the same just by searching for the first word, and then using the Filter option (in which case the "not containing" option works fine). However, I would find it more convenient, if I could arrive at those results directly with the first query.

Would you be so kind to please advise me how I can properly encode negation when using meet?


I am using (meet [lemma_lc = "ekstr.*"] [lemma_lc != "vrem.*"] -5 5) at https://www.clarin.si/skelog/#concordance?corpname=parlamint41_si&tab=advanced&queryselector=cql&attrs=word%2Clemma_lc&viewmode=sen&attr_allpos=all&refs_up=0&shorten_refs=1&glue=1&gdexcnt=300&show_gdex_scores=0&itemsPerPage=200&structs=s%2Cg&refs=%3Dspeech.speaker_id%2C%3Dspeech.date&default_attr=lemma&cql=(meet%20%5Blemma_lc%20%3D%20%22ekstr.*%22%5D%20%5Blemma_lc%20!%3D%20%22vrem.*%22%5D%20-5%205)&showresults=1&showTBL=0&tbl_template=&gdexconf=&cb=m%5Blemma_lc%3D%22ekstr.*%22%5D%5Blemma_lc!%3D%22vreme.*%22%5D5%205&f_tab=advanced&f_showrelfrq=1&f_showperc=0&f_showreldens=0&f_showreltt=0&c_itemsPerPage=100&c_customrange=1&t_attr=&t_absfrq=0&t_trimempty=1&t_threshold=5&operations=%5B%7B%22name%22%3A%22cql%22%2C%22arg%22%3A%22(meet%20%5Blemma_lc%20%3D%20%5C%22ekstr.*%5C%22%5D%20%5Blemma_lc%20!%3D%20%5C%22vrem.*%5C%22%5D%20-5%205)%22%2C%22query%22%3A%7B%22queryselector%22%3A%22cqlrow%22%2C%22cql%22%3A%22(meet%20%5Blemma_lc%20%3D%20%5C%22ekstr.*%5C%22%5D%20%5Blemma_lc%20!%3D%20%5C%22vrem.*%5C%22%5D%20-5%205)%22%2C%22default_attr%22%3A%22lemma%22%7D%2C%22id%22%3A9750%7D%2C%7B%22name%22%3A%22filter%22%2C%22arg%22%3A%22vrem.*%20(-5..5%2C%2BKWIC)%22%2C%22query%22%3A%7B%22queryselector%22%3A%22lemmarow%22%2C%22pnfilter%22%3A%22p%22%2C%22inclkwic%22%3Atrue%2C%22lpos%22%3A%22%22%2C%22wpos%22%3A%22%22%2C%22qmcase%22%3Afalse%2C%22filfpos%22%3A-5%2C%22filtpos%22%3A5%2C%22lemma%22%3A%22vrem.*%22%2C%22desc%22%3A%22vrem.*%20(-5..5%2C%2BKWIC)%22%7D%2C%22id%22%3A6330%7D%5D

 




Best regards,
Kristina

Ondřej Herman

unread,
Oct 21, 2024, 6:29:54 AM10/21/24
to Pahor de Maiti, Kristina, NoSketch Engine
Dear Kristina,

Your meet query retrieves all positions matching "ekstr.*" which are located within 5 positions from any token which does not match "vrem.*", so this will indeed not remove any hits on a real-word corpus.

Using the filter feature is likely the best way to do what you need to do -- at this point it is not possible to express most filtering operations using pure CQL.
The closest equivalent would be a query such as [lemma_lc!="vrem.*"]{,5}[lemma_lc="ekstr.*"]["lemma_lc"!="vrem.*"]{,5} - you have to request that all the tokens within the context do not match. The drawback is that the query result spans the non-matching left and right context in addition to the target word.

Best regards,

Ondrej

--
You received this message because you are subscribed to the Google Groups "NoSketch Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to noske+un...@sketchengine.co.uk.
To view this discussion on the web visit https://groups.google.com/a/sketchengine.co.uk/d/msgid/noske/AS1PR10MB5365B3B18B43ADE69468CD2F9B402%40AS1PR10MB5365.EURPRD10.PROD.OUTLOOK.COM.

Pahor de Maiti, Kristina

unread,
Oct 21, 2024, 6:47:35 AM10/21/24
to Ondřej Herman, NoSketch Engine
Dear Ondrej!

Thank you very much, it's clear now.

Best regards,
Kristina

Od: Ondřej Herman <ondrej...@sketchengine.eu>
Poslano: ponedeljek, 21. oktober 2024 12:29
Za: Pahor de Maiti, Kristina <Kristina.P...@ff.uni-lj.si>
Kp: NoSketch Engine <no...@sketchengine.co.uk>
Zadeva: Re: Issue with "meet" in CQL
 
Reply all
Reply to author
Forward
0 new messages