Learn R Programming

polmineR (version 0.7.4)

context-class: Context class.

Description

Class to organize information of context analysis.

Usage

# S4 method for context
sample(x, size)

# S4 method for context count(.Object)

# S4 method for context enrich(.Object, sAttribute = NULL, pAttribute = NULL, id2str = FALSE, verbose = TRUE)

# S4 method for context trim(object, sAttribute = NULL, verbose = TRUE, progress = TRUE)

Arguments

x

a context object

size

integer indicating sample size

.Object

object

sAttribute

s-attribute(s) to add to data.table in cpos-slot

pAttribute

p-attribute(s) to add to data.table in cpos-slot

id2str

logical, whether to convert integer ids to expressive strings

verbose

logical, whether to be talkative

object

a context object

progress

logical, whether to show progress bar

Slots

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

partitionSize

Object of class "numeric" 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

sAttribute

Object of class "character" s-attribute

pAttribute

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

Details

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.