From graham.ranger at univ-avignon.fr Tue Apr 7 08:22:10 2026
From: graham.ranger at univ-avignon.fr (Graham Ranger -- UAPV)
Date: Tue, 7 Apr 2026 08:22:10 +0200
Subject: [CWB] cqpweb question
Message-ID: <1d77a39f-8037-4a71-ad2c-5f3276ff07b2@univ-avignon.fr>
Hello to all,
This question concerns the cqp syntax available on the cqpweb interface.
I'm trying to look for constructions including cognate objects. This:
n1:[hw="laugh" & pos="VV."] []{1,3} n2:[hw="laugh" & pos="NN."]::n1.hw=n2.hw
will work to give me things like "He laughed a mirthless laugh", which
is good.
What I'd really like, though, is to be able to define a variable for the
first hw which coincides with the variable for the second hw, in order
to get things like "Lucy smiled a small tight-fisted smile", "Jamie
grins his tired grin", etc. I've tried with [] and n1 n2::n1=n2, and
with regular expressions, working on word and? pos as well as hw and
trying to match partial strings, but either I'm missing something or
cqpweb does not allow this sort of query.
Any help would as always be very much appreciated!
Best wishes,
Graham.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From stefanML at collocations.de Wed Apr 8 09:00:16 2026
From: stefanML at collocations.de (Stephanie Evert)
Date: Wed, 8 Apr 2026 09:00:16 +0200
Subject: [CWB] cqpweb question
In-Reply-To: <1d77a39f-8037-4a71-ad2c-5f3276ff07b2@univ-avignon.fr>
References: <1d77a39f-8037-4a71-ad2c-5f3276ff07b2@univ-avignon.fr>
Message-ID: <8AE9F242-0141-4B7F-B7F9-D1C203FB999F@collocations.de>
Hi Graham,
your query is already almost what you want, you just have to drop the restriction to the single lemma "laugh".
n1:[pos="VV."] []{1,3} n2:[pos="NN."] :: n1.hw=n2.hw
Mind you, this will be slow as it has to check every possible verb-noun combination and test whether the two lemmas happen to be identical.
Labels like n1 and n2 can only be attached to token descriptions and reference a corpus position, so you can't just store the value of n1.hw and use it for the comparison later. But in most cases, this is not a major limitation.
Alternative version of the query:
n1:[pos="VV."] []{1,3} [hw=n1.hw & pos="NN."]
I prefer your version with the global constraint, though, because I find it easier to read.
Best,
Stephanie
> On 7 Apr 2026, at 08:22, Graham Ranger -- UAPV via CWB wrote:
>
> Hello to all,
> This question concerns the cqp syntax available on the cqpweb interface.
> I'm trying to look for constructions including cognate objects. This:
>
> n1:[hw="laugh" & pos="VV."] []{1,3} n2:[hw="laugh" & pos="NN."]::n1.hw=n2.hw
>
> will work to give me things like "He laughed a mirthless laugh", which is good.
> What I'd really like, though, is to be able to define a variable for the first hw which coincides with the variable for the second hw, in order to get things like "Lucy smiled a small tight-fisted smile", "Jamie grins his tired grin", etc. I've tried with [] and n1 n2::n1=n2, and with regular expressions, working on word and pos as well as hw and trying to match partial strings, but either I'm missing something or cqpweb does not allow this sort of query.
> Any help would as always be very much appreciated!
> Best wishes,
> Graham.
> _______________________________________________
> CWB mailing list
> CWB at sslmit.unibo.it
> http://liste.sslmit.unibo.it/mailman/listinfo/cwb
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From graham.ranger at univ-avignon.fr Wed Apr 8 10:26:32 2026
From: graham.ranger at univ-avignon.fr (Graham Ranger)
Date: Wed, 8 Apr 2026 10:26:32 +0200
Subject: [CWB] cqpweb question
In-Reply-To: <8AE9F242-0141-4B7F-B7F9-D1C203FB999F@collocations.de>
References: <1d77a39f-8037-4a71-ad2c-5f3276ff07b2@univ-avignon.fr>
<8AE9F242-0141-4B7F-B7F9-D1C203FB999F@collocations.de>
Message-ID:
Brilliant! What a great tool! Thank you, Stephanie. I didn't realise
that the constraint could be formulated with hw and the query with pos,
for instance.
Best wishes,
Graham.
Le 08/04/2026 ? 09:00, Stephanie Evert a ?crit?:
>
> ? Ce courrier est envoy? par un correspondant externe
>
> Hi Graham,
>
> your query is already almost what you want, you just have to drop the
> restriction to the single lemma "laugh".
>
> n1:[pos="VV."] []{1,3} n2:[pos="NN."] :: n1.hw=n2.hw
>
> Mind you, this will be slow as it has to check every possible
> verb-noun combination and test whether the two lemmas happen to be
> identical.
>
> Labels like n1 and n2 can only be attached to token descriptions and
> reference a corpus position, so you can't just store the value of
> n1.hw and use it for the comparison later. But in most cases, this is
> not a major limitation.
>
> Alternative version of the query:
>
> n1:[pos="VV."] []{1,3} [hw=n1.hw & pos="NN."]
>
> I prefer your version with the global constraint, though, because I
> find it easier to read.
>
> Best,
> Stephanie
>
>> On 7 Apr 2026, at 08:22, Graham Ranger -- UAPV via CWB
>> wrote:
>>
>> Hello to all,
>> This question concerns the cqp syntax available on the cqpweb interface.
>> I'm trying to look for constructions including cognate objects. This:
>>
>> n1:[hw="laugh" & pos="VV."] []{1,3} n2:[hw="laugh" &
>> pos="NN."]::n1.hw=n2.hw
>>
>> will work to give me things like "He laughed a mirthless laugh",
>> which is good.
>> What I'd really like, though, is to be able to define a variable for
>> the first hw which coincides with the variable for the second hw, in
>> order to get things like "Lucy smiled a small tight-fisted smile",
>> "Jamie grins his tired grin", etc. I've tried with [] and n1
>> n2::n1=n2, and with regular expressions, working on word and? pos as
>> well as hw and trying to match partial strings, but either I'm
>> missing something or cqpweb does not allow this sort of query.
>> Any help would as always be very much appreciated!
>> Best wishes,
>> Graham.
>> _______________________________________________
>> CWB mailing list
>> CWB at sslmit.unibo.it
>> http://liste.sslmit.unibo.it/mailman/listinfo/cwb
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From josepm.fontana at upf.edu Wed Apr 29 18:09:44 2026
From: josepm.fontana at upf.edu (Josep M. Fontana)
Date: Wed, 29 Apr 2026 18:09:44 +0200
Subject: [CWB] Strange behaviour of cqpWeb?
Message-ID: <92cd7327-f56a-4227-84ef-6e74a7c45569@upf.edu>
Hi there. Perhaps you can help me understand why this happens. Depending
on the query (the specific queries can be seen in the screenshots) I get
a normal concordance or a column of numbers like the ones in the
screenshot. Why should this happen. In principle both queries should be
syntactically correct. Otherwise I would get an error message. Instead
of an error message, I get this kind of result with a column of numbers.
Josep M.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SCR-20260429-ptat.png
Type: image/png
Size: 164024 bytes
Desc: not available
URL:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SCR-20260429-psws.png
Type: image/png
Size: 87403 bytes
Desc: not available
URL:
From a.hardie at lancaster.ac.uk Wed Apr 29 19:31:50 2026
From: a.hardie at lancaster.ac.uk (Hardie, Andrew)
Date: Wed, 29 Apr 2026 17:31:50 +0000
Subject: [CWB] Strange behaviour of cqpWeb?
In-Reply-To: <92cd7327-f56a-4227-84ef-6e74a7c45569@upf.edu>
References: <92cd7327-f56a-4227-84ef-6e74a7c45569@upf.edu>
Message-ID:
Hi Josep,
Apropos of nothing, that's a very nice CSS layout you have there.
ANYWAY: nothing is wrong. In the second screenshot, one of the query results (number 6) has a lefthand context that is very wide (because a ton of tokens are coming out as [UNREADABLE]). That makes that column of the display so wide that all the other columns are out of sight rightwards. Since the lefthand context is right-aligned, even that is invisible. So fi you scroll rightwards, it will all become visible.
Browsers generally try to hide their scrollbars these days, but hopefully you should be able to make the horizontal scrollbar reveal itself so you can scroll rightwards and check that the above is correct.
The *real* question is why certain tokens are coming out as [UNREADABLE]. This ought in theory never to happen. It *used* to happen when the form of a token confused the regular expressions used to extract words/tags from the CQP concordance. But that system was changed years ago so it should not be possible for the system to get confused any longer. If you can let me know what the underlying data from your vertical file is at that point in the corpus, I may be able to let you know what the issue is.
best
Andrew.
-----Original Message-----
From: CWB On Behalf Of Josep M. Fontana via CWB
Sent: 29 April 2026 17:10
To: CWBdev Mailing List
Cc: Josep M. Fontana
Subject: [CWB] Strange behaviour of cqpWeb?
Hi there. Perhaps you can help me understand why this happens. Depending
on the query (the specific queries can be seen in the screenshots) I get
a normal concordance or a column of numbers like the ones in the
screenshot. Why should this happen. In principle both queries should be
syntactically correct. Otherwise I would get an error message. Instead
of an error message, I get this kind of result with a column of numbers.
Josep M.
From stefanML at collocations.de Thu Apr 30 08:24:36 2026
From: stefanML at collocations.de (Stephanie Evert)
Date: Thu, 30 Apr 2026 08:24:36 +0200
Subject: [CWB] Strange behaviour of cqpWeb?
In-Reply-To:
References: <92cd7327-f56a-4227-84ef-6e74a7c45569@upf.edu>
Message-ID: <93DDFEAF-EC9D-47F2-B1EF-2C00F8BC4B79@collocations.de>
> On 29 Apr 2026, at 19:31, Hardie, Andrew via CWB wrote:
>
> ANYWAY: nothing is wrong. In the second screenshot, one of the query results (number 6) has a lefthand context that is very wide (because a ton of tokens are coming out as [UNREADABLE]). That makes that column of the display so wide that all the other columns are out of sight rightwards. Since the lefthand context is right-aligned, even that is invisible. So fi you scroll rightwards, it will all become visible.
And it helps to have a CSS layout that hides overflow text rather than extending the column beyond screen width, which gives a display that's much closer to the kwic format we're used to.
Not sure whether you still have to patch the PHP code to make it work, but I can send you the CSS that I use (the right trick was discovered by Laurence for AntConc).
Best,
Stephanie
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From josepm.fontana at upf.edu Thu Apr 30 12:00:31 2026
From: josepm.fontana at upf.edu (Josep M. Fontana)
Date: Thu, 30 Apr 2026 12:00:31 +0200
Subject: [CWB] Strange behaviour of cqpWeb?
In-Reply-To: <93DDFEAF-EC9D-47F2-B1EF-2C00F8BC4B79@collocations.de>
References: <92cd7327-f56a-4227-84ef-6e74a7c45569@upf.edu>
<93DDFEAF-EC9D-47F2-B1EF-2C00F8BC4B79@collocations.de>
Message-ID: <485e844e-27f9-409e-981b-4297fbf9cfcb@upf.edu>
Thanks Andrew and Stephanie for your prompt response!
Yes, Stephanie. Please do send me the CSS you mention. I will appreciate
it. It will be really helpful.
Now I am embarrassed. I spent close to an hour puzzling over this and
fiddling here and there with different settings to try to solve a
problem I didn't understand. If I had just looked at the horizontal
scroll bar. Now it looks so obvious.
One of our users had asked me to vastly increase the context because she
needed to see a lot of context for the work she is doing but for some
reason she cannot get the text of the paragraph by clicking on the link
of the concordance. This works with the browsers I use but she claims
she's tried with various browsers to no avail. Since I was busy, it was
easier for me to just increase the context. The problem is that I had
forgotten I had done it and now it didn't occur to me to go to the
horizontal scroll bar.
Here's the problem:
=============================
...
Transcrivim? ? transcriure? ? VDR1P-? ? VPrin_
el? ? el? ? EA--MS? ? DN>
passatge? ? passatge? ? N5-MS? ? CD
:? ? :? ? F.? ? PT
"Vinguda la nit de las bodas, digu? Eufemiano a son fill Aleix: fill,
entrau al aposento a visitar a vostra esposa. Ho feu aix? com son pare
li man?: salud? a la sua esposa, y li digu?: Deu te salve criatura de
Deu, esposa de Jesu Crist, y li comens? a contar la vida que feren les
Verges, y las altres Santas que son en lo Cel, y que molt bo era lo
Matrimoni per aquell que be usaba de ell; mes que molt millor, y mes
santa cosa era la limpia virginitat, y que de aix? era Deu molt pagat, y
tota la sua Cort celestial. Li digu? altres cosas molt espirituals, que
la gracia de Deu li inspir?. Tamb? li digu?: germana y senyora, habeu
vist que maravellosas y honradas bodas se nos han fet? Per ventura las
habeu vos vistas, ni o?das tals? Ella respongu? que no: Aleix li digu?
aleshores: pues, voleu vos, que aquestas honras, plahers y alegrias que
las tingam vos y jo cada dia pera sempre? Digu? ella: Senyor, si que ho
voldria. Li digu? ell, pues germana y senyora, ab vostra llicencia, si
vos plau anir? de aqui a Jerusalem, y quant de alli vinga, portar? cosa
ab que sempre tingam aquestos plahers y molts mes. A lo que digu? ella
que li plah?a."? ? INDEF? ? W? ? __UNDEF__
Passaren? ? passar? ? VDP3P-? ? VPrin_
...
=============================
It looks like a problem with the tokenization of text that appears
within quotation marks.
JM
>
>
>> On 29 Apr 2026, at 19:31, Hardie, Andrew via CWB
>> wrote:
>>
>> ANYWAY: nothing is wrong. In the second screenshot, one of the query
>> results (number 6) has a lefthand context that is very wide (because
>> a ton of tokens are coming out as [UNREADABLE]). That makes that
>> column of the display so wide that all the other columns are out of
>> sight rightwards. Since the lefthand context is right-aligned, even
>> that is invisible. So fi you scroll rightwards, it will all become
>> visible.
>
> And it helps to have a CSS layout that hides overflow text rather than
> extending the column beyond screen width, which gives a display that's
> much closer to the kwic format we're used to.
>
> Not sure whether you still have to patch the PHP code to make it work,
> but I can send you the CSS that I use (the right trick was discovered
> by Laurence for AntConc).
>
> Best,
> Stephanie
>
> _______________________________________________
> CWB mailing list
> CWB at sslmit.unibo.it
> http://liste.sslmit.unibo.it/mailman/listinfo/cwb
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From a.hardie at lancaster.ac.uk Thu Apr 30 14:55:02 2026
From: a.hardie at lancaster.ac.uk (Hardie, Andrew)
Date: Thu, 30 Apr 2026 12:55:02 +0000
Subject: [CWB] Strange behaviour of cqpWeb?
In-Reply-To: <485e844e-27f9-409e-981b-4297fbf9cfcb@upf.edu>
References: <92cd7327-f56a-4227-84ef-6e74a7c45569@upf.edu>
<93DDFEAF-EC9D-47F2-B1EF-2C00F8BC4B79@collocations.de>
<485e844e-27f9-409e-981b-4297fbf9cfcb@upf.edu>
Message-ID:
Yes, that is very definitely a tagger issue!
I should prob take a look at that CSS as well, Stephanie...
Andrew.
From: CWB On Behalf Of Josep M. Fontana via CWB
Sent: 30 April 2026 11:01
To: cwb at sslmit.unibo.it
Cc: Josep M. Fontana
Subject: Re: [CWB] Strange behaviour of cqpWeb?
Thanks Andrew and Stephanie for your prompt response!
Yes, Stephanie. Please do send me the CSS you mention. I will appreciate it. It will be really helpful.
Now I am embarrassed. I spent close to an hour puzzling over this and fiddling here and there with different settings to try to solve a problem I didn't understand. If I had just looked at the horizontal scroll bar. Now it looks so obvious.
One of our users had asked me to vastly increase the context because she needed to see a lot of context for the work she is doing but for some reason she cannot get the text of the paragraph by clicking on the link of the concordance. This works with the browsers I use but she claims she's tried with various browsers to no avail. Since I was busy, it was easier for me to just increase the context. The problem is that I had forgotten I had done it and now it didn't occur to me to go to the horizontal scroll bar.
Here's the problem:
=============================
...
Transcrivim transcriure VDR1P- VPrin_
el el EA--MS DN>
passatge passatge N5-MS CD
: : F. PT
"Vinguda la nit de las bodas, digu? Eufemiano a son fill Aleix: fill, entrau al aposento a visitar a vostra esposa. Ho feu aix? com son pare li man?: salud? a la sua esposa, y li digu?: Deu te salve criatura de Deu, esposa de Jesu Crist, y li comens? a contar la vida que feren les Verges, y las altres Santas que son en lo Cel, y que molt bo era lo Matrimoni per aquell que be usaba de ell; mes que molt millor, y mes santa cosa era la limpia virginitat, y que de aix? era Deu molt pagat, y tota la sua Cort celestial. Li digu? altres cosas molt espirituals, que la gracia de Deu li inspir?. Tamb? li digu?: germana y senyora, habeu vist que maravellosas y honradas bodas se nos han fet? Per ventura las habeu vos vistas, ni o?das tals? Ella respongu? que no: Aleix li digu? aleshores: pues, voleu vos, que aquestas honras, plahers y alegrias que las tingam vos y jo cada dia pera sempre? Digu? ella: Senyor, si que ho voldria. Li digu? ell, pues germana y senyora, ab vostra llicencia, si vos plau anir? de aqui a Jerusalem, y quant de alli vinga, portar? cosa ab que sempre tingam aquestos plahers y molts mes. A lo que digu? ella que li plah?a." INDEF W __UNDEF__
Passaren passar VDP3P- VPrin_
...
=============================
It looks like a problem with the tokenization of text that appears within quotation marks.
JM
On 29 Apr 2026, at 19:31, Hardie, Andrew via CWB wrote:
ANYWAY: nothing is wrong. In the second screenshot, one of the query results (number 6) has a lefthand context that is very wide (because a ton of tokens are coming out as [UNREADABLE]). That makes that column of the display so wide that all the other columns are out of sight rightwards. Since the lefthand context is right-aligned, even that is invisible. So fi you scroll rightwards, it will all become visible.
And it helps to have a CSS layout that hides overflow text rather than extending the column beyond screen width, which gives a display that's much closer to the kwic format we're used to.
Not sure whether you still have to patch the PHP code to make it work, but I can send you the CSS that I use (the right trick was discovered by Laurence for AntConc).
Best,
Stephanie
_______________________________________________
CWB mailing list
CWB at sslmit.unibo.it
http://liste.sslmit.unibo.it/mailman/listinfo/cwb
-------------- next part --------------
An HTML attachment was scrubbed...
URL: