Description Usage Arguments Details Value Warning References Examples
Transcript apply formality score by grouping variable(s) and optionally plot the breakdown of the model.
1 2 |
text.var |
The text variable (or an object from
|
grouping.var |
The grouping variables. Default NULL generates formality score for all text. Also takes a single grouping variable or a list of 1 or more grouping variables. |
sort.by.formality |
logical. If TRUE orders the results by formality score. |
digits |
The number of digits displayed. |
... |
Other arguments passed to
|
Heylighen & Dewaele(2002)'s formality score is calculated as:
F = 50(\frac{n_{f}-n_{c}}{N} + 1)
Where:
f = ≤ft \{noun, \;adjective, \;preposition, \;article\right \}
c = ≤ft \{pronoun, \;verb, \;adverb, \;interjection\right \}
N = ∑{(f \;+ \;c \;+ \;conjunctions)}
A list containing at the following components:
text |
The text variable |
POStagged |
Raw part of speech for every word of the text variable |
POSprop |
Part of speech proportion for every word of the text variable |
POSfreq |
Part of speech count for every word of the text variable |
pos.by.freq |
The part of speech count for every word of the text variable by grouping variable(s) |
pos.by.prop |
The part of speech proportion for every word of the text variable by grouping variable(s) |
form.freq.by |
The nine broad part of speech categories count for every word of the text variable by grouping variable(s) |
form.prop.by |
The nine broad part of speech categories proportion for every word of the text variable by grouping variable(s) |
formality |
Formality scores by grouping variable(s) |
pos.reshaped |
An expanded formality scores output (grouping, word.count, pos & form.class) by word |
Heylighen & Dewaele(2002) state, "At present, a sample would probably need to contain a few hundred words for the measure to be minimally reliable. For single sentences, the F-value should only be computed for purposes of illustration".
Heylighen, F., & Dewaele, J.M. (2002). Variation in the contextuality of language: An empirical measure. Context in Context, Special issue of Foundations of Science, 7 (3), 293-340.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | with(DATA, formality(state, person))
(x1 <- with(DATA, formality(state, list(sex, adult))))
plot(x1)
plot(x1, short.names = TRUE)
data(rajPOS) #A data set consisting of a pos list object
x2 <- with(raj, formality(rajPOS, act))
plot(x2)
x3 <- with(raj, formality(rajPOS, person))
plot(x3, bar.colors="Dark2")
plot(x3, bar.colors=c("Dark2", "Set1"))
x4 <- with(raj, formality(rajPOS, list(person, act)))
plot(x4, bar.colors=c("Dark2", "Set1"))
rajDEM <- key_merge(raj, raj.demographics) #merge demographics with transcript.
x5 <- with(rajDEM, formality(rajPOS, sex))
plot(x5, bar.colors="RdBu")
x6 <- with(rajDEM, formality(rajPOS, list(fam.aff, sex)))
plot(x6, bar.colors="RdBu")
x7 <- with(rajDEM, formality(rajPOS, list(died, fam.aff)))
plot(x7, bar.colors="RdBu", point.cex=2, point.pch = 3)
x8 <- with(rajDEM, formality(rajPOS, list(died, sex)))
plot(x8, bar.colors="RdBu", point.cex=2, point.pch = "|")
names(x8)
colsplit2df(x8$formality)
#pass an object from pos or pos.by
ltruncdf(with(raj, formality(x8 , list(act, person))), 6, 4)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.