[CWB] Question about translations for sentences
Hardie, Andrew
a.hardie at lancaster.ac.uk
Tue Dec 8 14:57:52 CET 2020
The thing to be aware of is that regex shouldn’t be delimited. IE No slashes! -- Andrew
From: cwb-bounces at sslmit.unibo.it <cwb-bounces at sslmit.unibo.it> On Behalf Of Diana Santos
Sent: 08 December 2020 12:43
To: Open source development of the Corpus WorkBench <cwb at sslmit.unibo.it>
Subject: Re: [CWB] Question about translations for sentences
Dear Simon
Thanks a lot. However (maybe this is because I am using a version of cqp which is too old? 3.0.0) I do not get any results:
The corpus is encoded with eg.
<mwe lema=one=example=of lema pos=N>
</mwe>
and created with the flag -V mwe.
However, when I query
[ ] :: match.mwe="/.*/";
(whatever I put in the regular expression)
I always get
0 matches.
Any suggestion?
Thanks in advance
Diana
Simon Meier-Vieracker <simon.meier-vieracker at tu-dresden.de<mailto:simon.meier-vieracker at tu-dresden.de>> escreveu no dia terça, 8/12/2020 à(s) 12:38:
Given the structure suggested by Stefan, you can try something like this:
[word="word"] :: match.s_trans = "/regex/"
Best, Simon
Am 08.12.2020 um 12:34 schrieb Diana Santos <dianamsmpsantos at gmail.com<mailto:dianamsmpsantos at gmail.com>>:
Dear Stefan
I just wonder if there is any possibility (in cqp, not CQPweb) of searching by values of structural attributes.
I think to recall there was, but I couldn't find it.
Thank you in advance
Diana
Stefan Evert <stefanML at collocations.de<mailto:stefanML at collocations.de>> escreveu no dia terça, 8/12/2020 à(s) 10:41:
> Could you, please, give me some advice. We have a corpus where most of the sentences have translations. It is not a parallel corpus, just translations for particular sentences. What is the best way of integrating those translations into CQPweb? The main purpose is to give users a possibility to see translations for found sentences, maybe as a tooltip or some other way. The possibility of search in translations would be useful, but not mandatory.
Include them as an attribute on the XML element wrapping sentences, or as an additional s-attribute, e.g.
<s trans="THIS IS THE TRANSLATION">
word pos
word pos
…
</s>
Then you can enable "s_trans" as "Free translation" attribute in the visualisation settings in CQPweb.
Best,
Stefan
_______________________________________________
CWB mailing list
CWB at sslmit.unibo.it<mailto:CWB at sslmit.unibo.it>
http://liste.sslmit.unibo.it/mailman/listinfo/cwb<https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fliste.sslmit.unibo.it%2Fmailman%2Flistinfo%2Fcwb&data=04%7C01%7Ca.hardie%40lancaster.ac.uk%7C1061a520889e4227eb3108d89b76e9ed%7C9c9bcd11977a4e9ca9a0bc734090164a%7C0%7C0%7C637430282320388378%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=c%2BfrONUerKvKkDCYrK9gI6uusS0aFKCTpMC%2F4ORA7xM%3D&reserved=0>
_______________________________________________
CWB mailing list
CWB at sslmit.unibo.it<mailto:CWB at sslmit.unibo.it>
http://liste.sslmit.unibo.it/mailman/listinfo/cwb<https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fliste.sslmit.unibo.it%2Fmailman%2Flistinfo%2Fcwb&data=04%7C01%7Ca.hardie%40lancaster.ac.uk%7C1061a520889e4227eb3108d89b76e9ed%7C9c9bcd11977a4e9ca9a0bc734090164a%7C0%7C0%7C637430282320398337%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=%2FVEA57ZIQapUkyqWSEVVjESKM%2B2%2FKBgk6nHHS0NRlSA%3D&reserved=0>
_______________________________________________
CWB mailing list
CWB at sslmit.unibo.it<mailto:CWB at sslmit.unibo.it>
http://liste.sslmit.unibo.it/mailman/listinfo/cwb<https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fliste.sslmit.unibo.it%2Fmailman%2Flistinfo%2Fcwb&data=04%7C01%7Ca.hardie%40lancaster.ac.uk%7C1061a520889e4227eb3108d89b76e9ed%7C9c9bcd11977a4e9ca9a0bc734090164a%7C0%7C0%7C637430282320398337%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=%2FVEA57ZIQapUkyqWSEVVjESKM%2B2%2FKBgk6nHHS0NRlSA%3D&reserved=0>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://liste.sslmit.unibo.it/pipermail/cwb/attachments/20201208/edf9e2aa/attachment.html>
More information about the CWB
mailing list