cqi_struc2cpos: Convert structural indices

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

Description

Get the corpus positions or the string associated to a structural position.

Usage

1
2
	cqi_struc2cpos(attribute, struc)
	cqi_struc2str(attribute, ids)

Arguments

attribute

(string) the qualified name of an attribute.

struc

(integer)

ids

(integer vector)

Details

The structural attributes correspond to XML pairs of tags in the corpus. Matching pairs of XML start and end tags are encoded as token regions. The struc parameter is the index of a particular pair of tags. The cqi_struc2cpos function associates the corpus positions of the specified pair.

Value

The cqi_struc2cpos function returns a pair of corpus positions: the corpus positions of the first token (immediately following the start tag) and of the last token (immediately preceding the end tag) of the token region.

The cqi_struc2str function returns a string.

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

http://cwb.sourceforge.net/documentation.php

See Also

cqi_alg2cpos, cqi_cpos2alg, cqi_cpos2id, cqi_cpos2lbound, cqi_cpos2rbound, cqi_cpos2str, cqi_cpos2struc, cqi_id2cpos, cqi_id2freq, cqi_id2str, cqi_regex2id, cqi_str2id.

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
for (i in 0:10) {
	print(cqi_struc2cpos("DICKENS.novel", i))
}

cqi_struc2str("DICKENS.novel_title", 1:10)
cqi_struc2str("DICKENS.chapter_title", 1:10)

## End(Not run)

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