metis project 4: character interactions in harry potter books

13
The Tale of Harry and Snape: Modeling Character Interactions in Harry Potter Jamie Fradkin March 4, 2016

Upload: jamie-fradkin

Post on 25-Jan-2017

198 views

Category:

Data & Analytics


3 download

TRANSCRIPT

Page 1: Metis Project 4: Character Interactions in Harry Potter books

The Tale of Harry and Snape:Modeling Character Interactions in Harry Potter

Jamie FradkinMarch 4, 2016

Page 2: Metis Project 4: Character Interactions in Harry Potter books

What can you do with

7 amazing books198 thrilling chapters

1,084,170 expertly selected words?*

*yes, I am a big fan of the series

Page 3: Metis Project 4: Character Interactions in Harry Potter books

Look at character interactions

Page 4: Metis Project 4: Character Interactions in Harry Potter books

How did I define an interaction?harry had tea with hagrid to look forward to because the potions lesson turned out to be the worst thing that had happened to him so far at the banquet. he knew hed been wrong. snape didnt dislike harry, he hated him. potions lessons took place down in one of the dungeons it was colder here than up in the main castle and would have been quite creepy enough without the pickled animals floating in glass jars all around the walls snape. snape, like flitwick, started the class by taking the roll call and, like flitwick, he paused at harrys name. ah yes, he said softly, harry potter our new celebrity. draco malfoy and his friends crabbe and goyle sniggered behind their hands. snape, harry, and ron exchanged looks with raised eyebrows. hermione granger was on the edge of her seat and looked desperate to start proving that she wasnt a dunderhead. potter, said snape suddenly, what would i get if i added powdered root of asphodel to an infusion of wormwood powdered root of what to an infusion of what. harry forced himself to keep looking straight into those cold eyes he had looked through his books at the dursleys but did snape expect him to remember everything in one thousand magical herbs and fungi. snape was still ignoring hermiones quivering hand. what is the difference, potter, between monkshood and wolfsbane. at this, hermione stood up her hand stretching toward the dungeon ceiling. i dont know, said harry. snape was still ignoring hermiones quivering hand. what is the difference potter between monkshood and wolfsbane. at this hermione stood up her hand stretching toward the dungeon ceiling. i dont know, said harry. i think hermione does though, why dont you try her. a few people laughed. harry caught seamuss eye and seamus winked. snape spat at seamus then he rounded on harry. harry opened his mouth to argue but ron kicked him behind their cauldron. harry told hagrid about snapes lesson. hagrid, like ron, told harry not to worry about it that liked hardly any of the students. but he seemed to really hate me. rubbish, said hagrid why should he. yet harry thought that none of the lessons hed had so far had given him as much to think about as tea with hagrid had. hagrid collected that package just in time. where was it now. and did hagrid know something about snape that he didnt want to tell harry.

Page 5: Metis Project 4: Character Interactions in Harry Potter books

How did I define an interaction?Appearance of two names within 50 non-”stopwords” of each other

harry had tea with hagrid to look forward to because the potions lesson turned out to be the worst thing that had happened to him so far at the banquet. he knew hed been wrong. snape didnt dislike harry, he hated him. potions lessons took place down in one of the dungeons it was colder here than up in the main castle and would have been quite creepy enough without the pickled animals floating in glass jars all around the walls snape. snape, like flitwick, started the class by taking the roll call and, like flitwick, he paused at harrys name. ah yes, he said softly, harry potter our new celebrity. draco malfoy and his friends crabbe and goyle sniggered behind their hands. snape, harry, and ron exchanged looks with raised eyebrows. hermione granger was on the edge of her seat and looked desperate to start proving that she wasnt a dunderhead. potter, said snape suddenly, what would i get if i added powdered root of asphodel to an infusion of wormwood powdered root of what to an infusion of what. harry forced himself to keep looking straight into those cold eyes he had looked through his books at the dursleys but did snape expect him to remember everything in one thousand magical herbs and fungi. snape was still ignoring hermiones quivering hand. what is the difference, potter, between monkshood and wolfsbane. at this, hermione stood up her hand stretching toward the dungeon ceiling. i dont know, said harry. snape was still ignoring hermiones quivering hand. what is the difference potter between monkshood and wolfsbane. at this hermione stood up her hand stretching toward the dungeon ceiling. i dont know, said harry. i think hermione does though, why dont you try her. a few people laughed. harry caught seamuss eye and seamus winked. snape spat at seamus then he rounded on harry. harry opened his mouth to argue but ron kicked him behind their cauldron. harry told hagrid about snapes lesson. hagrid, like ron, told harry not to worry about it that liked hardly any of the students. but he seemed to really hate me. rubbish, said hagrid why should he. yet harry thought that none of the lessons hed had so far had given him as much to think about as tea with hagrid had. hagrid collected that package just in time. where was it now. and did hagrid know something about snape that he didnt want to tell harry.

Page 6: Metis Project 4: Character Interactions in Harry Potter books

Which interaction is the most fascinating?

Link weights correspond to count of interactions between characters.

Page 7: Metis Project 4: Character Interactions in Harry Potter books

Which interaction is the most fascinating?

Link weights correspond to count of interactions between characters.

Page 8: Metis Project 4: Character Interactions in Harry Potter books

Objective

Use sentiment analysis and topic modeling to create an overview of

Harry and Snape’s relationship throughout the Harry Potter series.

Page 9: Metis Project 4: Character Interactions in Harry Potter books

Text variation over time

Page 10: Metis Project 4: Character Interactions in Harry Potter books

Text variation over time

Page 11: Metis Project 4: Character Interactions in Harry Potter books

Topic (via LDA) and Sentiment Variation over Time

Page 12: Metis Project 4: Character Interactions in Harry Potter books

snape said know idea like professor wrong think quite dislike

harry potions office hurried fast severus sense thumping darkened friends

snape felt rush rang leading coldly fingers knows away fell

detention holiday nasty spellbooks years street broomstick cauldron garden seized

snape watching ask impatient disbelief ignoring asked went right

healed said snape silver time leaving merely fade raised younger

snape home girl kneeling injured huge holding harry hand ginny

Topic (via LDA) and Sentiment Variation over Time

Page 13: Metis Project 4: Character Interactions in Harry Potter books

Conclusion• tf-idf accurately identified important words in each book that stood

out compared to others in the series• LDA worked well to pick up on variation in topics and themes for each

chapter

Future Work• Explore various clustering methods and compare performance to LDA• Perform analysis solely on dialogue or descriptions rather than entire

corpus