actor_fetcher: switched from binary word sentiment scores to proximity scores (cosine similarity)

master
Erik de Vries 5 years ago
parent 6f5ace8c52
commit a3e8dcf96e

@ -41,8 +41,8 @@ actor_fetcher <- function(out, sent_dict = NULL, cores = 1, localhost = NULL, va
filter(upos != 'PUNCT') %>% # For getting proper word counts filter(upos != 'PUNCT') %>% # For getting proper word counts
mutate(V1 = str_c(lemma,'_',upos)) %>% mutate(V1 = str_c(lemma,'_',upos)) %>%
left_join(sent_dict, by = 'V1') %>% left_join(sent_dict, by = 'V1') %>%
### Setting binary sentiment as unit of analysis # ### Setting binary sentiment as unit of analysis
mutate(V2 = V3) %>% # mutate(V2 = V3) %>%
group_by(sentence_id) %>% group_by(sentence_id) %>%
mutate( mutate(
V2 = case_when( V2 = case_when(

Loading…
Cancel
Save