Class to organize information of context analysis.
# S4 method for context
p_attributes(.Object)# S4 method for context
count(.Object)
# S4 method for context
sample(x, size)
# S4 method for context
enrich(.Object, s_attribute = NULL, p_attribute = NULL,
decode = FALSE, verbose = TRUE, ...)
# S4 method for context
trim(object, s_attribute = NULL, positivelist = NULL,
p_attribute = p_attributes(object), regex = FALSE, stoplist = NULL,
verbose = TRUE, progress = TRUE, ...)
object
a context object
integer indicating sample size
s-attribute(s) to add to data.table in cpos-slot
p-attribute(s) to add to data.table in cpos-slot
logical, whether to convert integer ids to expressive strings
logical, whether to be talkative
to maintain backwards compatibility if argument pAttribute is still used
a context object
tokens that are required to be present to keep a match
logical, whether positivlist / stoplist is interpreted as regular expressions
tokens that are used to exclude a match
logical, whether to show progress bar
queryObject of class "character", the query/node examined
countObject of class "numeric" number of hits
partitionObject of class "partition", the partition the context object is based on
size_partitionObject of class "integer" the size of the partition
leftObject of class "numeric" number of tokens to the left
rightObject of class "numeric" number of tokens to the right
sizeObject of class "numeric" number of tokens in the right and left context
s_attributeObject of class "character" s-attribute
p_attributeObject of class "character" p-attribute of the query
corpusObject of class "character" the CWB corpus used
statObject of class "data.table" statistics of the analysis
encodingObject of class "character" encoding of the corpus
cposObject of class "list" corpus positions of the hits
methodObject of class "character" statistical test used
callObject of class "character" call that generated the object
Objects of the class context include a data.table in the
slot cpos. The data.table will at least include the columns "hit_no",
"cpos" and "position".
The enrich-method can be used to add additional information to the data.table
in the "cpos"-slot of a context-object.