p_attributes | R Documentation |
In a CWB corpus, every token has positional attributes. While s-attributes
cover a range of tokens, every single token in the token stream of a corpus
will have a set of positional attributes (such as part-of-speech, or lemma).
The available p-attributes are returned by the p_attributes
-method.
p_attributes(.Object, ...)
## S4 method for signature 'character'
p_attributes(.Object, p_attribute = NULL)
## S4 method for signature 'corpus'
p_attributes(.Object, p_attribute = NULL)
## S4 method for signature 'slice'
p_attributes(.Object, p_attribute = NULL, decode = TRUE)
## S4 method for signature 'partition_bundle'
p_attributes(.Object, p_attribute = NULL, decode = TRUE)
## S4 method for signature 'remote_corpus'
p_attributes(.Object, ...)
## S4 method for signature 'remote_partition'
p_attributes(.Object, ...)
.Object |
A length-one |
... |
Arguments passed to |
p_attribute |
A p-attribute to decode, provided by a length-one
|
decode |
A length-one |
The p_attributes
-method returns the p-attributes defined for the
corpus the partition is derived from, if argument p_attribute
is
NULL
(the default). If p_attribute
is defined, the unique
values for the p-attribute are returned.
Stefan Evert & The OCWB Development Team, CQP Query Language Tutorial, https://cwb.sourceforge.io/files/CQP_Tutorial.pdf.
use(pkg = "RcppCWB", corpus = "REUTERS")
p_attributes("REUTERS")
p_attributes("REUTERS", p_attribute = "word")
merkel <- partition("GERMAPARLMINI", speaker = "Merkel", regex = TRUE)
merkel_words <- p_attributes(merkel, "word")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.