cqi_query: Query an indexed corpus

Description Usage Arguments Details Value Author(s) Source References See Also Examples

Description

The cqi_query function executes a query on the specified corpus. The query syntax is described in the CQP Query Language Tutorial (see below).

Usage

1
	cqi_query(mother, child, query)

Arguments

mother

(string) the name of the corpus.

child

(string) the name given to the subcorpus which will contain the results of the query.

query

(string) the query string.

Details

The query string must be properly quoted in order to be syntactically correct when it is passed to the CQP interpreter.

The name of a corpus is always written in uppercase letters. The name of a subcorpus must start with an uppercase letter and can contain both uppercase and lowercase letters, underscores, dashes and digits.

Value

cqi_query does not return anything. In order to manipulate the results, one must invoke the cqi_dump_subcorpus function.

Author(s)

Bernard Desgraupes - bernard.desgraupes@u-paris10.fr - University Paris-10.
Sylvain Loiseau - sylvain.loiseau@univ-paris13.fr - University Paris-13.

Source

The IMS Open Corpus Workbench (CWB) at http://cwb.sourceforge.net/

References

See Also

cqi_dump_subcorpus, cqi_drop_subcorpus, cqi_attributes, cqi_attribute_size.
subcorpus, corpus.

Conversion functions: cqi_alg2cpos, cqi_cpos2alg, cqi_cpos2id, cqi_cpos2lbound, cqi_cpos2rbound, cqi_cpos2str, cqi_cpos2struc, cqi_id2cpos, cqi_id2freq, cqi_id2str, cqi_regex2id, cqi_str2id, cqi_struc2cpos, cqi_struc2str.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Not run: 
cqi_query("DICKENS","Foo","\"eas(y|ier|iest)\";")
cqi_dump_subcorpus("DICKENS:Foo",0,10)
cqi_drop_subcorpus("DICKENS:Foo")

cqi_query("DICKENS","Go","[lemma=\"go\"] \"and\" [];")
cqi_dump_subcorpus("DICKENS:Go",0,10)
cqi_drop_subcorpus("DICKENS:Go")

cqi_query("DICKENS","NP","[pos=\"DT\"] @[pos=\"JJ\"]? [pos=\"NNS?\"];")
cqi_dump_subcorpus("DICKENS:NP",0,10)
cqi_drop_subcorpus("DICKENS:NP")

## End(Not run)

PolMine/rcqp.mac documentation built on May 28, 2019, 2:24 p.m.