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
query
Object of class "character"
, the query/node examined
count
Object of class "numeric"
number of hits
partition
Object of class "partition"
, the partition the context object is based on
size_partition
Object of class "integer"
the size of the partition
left
Object of class "numeric"
number of tokens to the left
right
Object of class "numeric"
number of tokens to the right
size
Object of class "numeric"
number of tokens in the right and left context
s_attribute
Object of class "character"
s-attribute
p_attribute
Object of class "character"
p-attribute of the query
corpus
Object of class "character"
the CWB corpus used
stat
Object of class "data.table"
statistics of the analysis
encoding
Object of class "character"
encoding of the corpus
cpos
Object of class "list"
corpus positions of the hits
method
Object of class "character"
statistical test used
call
Object 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.