<div dir="ltr"><div>Dear Stephanie,</div><div><br></div><div>In terms of CQP syntax and the management of CQPweb, we were wondering if the <b><a href="https://cwb.sourceforge.io/files/CQP_Tutorial/">full CQP-syntax tutorial</a> </b>and the <b>CQPweb Admin Manual</b> are the definitive sources of truth that we should be referring to.</div><div><br></div><div>Thank you once again for your invaluable guidance.</div><div><br></div><div>Best,</div><div>Min</div><br></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Wed, Sep 3, 2025 at 11:13 AM Min Qu <<a href="mailto:qumino2@gmail.com">qumino2@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Dear Stephanie,</div><div><br></div><div>It works perfectly following your guide! You are truly educating the CWB community, one query at a time, and our team has learned a great deal from your detailed and insightful reply.</div><div><br></div><div><br></div><div>Best,</div><div>Min</div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Sep 3, 2025 at 3:28 AM Stephanie Evert <<a href="mailto:stefanML@collocations.de" target="_blank">stefanML@collocations.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
> I am encountering an error when I run the query `[lemma="run" & text_author="Muir, John, 1838-1914"]` on our CQPweb.<br>
<br>
I assume that text_author is an s-attribute. In this case, you need a different syntax to access its annotation<br>
<br>
[lemma="run" & _.text_author="Muir, John, 1838-1914"]<br>
<br>
The "this" label _ refers to the current token and allows you to access the values of s-attributes, which are only exposed through label references. I often find it more readable to specify metadata filters as a global constraint, e.g.<br>
<br>
[lemma="run"] :: match.text_author="Muir, John, 1838-1914"<br>
<br>
> Does anyone know why this error might be occurring?<br>
<br>
The error message is indeed a bit cryptic. The full explanation is that bare references to s-attributes are allowed, but always return an integer code that is 0 outside a region of the specified type, and nonzero inside. This allows you to find tokens e.g. inside a <head> element with<br>
<br>
[lemma="run" & head] <br>
<br>
or even the lemma "run" at the start of a sentence:<br>
<br>
[lemma="run" & lbound(head)] <br>
<br>
where the builtin lbound() function tests appropriate bits of the integer code. Another use is to find any tokens in the corpus that are not wrapped in an <s> element (assuming this should not happen).<br>
<br>
[!s]<br>
<br>
In your query, text_author returns such an integer code, which cannot be compared with a string value.<br>
<br>
Best,<br>
Stephanie [educating the CWB community, one query at a time]<br>
_______________________________________________<br>
CWB mailing list<br>
<a href="mailto:CWB@sslmit.unibo.it" target="_blank">CWB@sslmit.unibo.it</a><br>
<a href="http://liste.sslmit.unibo.it/mailman/listinfo/cwb" rel="noreferrer" target="_blank">http://liste.sslmit.unibo.it/mailman/listinfo/cwb</a><br>
</blockquote></div>
</blockquote></div>