[CWB] show +no

Stefan Evert stefanML at collocations.de
Tue Nov 14 10:02:09 CET 2017


> On 13 Nov 2017, at 23:32, Hardie, Andrew <a.hardie at lancaster.ac.uk> wrote:
> 
> To my knowledge, there’s no way of quoting corpus/attribute identifiers alas (conceivably there should be!).

In the SVN version of CQP, identifiers can now be quoted with backticks if they are reserved words.  Some examples:

	`MU` = [lemma = "meeting|union"];
	group `MU` match lemma;

	show +`no`;
	
	[`size` = "\d{5,}"];

Note that the usual rules for identifiers still apply, so you can't use `007` as an attribute or query result name. Sorry. :-)

Also, keep in mind that reserved words need not be quoted in label definitions and qualified label references, and backticks are not accepted in these contexts:

	[pos = "JJ.*"] no: [pos="JJ.*"]* [pos="NN.*"] :: `no` & no.lemma = match.lemma;

It would be nice if someone could test the new feature, esp. whether the backticks work in all required contexts and whether there are any unintended consequences.

Best,
Stefan



More information about the CWB mailing list