Submitted by Campbell_MG t3_yz5pls in dataisbeautiful
IronicStrikes t1_iwy7y5f wrote
How do you do these? Looks like a lot of work.
MmM921 t1_iwyh7ho wrote
google "sentiment analysis", neural networks are used to analyse texts pretty widely these days on social media and what not
op probably took every sentence of these books and ran them through sentiment analysis to get this graph
Campbell_MG OP t1_iwyibbh wrote
Yeah, this is exactly right. There's a comment in here with a link to the model I've used.
tommy_chillfiger t1_iwywwwc wrote
I would be interested to see the same viz with a 'less granular unit' if that makes sense. Sorry I'm chronically weak on terminology lol - but instead of having the model classify every sentence, maybe every paragraph. It is so granular as it is now that it's hard to read intuitively, but I also suspect mood is more meaningful in literature over longer units than a single sentence on average.
I have never used ML models except for janky bespoke corpus analytics software in college linguistics classes so if there are computational reasons this approach wouldn't work then I get that.
lordicarus t1_iwz8c78 wrote
It also needs a category for general apathy. The four emotions here don't allow for complete neutrality which would 100% be possible with many sentences.
Like... The sentences above. Sad? Happy? Angry? Scared?
tommy_chillfiger t1_iwz93ka wrote
I'm gonna go with "politely critical" 🥴
Strong-Patience-2759 t1_iwz2lw4 wrote
Really beautiful. Thanks for the introduction to sentiment analysis.
rockingmonkey t1_iwywijt wrote
> op probably took every sentence of these books and ran them through sentiment analysis to get this graph
Op probably wrote some code to feed every sentence of these books and run them through sentiment analysis to get this graph. I doubt op spend 4 days just copy pasting lines one at a time and running them through the algorithm.
MmM921 t1_iwyx5a7 wrote
well duh, someone who knows how to use neural networks definitely knows how to use "sep = '.'"
aminervia t1_iwyc3s5 wrote
You could do a search for emotional words in the text without actually having to read the book. If each line is an emotional word then you could lay them out in order. Personally I couldn't do it but I could see how you could automate this pretty quickly
thepuksu t1_iwyll1f wrote
Imagine the horror of actually reading? r/bookscirclejerk
SquirrelAkl t1_iwyvbyx wrote
This would help you decide which books to read, based on how you want to feel.
thepuksu t1_iwywq5d wrote
I know, only joking :)
Viewing a single comment thread. View all comments