Viewing a single comment thread. View all comments

IronicStrikes t1_iwy7y5f wrote

How do you do these? Looks like a lot of work.

102

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

98

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.

56

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.

11

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?

5

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.

2

MmM921 t1_iwyx5a7 wrote

well duh, someone who knows how to use neural networks definitely knows how to use "sep = '.'"

5

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

22

thepuksu t1_iwyll1f wrote

Imagine the horror of actually reading? r/bookscirclejerk

13

SquirrelAkl t1_iwyvbyx wrote

This would help you decide which books to read, based on how you want to feel.

1