[CWB] Dramatic texts in cqpweb

Graham Ranger -- UAPV graham.ranger at univ-avignon.fr
Thu Nov 16 13:07:25 CET 2017


Hello,
Many thanks for this previous answer. I am still struggling to get the 
CQP query working however.
I've set up a micro-corpus for testing purposes, tagged for POS and 
lemma and with minimal xml, including <sp> and attribute "who". So: "<sp 
who=#"PIERRE”> ... </sp>" for material spoken by "Pierre".
A CQP query like:
n:[pos = "NOM"] :: n < 25;
works, so labels and global constraints are functioning, but the CQP query:
n:[pos = "NOM"] :: n.sp_who = "#PIERRE" ;
does not. Or rather, it returns no results although Pierre does indeed 
say a few nouns. I suppose that I must have set up the "sp_who" 
attribute wrongly in some way. It figures in the list under "Manage 
corpus XML" as an ID Link. I hope this is enough for a diagnosis at a 
distance...
A similar query on the Spoken BNC2014 corpus https://cqpweb.lancs.ac.uk/ 
works. Having checked that "S0021" was used as a speaker i.d., and that 
the speaker used a plural noun at least once, I tried "n:[pos = "NN2"] 
:: n.u_who = "S0021" ;" with positive results.
As always, any help in sorting this out would be very much appreciated!
Best,
Graham.

Le 06/11/2017 à 11:59, Hardie, Andrew a écrit :
> Assuming that sp_who is of datatype ID-link, this can't at present be done within the interface, though that is in the works.
>
> (Unless your ID link metadata includes a classification-type column that duplicates the speaker ID. That would do it.)
>
> Currently the most direct way to do this is via a CQP syntax query with a global constraint of the form
>
> xx.sp_who = "Bill"
>
> where xx is a label specified within the main part of the query.
>
> See CQP tutorial section 4.1
>
>
>>> the categorisation schemes, which, I suspect, only apply to texts.
> No, they apply to s-attributes of type ID link too...
>
> best
>
> Andrew.
>
> -----Original Message-----
> From: cwb-bounces at sslmit.unibo.it [mailto:cwb-bounces at sslmit.unibo.it] On Behalf Of Graham Ranger -- UAPV
> Sent: 06 November 2017 10:11
> To: cwb at sslmit.unibo.it
> Subject: Re: [CWB] Dramatic texts in cqpweb
>
> Hello,
> And thanks again to those who answered my previous question re: setting
> up dramatic texts with limited xml encoding for use in cqpweb.
> I have a further question, which follows on from the previous -- and may
> be just as naive.
> Given a speaker tag <sp> with attribute "who", such that an intervention
> by a character called Bill in a play might be <sp
> who="Bill">Hello!</sp>, can cqpweb provide a way for extracting
> occurrences within all interventions by Bill? I've tried in various
> ways, by don't seem to be able to include this in the categorisation
> schemes, which, I suspect, only apply to texts.
> Thanks in advance for any help on this.
> Best,
> Graham.
> _______________________________________________
> CWB mailing list
> CWB at sslmit.unibo.it
> http://liste.sslmit.unibo.it/mailman/listinfo/cwb
> _______________________________________________
> CWB mailing list
> CWB at sslmit.unibo.it
> http://liste.sslmit.unibo.it/mailman/listinfo/cwb



More information about the CWB mailing list