From dianamsmpsantos at gmail.com Fri Sep 4 19:40:46 2026 From: dianamsmpsantos at gmail.com (Diana Santos) Date: Fri, 4 Sep 2026 19:40:46 +0200 Subject: [CWB] Structural attributes in CQP with values Message-ID: Hi I have been studying the use of XML attributes in CWB https://cwb.sourceforge.io/files/CQP_Manual/4_3.html and testing it (in the CQPDemo DICKENS corpus, https://corpora.linguistik.uni-erlangen.de/demos/CQP/CQPDemo/frames-simple.html ) but do not seem to be able to replicate this behaviour in my own corpora. In particular, instead of etc I have just , but with some values, such as . But although I have tried to encode the corpora with -V mwe.lema, I still cannot get it, that is, I cannot do "simple" things like a:[] []* :: a.np_h = "bank"; that is a:[] [*] :: a.mwe_lema = "cor" I suppose there is something in the encoding that I am doing wrongly? I can of course do [] []* but I cannot access the values of the key-values pairs. Can anyone help me with this? Thanks a lot in advance Diana -------------- next part -------------- An HTML attachment was scrubbed... URL: From timm.weber at fau.de Fri Sep 4 21:05:52 2026 From: timm.weber at fau.de (Timm Weber) Date: Fri, 04 Sep 2026 21:05:52 +0200 Subject: [CWB] Structural attributes in CQP with values In-Reply-To: Message-ID: An HTML attachment was scrubbed... URL: From dianamsmpsantos at gmail.com Sat Sep 5 14:00:06 2026 From: dianamsmpsantos at gmail.com (Diana Santos) Date: Sat, 5 Sep 2026 14:00:06 +0200 Subject: [CWB] Structural attributes in CQP with values In-Reply-To: References: Message-ID: Dear Timm, Thank you for this. As far as I understood from your advice and from the manual, I should, instead of doing cwb-encode ... -V mwe do instead cwb-encode ... -S mwe -V mwe_lema and replace in the verticalized file by Is this what you mean? This works, but I was wondering whether there was any command or trick that from (with several key value pairs) would make cwb-encode at once etc, without explicitly encoding it in the source file. In case there isn't, I will write a Perl script to do it. Thanks again Diana Timm Weber escreveu (sexta, 4/09/2026 ?(s) 21:05): > Hi Diane, > > you probably want to encode separate structural attributes for the > attributes using -S. The s-attribute mwe will then only encode the bare > span, while mwe_lema will encode the span and the attribute value for lema, > etc. Refer to the corpus encoding manual ( > https://cwb.sourceforge.io/files/CWB_Encoding_Tutorial.pdf) section 5 for > how to deal with XML attributes. > > Best regards > Timm > > > Am 04.09.2026 19:40 schrieb Diana Santos via CWB : > > Hi > > I have been studying the use of XML attributes in CWB > https://cwb.sourceforge.io/files/CQP_Manual/4_3.html > and testing it (in the CQPDemo DICKENS corpus, > https://corpora.linguistik.uni-erlangen.de/demos/CQP/CQPDemo/frames-simple.html > ) > but do not seem to be able to replicate this behaviour in my own corpora. > > In particular, instead of etc I have just , but with some > values, such as . > > > > But although I have tried to encode the corpora with -V mwe.lema, I still > cannot get it, that is, I cannot do "simple" things like > a:[] []* :: a.np_h = "bank"; > > that is > a:[] [*] :: a.mwe_lema = "cor" > > I suppose there is something in the encoding that I am doing wrongly? > I can of course do > > [] []* > > but I cannot access the values of the key-values pairs. Can anyone help me > with this? > Thanks a lot in advance > Diana > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dianamsmpsantos at gmail.com Sat Sep 5 14:15:46 2026 From: dianamsmpsantos at gmail.com (Diana Santos) Date: Sat, 5 Sep 2026 14:15:46 +0200 Subject: [CWB] Structural attributes in CQP with values In-Reply-To: References: Message-ID: Sorry for this, but I have continued to read the manual, and saw that the solution would be cwb-encode ... -S mwe:0+lema+pos+sema+grupo This works like a charm, and was exactly what I was looking for. Best Diana Diana Santos escreveu (s?bado, 5/09/2026 ?(s) 14:00): > Dear Timm, > Thank you for this. > As far as I understood from your advice and from the manual, I should, > instead of doing > cwb-encode ... -V mwe > do instead > cwb-encode ... -S mwe -V mwe_lema > and replace in the verticalized file > > by > > > Is this what you mean? > This works, but I was wondering whether there was any command or trick > that from > (with several key value pairs) > would make cwb-encode at once etc, without explicitly > encoding it in the source file. > In case there isn't, I will write a Perl script to do it. > Thanks again > Diana > > Timm Weber escreveu (sexta, 4/09/2026 ?(s) 21:05): > >> Hi Diane, >> >> you probably want to encode separate structural attributes for the >> attributes using -S. The s-attribute mwe will then only encode the bare >> span, while mwe_lema will encode the span and the attribute value for lema, >> etc. Refer to the corpus encoding manual ( >> https://cwb.sourceforge.io/files/CWB_Encoding_Tutorial.pdf) section 5 >> for how to deal with XML attributes. >> >> Best regards >> Timm >> >> >> Am 04.09.2026 19:40 schrieb Diana Santos via CWB : >> >> Hi >> >> I have been studying the use of XML attributes in CWB >> https://cwb.sourceforge.io/files/CQP_Manual/4_3.html >> and testing it (in the CQPDemo DICKENS corpus, >> https://corpora.linguistik.uni-erlangen.de/demos/CQP/CQPDemo/frames-simple.html >> ) >> but do not seem to be able to replicate this behaviour in my own corpora. >> >> In particular, instead of etc I have just , but with some >> values, such as . >> >> >> >> But although I have tried to encode the corpora with -V mwe.lema, I still >> cannot get it, that is, I cannot do "simple" things like >> a:[] []* :: a.np_h = "bank"; >> >> that is >> a:[] [*] :: a.mwe_lema = "cor" >> >> I suppose there is something in the encoding that I am doing wrongly? >> I can of course do >> >> [] []* >> >> but I cannot access the values of the key-values pairs. Can anyone help >> me with this? >> Thanks a lot in advance >> Diana >> >> >> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: