sentencizer: Changed output, removed lemma list and added separate positive and negative sentiment sums

master
Your Name 4 years ago
parent ecdb5be3b4
commit df7631b9f1

@ -50,9 +50,12 @@ sentencizer <- function(out, sent_dict = NULL, localhost = NULL, validation = F)
) )
) %>% ) %>%
summarise(sent_sum = sum(prox), summarise(sent_sum = sum(prox),
sent_sum_pos = sum(prox[prox>0]),
sent_sum_neg = sum(prox[prox<0]),
words = length(lemma), words = length(lemma),
sent_words = sum(prox != 0), sent_words = sum(prox != 0),
sent_lemmas = list(lem_u[prox != 0])) %>% # sent_lemmas = list(lem_u[prox != 0])
) %>%
mutate( mutate(
sent = sent_sum/words, sent = sent_sum/words,
arousal = sent_words/words arousal = sent_words/words

Loading…
Cancel
Save