question_type(text.var, grouping.var = NULL, neg.cont = FALSE,
percent = TRUE, zero.replace = 0, digits = 2,
contraction = qdapDictionaries::contractions, bracket = "all",
amplifiers = qdapDictionaries::amplification.words, ...)
NULL
generates one word list for all text. Also
takes a single grouping variable or a list of 1 or more
grouping variables.TRUE
provides
separate counts for the negative contraction forms of the
interrogative words.TRUE
output given as
percent. If FALSE
the output is proportion.contractions
data se"curly"
, "square"
, "round"
,
"angle"
and "all"
. These strings
correspond to: {, [, (, < or aamplification.words
data
set.bracketX
.tot.quest
) and counts
of question types (initial interrogative word) by grouping
variable(s).colcomb2class
,
bracketX
## Inspect the algorithm classification
x <- c("Kate's got no appetite doesn't she?",
"Wanna tell Daddy what you did today?",
"You helped getting out a book?", "umm hum?",
"Do you know what it is?", "What do you want?",
"Who's there?", "Whose?", "Why do you want it?",
"Want some?", "Where did it go?", "Was it fun?")
left_just(preprocessed(question_type(x))[, c(2, 6)])
## Transcript/dialogue examples
(x <- question_type(DATA.SPLIT$state, DATA.SPLIT$person))
## methods
scores(x)
plot(scores(x))
counts(x)
plot(counts(x))
proportions(x)
plot(proportions(x))
truncdf(preprocessed(x), 15)
plot(preprocessed(x))
plot(x)
plot(x, label = TRUE)
plot(x, label = TRUE, text.color = "red")
question_type(DATA.SPLIT$state, DATA.SPLIT$person, percent = FALSE)
DATA[8, 4] <- "Won't I distrust you?"
question_type(DATA.SPLIT$state, DATA.SPLIT$person)
DATA <- qdap::DATA
with(DATA.SPLIT, question_type(state, list(sex, adult)))
out1 <- with(mraja1spl, question_type(dialogue, person))
## out1
out2 <- with(mraja1spl, question_type(dialogue, list(sex, fam.aff)))
## out2
out3 <- with(mraja1spl, question_type(dialogue, list(sex, fam.aff),
percent = FALSE))
plot(out3, label = TRUE, lab.digits = 3)
Run the code above in your browser using DataLab