mytext <- c(
'do you like it? But I hate really bad dogs',
'I am the best friend.',
'Do you really like it? I\'m not happy'
)
sentiment(mytext)
sentiment_by(mytext)
get_sentences(sentiment_by(mytext))
(mysentiment <- sentiment_by(mytext, question.weight = 0))
stats::setNames(get_sentences(sentiment_by(mytext, question.weight = 0)),
round(mysentiment[["ave_sentiment"]], 3))
with(presidential_debates_2012, sentiment_by(dialogue, person))
(out <- with(presidential_debates_2012, sentiment_by(dialogue, list(person, time))))
plot(out)
plot(uncombine(out))
Run the code above in your browser using DataLab