configuration

0th

Percentile

Character Configuration

The function configuration(...) Creates drama configuration matrix as a QDConfiguration object, which is also a data.frame. The S3 function as.matrix() can be used to extract a numeric or logical matrix containing the core.

Usage
configuration(d, segment = c("Act", "Scene"), mode = c("Active",
  "Passive"), onlyPresence = FALSE)

# S3 method for QDConfiguration as.matrix(x, ...)

Arguments
d

A QDDrama object

segment

A character vector, either "Act" or "Scene". Partial matching allowed.

mode

Character vector, should be either "Active" or "Passive". Passive configurations express when characters are mentioned, active ones when they speak themselves. Please note that extracting passive configuration only makes sense if some form of coreference resolution has taken place on the text, either manually or automatic. If not, only very basic references (first person pronouns and proper names) are represented, which usually gives a very wrong impression.

onlyPresence

If TRUE, the function only records whether a character was presence. If FALSE (which is the default), the function counts the number of tokens spoken (active) or referenced (passive).

x

An object of class QDConfiguration

...

All other arguments are passwd to as.matrix.data.frame.

Value

Drama configuration matrix as a QDConfiguration object (of type data.frame).

Active and Passive Configurations

By default, we generate active matrices that are based on the character speech. A character is present in a scene or act, if they make an utterance. Using the argument mode, we can also create passive configuration matrices. They look very similar, but are based on who's mentioned in a scene or an act.

See Also

characterNames

Aliases
  • configuration
  • as.matrix.QDConfiguration
Examples
# NOT RUN {
# Active configuration matrix
data(rksp.0)
cfg <- configuration(rksp.0)

# Passive configuration matrix
cfg <- configuration(rksp.0, mode="Passive")

# }
Documentation reproduced from package DramaAnalysis, version 3.0.0, License: GPL (>= 3)

Community examples

Looks like there are no examples yet.