[CWB] Dramatic texts in cqpweb

Hardie, Andrew a.hardie at lancaster.ac.uk
Thu Nov 16 17:25:59 CET 2017


Hi Graham,

First, a point about IDs in your sp_who attribute - the assumption is that these will be handles, i.e. contain only alphanumeric characters or underscore. At the level of CQPweb then, your use of the # symbol in the ID codes may be causing problems.

However, that can't account for the failure of 

n:[pos = "NOM"] :: n.sp_who = "#PIERRE" ;

... because that is just using the index at the3 CWB level, so violating CQPweb's additional requirements should not affect the outcome.

Can I make the following suggestion: run just 

[pos = "NOM"]

and then use the Tabulation function (Download... > Switch to tabulation) to get a text file with one column containing the sp_who attribute value for each hit? This should let you see what is going on in the underlying index, and thus will hopefully give some clue as to what the issue is.

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: 16 November 2017 12:07
To: cwb at sslmit.unibo.it
Subject: Re: [CWB] Dramatic texts in cqpweb

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

_______________________________________________
CWB mailing list
CWB at sslmit.unibo.it
http://liste.sslmit.unibo.it/mailman/listinfo/cwb


More information about the CWB mailing list