removed arousal measures

master
Erik de Vries 4 years ago
parent 4a0f2206fd
commit 523d86799c

@ -34,7 +34,7 @@ actor_merger <- function(df, actors_meta = NULL, actor_groups = NULL, pos_cutoff
actor.sent = sum(sent_binary_weighted)/sum(words), actor.sent = sum(sent_binary_weighted)/sum(words),
actor.sent_words = sum(sent_words), actor.sent_words = sum(sent_words),
actor.words = sum(words), actor.words = sum(words),
actor.arousal = sum(abs(sent_binary_weighted))/sum(words), # actor.arousal = sum(abs(sent_binary_weighted))/sum(words),
actor.first = first(sentence_id), actor.first = first(sentence_id),
actor.occ = .N, actor.occ = .N,
publication_date = first(publication_date), publication_date = first(publication_date),
@ -84,7 +84,7 @@ actor_merger <- function(df, actors_meta = NULL, actor_groups = NULL, pos_cutoff
.(text.sent = sum(sent_binary_weighted)/sum(words), .(text.sent = sum(sent_binary_weighted)/sum(words),
text.sent_words = sum(sent_words), text.sent_words = sum(sent_words),
text.words = sum(words), text.words = sum(words),
text.arousal = sum(abs(sent_binary_weighted))/sum(words), # text.arousal = sum(abs(sent_binary_weighted))/sum(words),
text.sentences = .N, text.sentences = .N,
doctype = first(doctype), doctype = first(doctype),
publication_date = first(publication_date) publication_date = first(publication_date)
@ -109,7 +109,7 @@ actor_merger <- function(df, actors_meta = NULL, actor_groups = NULL, pos_cutoff
.(noactor.sent = sum(sent_binary_weighted)/sum(words), .(noactor.sent = sum(sent_binary_weighted)/sum(words),
noactor.sent_words = sum(sent_words), noactor.sent_words = sum(sent_words),
noactor.words = sum(words), noactor.words = sum(words),
noactor.arousal = sum(abs(sent_binary_weighted))/sum(words), # noactor.arousal = sum(abs(sent_binary_weighted))/sum(words),
noactor.first = first(sentence_id), noactor.first = first(sentence_id),
noactor.occ = .N noactor.occ = .N
), by = list(id)] ), by = list(id)]
@ -118,7 +118,7 @@ actor_merger <- function(df, actors_meta = NULL, actor_groups = NULL, pos_cutoff
.(actor.sent = sum(sent_binary_weighted)/sum(words), .(actor.sent = sum(sent_binary_weighted)/sum(words),
actor.sent_words = sum(sent_words), actor.sent_words = sum(sent_words),
actor.words = sum(words), actor.words = sum(words),
actor.arousal = sum(abs(sent_binary_weighted))/sum(words), # actor.arousal = sum(abs(sent_binary_weighted))/sum(words),
actor.first = first(sentence_id), actor.first = first(sentence_id),
actor.occ = .N, actor.occ = .N,
publication_date = first(publication_date), publication_date = first(publication_date),
@ -128,7 +128,7 @@ actor_merger <- function(df, actors_meta = NULL, actor_groups = NULL, pos_cutoff
.(actor.sent = sum(sent_binary_weighted)/sum(words), .(actor.sent = sum(sent_binary_weighted)/sum(words),
actor.sent_words = sum(sent_words), actor.sent_words = sum(sent_words),
actor.words = sum(words), actor.words = sum(words),
actor.arousal = sum(abs(sent_binary_weighted))/sum(words), # actor.arousal = sum(abs(sent_binary_weighted))/sum(words),
actor.first = first(sentence_id), actor.first = first(sentence_id),
actor.occ = .N, actor.occ = .N,
publication_date = first(publication_date), publication_date = first(publication_date),
@ -138,7 +138,7 @@ actor_merger <- function(df, actors_meta = NULL, actor_groups = NULL, pos_cutoff
.(actor.sent = sum(sent_binary_weighted)/sum(words), .(actor.sent = sum(sent_binary_weighted)/sum(words),
actor.sent_words = sum(sent_words), actor.sent_words = sum(sent_words),
actor.words = sum(words), actor.words = sum(words),
actor.arousal = sum(abs(sent_binary_weighted))/sum(words), # actor.arousal = sum(abs(sent_binary_weighted))/sum(words),
actor.first = first(sentence_id), actor.first = first(sentence_id),
actor.occ = .N, actor.occ = .N,
publication_date = first(publication_date), publication_date = first(publication_date),
@ -154,7 +154,7 @@ actor_merger <- function(df, actors_meta = NULL, actor_groups = NULL, pos_cutoff
.(actor.sent = sum(sent_binary_weighted)/sum(words), .(actor.sent = sum(sent_binary_weighted)/sum(words),
actor.sent_words = sum(sent_words), actor.sent_words = sum(sent_words),
actor.words = sum(words), actor.words = sum(words),
actor.arousal = sum(abs(sent_binary_weighted))/sum(words), # actor.arousal = sum(abs(sent_binary_weighted))/sum(words),
actor.first = first(sentence_id), actor.first = first(sentence_id),
actor.occ = .N, actor.occ = .N,
publication_date = first(publication_date)), by = list(id, ids)] publication_date = first(publication_date)), by = list(id, ids)]
@ -194,7 +194,7 @@ actor_merger <- function(df, actors_meta = NULL, actor_groups = NULL, pos_cutoff
actor.sent = sum(sent_binary_weighted)/sum(words), actor.sent = sum(sent_binary_weighted)/sum(words),
actor.sent_words = sum(sent_words), actor.sent_words = sum(sent_words),
actor.words = sum(words), actor.words = sum(words),
actor.arousal = sum(abs(sent_binary_weighted))/sum(words), # actor.arousal = sum(abs(sent_binary_weighted))/sum(words),
actor.first = first(sentence_id), actor.first = first(sentence_id),
actor.occ = .N, actor.occ = .N,
publication_date = first(publication_date) publication_date = first(publication_date)
@ -209,7 +209,7 @@ actor_merger <- function(df, actors_meta = NULL, actor_groups = NULL, pos_cutoff
actor.sent = sum(sent_binary_weighted)/sum(words), actor.sent = sum(sent_binary_weighted)/sum(words),
actor.sent_words = sum(sent_words), actor.sent_words = sum(sent_words),
actor.words = sum(words), actor.words = sum(words),
actor.arousal = sum(abs(sent_binary_weighted))/sum(words), # actor.arousal = sum(abs(sent_binary_weighted))/sum(words),
actor.first = first(sentence_id), actor.first = first(sentence_id),
actor.occ = .N, actor.occ = .N,
publication_date = first(publication_date) publication_date = first(publication_date)

@ -107,10 +107,10 @@ sentencizer <- function(out, sent_dict = NULL, localhost = NULL, validation = F)
text.words = sum(words), text.words = sum(words),
text.sent_words = sum(sent_words), text.sent_words = sum(sent_words),
text.sentences = n() text.sentences = n()
) %>% ) #%>%
mutate( # mutate(
text.arousal = text.sent_words/text.words # text.arousal = text.sent_words/text.words
) # )
} else { } else {
text_sent <- out %>% text_sent <- out %>%

Loading…
Cancel
Save