[CWB] cqi

Hardie, Andrew a.hardie at lancaster.ac.uk
Fri Oct 5 17:39:17 CEST 2012


The result of a query via the CQi function CQI_CQP_QUERY (accessed via the method cqi_query() in the Perl module) is stored in the subcorpus named by second argument to that function, so you should not need to take any additional steps to avoid it being deleted....

USAGE:
$ok = cqi_query($corpus_to_search_in, $name_to_store_query_under, $the_query_itself);

You can’t append a query from one corpus to a query from another; it wouldn’t make sense to do so. Queries are, remember, lists of numbers that indicate the positions of the hits. The numbers mean different things in different corpora. So you can’t mix numbers from different corpora.

Appending one concordance to another is a rather higher-level task, if that’s what you mean. That would be much more easily done using the CWB:CQP module than via CQi.

best

Andrew.

From: Drakan Grass [mailto:luca_proc at yahoo.it]
Sent: 05 October 2012 16:19
To: Hardie, Andrew
Subject: Re: [CWB] cqi

Thank's for your answers and for your availability!

I would know how works the CQI to try to understand if it's possible to save the results of a query before that the Last subcorpus is deleted and then maybe append the results of same query made ​​on a different corpus.
Which source code i must download over the perl module "CWB-Web Perl-CWB-CQI-3.0"?

Do you have some suggest for me?

________________________________
Da: "Hardie, Andrew" <a.hardie at lancaster.ac.uk>
A: Drakan Grass <luca_proc at yahoo.it>
Cc: Open source development of the Corpus WorkBench <cwb at sslmit.unibo.it>
Inviato: Venerdì 5 Ottobre 2012 16:45
Oggetto: RE: [CWB] cqi

“Last” isn’t created by the Perl module. It’s created by the CQP server. Specifically, here:

http://cwb.svn.sourceforge.net/viewvc/cwb/cwb/trunk/cqp/parse_actions.c?revision=326&view=markup

Lines 269 to 242.

If I know what you’re trying to accomplish, I might be able to suggest a way to get it done...

best

Andrew.

From: Drakan Grass [mailto:luca_proc at yahoo.it]
Sent: 05 October 2012 15:38
To: Hardie, Andrew
Subject: Re: [CWB] cqi

I'm trying to know how works cqi and i want know where in the perl code is created Last subcorpus.

I read in the Cqi tutorial :
"CORPORA, SUBCORPORA, AND ATTRIBUTES
In the CQi, Corpus names are uppercase strings such as
BNC, HANSARD-EN, UP

Subcorpora names begin with a capital letter followed by zero or more lowercase characters (including digits
and hyphens). A full subcorpus identififier consists of both the name of the physical corpus and the subcorpus
name, separated by a colon:
BNC:A, UP:Last, HANSARD-EN:Collocations-1 .
Last is a special subcorpus, which contains the results of the last CQP query. It will be automatically
deleted whenever a new query is executed."

________________________________
Da: "Hardie, Andrew" <a.hardie at lancaster.ac.uk>
A: Drakan Grass <luca_proc at yahoo.it>; Open source development of the Corpus WorkBench <cwb at sslmit.unibo.it>
Inviato: Venerdì 5 Ottobre 2012 16:28
Oggetto: RE: [CWB] cqi

Hi,

I’m not sure I follow; can you explain what it is you’re trying to do?

best

Andrew.

From: cwb-bounces at sslmit.unibo.it [mailto:cwb-bounces at sslmit.unibo.it] On Behalf Of Drakan Grass
Sent: 05 October 2012 15:27
To: cwb at sslmit.unibo.it
Subject: [CWB] cqi

Dear all,

I read in the cqi's tutorial : "Last is a special subcorpus, which contains the results of the last CQP query. It will be automatically
deleted whenever a new query is executed."
I'm not a good perl programmer , anyway I saw in the source code"CWB-Web Perl-CWB-CQI-3.0" downloaded to the CWB's website looking for Last subcorpus, but I don't find it nowhere!
Anyone know when and where is created on the code the Last subcorpus?

Best



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://devel.sslmit.unibo.it/pipermail/cwb/attachments/20121005/16eebcb4/attachment-0001.html>


More information about the CWB mailing list