<div dir="ltr"><div>Dear Timm,</div><div>Thank you for this.</div><div>As far as I understood from your advice and from the manual, I should, instead of doing </div><div>cwb-encode ... -V mwe</div><div>do instead</div><div>cwb-encode ... -S mwe -V mwe_lema</div><div>and replace in the verticalized file</div><div><mwe lema="whatever"></div><div>by</div><div><mwe></div><div><mwe_lema whatever></div><div>Is this what you mean?</div><div>This works, but I was wondering whether there was any command or trick that from </div><div><mwe lema="whatever" ...> (with several key value pairs)</div><div>would make cwb-encode at once <mwe_lema ..> etc, without explicitly encoding it in the source file.</div><div>In case there isn't, I will write a Perl script to do it. </div><div>Thanks again</div><div>Diana</div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">Timm Weber <<a href="mailto:timm.weber@fau.de">timm.weber@fau.de</a>> escreveu (sexta, 4/09/2026 à(s) 21:05):<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="auto">Hi Diane,<div dir="auto"><br></div><div dir="auto">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 (<a href="https://cwb.sourceforge.io/files/CWB_Encoding_Tutorial.pdf" target="_blank">https://cwb.sourceforge.io/files/CWB_Encoding_Tutorial.pdf</a>) section 5 for how to deal with XML attributes. </div><div dir="auto"><br></div><div dir="auto">Best regards</div><div dir="auto">Timm</div><br><div class="gmail_extra" dir="auto"><br><div class="gmail_quote">Am 04.09.2026 19:40 schrieb Diana Santos via CWB <<a href="mailto:cwb@sslmit.unibo.it" target="_blank">cwb@sslmit.unibo.it</a>>:<br type="attribution"><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi  </div><div><br></div><div>I have been studying the use of XML attributes in CWB </div><div><a href="https://cwb.sourceforge.io/files/CQP_Manual/4_3.html" target="_blank">https://cwb.sourceforge.io/files/CQP_Manual/4_3.html</a></div><div>and testing it (in the CQPDemo DICKENS corpus, <a href="https://corpora.linguistik.uni-erlangen.de/demos/CQP/CQPDemo/frames-simple.html" target="_blank">https://corpora.linguistik.uni-erlangen.de/demos/CQP/CQPDemo/frames-simple.html</a>)</div><div>but do not seem to be able to replicate this behaviour in my own corpora.</div><div><br></div><div>In particular, instead of <np> etc I have just <mwe>, but with some values, such as .</div><div><mwe lema="jogo=de=palavras" pos="N"></div><div><mwe lema="cana=do=nariz"  pos="N" grupo="Cabeça" sema="corpo"></div><div><br></div><div>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 </div><div><code style="font-family:"arial",sans-serif"><np> a:[] []* </np> :: a.np_h = "bank";</code></div><div><span style="font-family:"arial",sans-serif"><code><br></code></span></div><div><code style="font-family:"arial",sans-serif">that is</code></div><div><code style="font-family:"arial",sans-serif"><mwe> a:[] [*] </mwe> :: a.mwe_lema = "cor"</code></div><div><span style="font-family:"arial",sans-serif"><code><br></code></span></div><div><code style="font-family:"arial",sans-serif">I suppose there is something in the encoding that I am doing wrongly?</code></div><div><code style="font-family:"arial",sans-serif">I can of course do</code></div><div><span style="font-family:"arial",sans-serif"><code><br></code></span></div><div><code style="font-family:"arial",sans-serif"><mwe> [] []* </mwe></code></div><div><span style="font-family:"arial",sans-serif"><code><br></code></span></div><div><code style="font-family:"arial",sans-serif">but I cannot access the values of the key-values pairs. Can anyone help me with this?</code></div><div><code style="font-family:"arial",sans-serif">Thanks a lot in advance</code></div><div><code><span style="font-family:"arial",sans-serif">Diana</span></code></div></div>
</blockquote></div><br><br></div></div></blockquote></div>