cqi_regex2id: Find IDs by regular expression

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

Description

Build a list of IDs of positional attributes whose names match a regular expression.

Usage

1
	cqi_regex2id(attribute, regex)

Arguments

attribute

(string) the name of a positional attribute.

regex

(string) a regular expression.

Details

This function looks in the index files corresponding to the specified positional attribute, finds the strings described by the regular expression and returns the associated indices.

Value

cqi_regex2id returns a list of integers.

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_id2cpos, cqi_id2freq, cqi_id2str, cqi_str2id, cqi_struc2cpos, cqi_struc2str.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Not run: 
rgx <- "eas(y|ier|iest)"
wids <- cqi_regex2id("DICKENS.word", rgx)
cqi_id2str("DICKENS.word", wids)

rgx <- "V.*"
pids <- cqi_regex2id("DICKENS.pos", rgx)
cqi_id2str("DICKENS.pos", pids)

rgx <- "V[aeiou].+e"
lids <- cqi_regex2id("DICKENS.lemma", rgx)
cqi_id2str("DICKENS.lemma", lids)

## End(Not run)

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