cqi_attribute_size: Get the size of an attribute

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

Description

Find the number of items (type/category or token/individual) of an attribute.

Usage

1
2
3

Arguments

attribute

(string) the qualified name of an attribute.

Details

The cqi_attribute_size indicates the number of actual elements (number of occurrences) of an attributes:

The cqi_lexicon_size function indicates the number of different values of a positional attribute (number of types, or categories). It applies only to positional attributes.

The cqi_structural_attribute_has_values indicates if the specified attribute does have values. This concerns only the structural attributes. Positional attributes always have values. In order to get the value of a positionnal attribute with value, consider using cqi_struc2str.

The attribute argument is the qualified name of an attribute. This concerns any kind of attribute. The syntax is of the form name_of_corpus.name_of_attribute. For instance "DICKENS.lemma" (positional attribute) or "DICKENS.chapter" (structural attribute).

Value

cqi_attribute_size returns an integer which is the number of different items in the corpus marked with the specified attribute.

cqi_structural_attribute_has_values returns a logical value telling whether the specified attribute has values (TRUE) or not (FALSE).

cqi_lexicon_size returns an integer value.

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_attributes, cqi_struc2str.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
## Not run: 
cqi_structural_attribute_has_values("DICKENS.file")
cqi_structural_attribute_has_values("DICKENS.file_name")
cqi_structural_attribute_has_values("DICKENS.chapter")
cqi_structural_attribute_has_values("DICKENS.chapter_title")

cqi_lexicon_size("DICKENS.lemma")
cqi_lexicon_size("DICKENS.pos")
cqi_lexicon_size("DICKENS.word")

# Positional attribute
cqi_attribute_size("DICKENS.lemma")
cqi_attribute_size("DICKENS.pos")
cqi_attribute_size("DICKENS.word")

# Structural attributes
cqi_attribute_size("DICKENS.book")
cqi_attribute_size("DICKENS.file")
cqi_attribute_size("DICKENS.chapter")

## End(Not run)

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