Description Usage Arguments Details Value Author(s) Source References See Also Examples
Associate an item's ID to other parameters.
1 2 3 4 | cqi_id2cpos(attribute, id)
cqi_id2freq(attribute, ids)
cqi_id2str(attribute, ids)
cqi_str2id(attribute, strs)
|
attribute |
(string) the qualified name of an attribute. |
id |
(integer) a single value |
ids |
(integer vector) |
strs |
(character vector) |
These functions take as argument the ID of a positional attribute item and associate corresponding parameters such as the corpus position, the frequency or the string it represents.
The cqi_str2id
function does the opposite: it associates the ID
to a given positional parameter.
The cqi_id2cpos
, cqi_id2freq
, cqi_str2id
functions
return an integer. The cqi_id2str
function returns a string.
Bernard Desgraupes - bernard.desgraupes@u-paris10.fr - University Paris-10.
Sylvain Loiseau - sylvain.loiseau@univ-paris13.fr - University Paris-13.
The IMS Open Corpus Workbench (CWB) at http://cwb.sourceforge.net/
http://cwb.sourceforge.net/documentation.php
cqi_alg2cpos
cqi_cpos2alg
,
cqi_cpos2id
,
cqi_cpos2lbound
,
cqi_cpos2rbound
,
cqi_cpos2str
,
cqi_cpos2struc
,
cqi_regex2id
,
cqi_str2id
,
cqi_struc2cpos
,
cqi_struc2str
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | ## Not run:
cqi_query("DICKENS","Foo","\"eas(y|ier|iest)\";")
cpos <- cqi_dump_subcorpus("DICKENS:Foo")[1,1]
# # cqi_id2cpos
pids <- unique(cqi_cpos2id("DICKENS.pos", cpos))
ppos <- cqi_id2cpos("DICKENS.pos", pids[1])
ppos[1:50]
wids <- unique(cqi_cpos2id("DICKENS.word", cpos))
wpos <- cqi_id2cpos("DICKENS.word", wids[1])
wpos[1:50]
lids <- unique(cqi_cpos2id("DICKENS.lemma", cpos))
lpos <- cqi_id2cpos("DICKENS.lemma", lids[1])
lpos[1:50]
# # cqi_str2id and cqi_id2str
pid <- cqi_str2id("DICKENS.pos", "JJ")
cqi_id2str("DICKENS.pos", pid)
wid <- cqi_str2id("DICKENS.word", "easiest")
cqi_id2str("DICKENS.word", wid)
lid <- cqi_str2id("DICKENS.lemma", "easy")
cqi_id2str("DICKENS.lemma", lid)
# # cqi_id2freq
# Take the 20 first positions
cpos <- cqi_dump_subcorpus("DICKENS:Foo")[1:20,1]
pids <- unique(cqi_cpos2id("DICKENS.pos", cpos))
cqi_id2freq("DICKENS.pos", pids)
wids <- unique(cqi_cpos2id("DICKENS.word", cpos))
cqi_id2freq("DICKENS.word", wids)
lids <- unique(cqi_cpos2id("DICKENS.lemma", cpos))
cqi_id2freq("DICKENS.lemma", lids)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.