big modernism

62
Topic Modeling for Literary Analysis Big Modernism Belaid Moa, PhD Computing Specialist, Compute Canada Jana Millar Usiskin PhD Student, Department of English

Upload: janamu

Post on 22-Nov-2014

135 views

Category:

Data & Analytics


0 download

DESCRIPTION

Presentation given by Belaid Moa (Compute Canada) and Jana Millar Usiskin (Modernist Versions Project, Maker Lab in the Humanities) at the University of Victoria, April 2014. Addressed new methods for analyzing modernist literature as Big Data.

TRANSCRIPT

Page 1: Big Modernism

Topic Modeling for Literary AnalysisBig Modernism

Belaid Moa, PhDComputing Specialist, Compute CanadaJana Millar UsiskinPhD Student, Department of English

Page 2: Big Modernism

THE Challenge

Page 3: Big Modernism

THE PROCESS

Page 4: Big Modernism

If text analysis is to participate in literary critical endeavor in some manner beyond fact-checking, it must endeavor to assist the critic in the unfolding of interpretive possibilities. [. . .] The evidence we seek is not definitive, but suggestive of grander arguments and schemes.

Stephen Ramsay

Interpretive Possibilities

DEFINING

Page 5: Big Modernism

The Data SetAGGREGATING

Page 6: Big Modernism

metadata (xml) text (txt)

PreprocessINGcleaning text

Page 7: Big Modernism

PreprocessINGprepping for maximum interpretation

Page 8: Big Modernism

Learn from seen (large) dataPatterns, Properties, etc.

Perform well on unseen (large) dataPredictDecideClassify

“Torture data” just right

What is Machine Learning?

Analyzing

Page 9: Big Modernism

As simple as possible but not simpler.

Machine Learning

Page 10: Big Modernism

Machine Learning

Process

Page 11: Big Modernism

Categorization

Machine Learning

Labeled data

Unlabeled data

Rewarded data

Page 12: Big Modernism

Probabilistic/Bayesian Learning

Unsupervised Learning

Page 13: Big Modernism

Topic Modeling

BAYESIAN Learning

Find hidden (thematic) patterns/topics in documents

Produce labels according to the patterns

Understand, organize, search and summarize the collection of documents

Page 14: Big Modernism

Simple Idea!

process

Topic 1

Topic 3

Topic 2

Mrs Dalloway

Ulysses

house

Time

man ChildDay

Page 15: Big Modernism

Documents as a mixture of topics

LDA

Document 1

Document 2

Page 16: Big Modernism

Topics as a mixture of words

LDA

Topic 1arabs 0.023army 0.016railway 0.0146day 0.0144….

Topic 2God 0.020Father 0.0160soul 0.0135Sin 0.0080Priest0.00798….

Topic 3time 0.0129father 0.0107Sister 0.00677room 0.00676House 0.0066….

Page 17: Big Modernism

Topics as distributions on words

LDA

Topic 1

Topic 2

Topic 3

Page 18: Big Modernism

Generative Process

LDA

For each topic Tp,a)Choose a distribution pTp over wordsFor each novel Li:Choose a distribution pLi over K topicsfor each word in Li:

a) Draw one of the K topics, Tj, according to pLi

b) Draw one of the V words according to pTj

Page 19: Big Modernism
Page 20: Big Modernism
Page 21: Big Modernism

LDA NovelsLDA

children room room room people house house room afternoon doctor afternoon children room house children house doctor girl afternoon house night doctor room children afternoon children room house afternoon children

Novel 1

room afternoon doctor children house afternoon night children children children children room house afternoon people doctor house house doctor room doctor afternoon doctor room room house doctor afternoon children room

Novel 2

Page 22: Big Modernism

Graphical ModelLDA

ND

K

Page 23: Big Modernism

For Big Modernism

LDA

LDA(mallet train-topics

…)

Corpus

Filter

Topic & word Distributions

Exploration

Page 24: Big Modernism

Processingstreamlined script

Page 25: Big Modernism

Though the machine does a very good job in identifying the topics latent in a corpus, the machine does a comparatively poor job when it comes to auto-identifying which of the harvest topics are the most interpretable by human beings.

- Matt Jockers, Macroanalysis

Interpretation

post-processing

Page 26: Big Modernism

3SENSORY EXPERIENCE OF TEMPORALITYtime felt day looked knew work face hand night

18 TIME EMBODIEDeyes face life time white dark round hand head

26 INHABITING SPACESmen people began room house talk suddenly end years

TOPIC INDEX

Modernist Novels

Page 27: Big Modernism
Page 28: Big Modernism

Time Embodied

Inhabiting Everyday Spaces

POST-PROCESSINGLabeling Most Modernist Topics

Sensory Experienc

e of Temporali

ty

Page 29: Big Modernism

Sensory Experience of Temporality

POST-PROCESSING

Page 30: Big Modernism

Sensory Experience of Temporality

POST-PROCESSING

Page 31: Big Modernism

Inhabiting Spaces

POST-PROCESSING

Page 32: Big Modernism

Inhabiting Spaces

POST-PROCESSING

Page 33: Big Modernism

Time Embodied

POST-PROCESSING

Page 34: Big Modernism

Time Embodied

POST-PROCESSING

Page 35: Big Modernism

POST-PROCESSINGDistribution Table

Page 36: Big Modernism

Heart of Darkness >>> Lord Jim 0.052

Heart of Darkness >>> Secret Agent 0.809

Lord Jim >>> Secret Agent 0.729

Mrs. Dalloway >>> The Waves 0.586

The Great Gatsby >>> Tender is the Night 0.132

Autobiography of Alice B. Toklas >>> Three Lives 6.993

POST-PROCESSINGAuthor Distances

Page 37: Big Modernism

Top 10 Generic Modernist Novels

POST-PROCESSING

The AmbassadorsHoward’s EndTwilight SleepThe CaptiveThe Good SoldierThe AwakeningLord JimThe WavesHeart of Darkness

Page 38: Big Modernism

Top 10 Generic Modernist Novels

POST-PROCESSING

Mrs. DallowayThe AmbassadorsHoward’s EndTwilight SleepThe CaptiveThe Good SoldierThe AwakeningLord JimThe WavesHeart of Darkness

Page 39: Big Modernism

Top 10 UniqueModernist Novels

POST-PROCESSING

Seven PillarsThe TrialBabbittThe Autobiography of Alice B. ToklasThree LivesTime RegainedNightwood1984Passage to India

Page 40: Big Modernism

Top 10 UniqueModernist Novels

POST-PROCESSING

UlyssesSeven PillarsThe TrialBabbittThe Autobiography of Alice B. ToklasThree LivesTime RegainedNightwood1984Passage to India

Page 41: Big Modernism

Clustering

MachineLearning

Page 42: Big Modernism

Affinity Propagation

Clustering

Page 43: Big Modernism

Affinity Propagation

Clustering

Page 44: Big Modernism

Affinity Propagation

ClusteringExemplar

Page 45: Big Modernism
Page 46: Big Modernism

Cluster 1, exemplar Tender is the Night:The Awakening (Chopin), Heart of Darkness (Conrad), Lord Jim (Conrad), The Secret Agent (Conrad), The Great Gatsby (Fitzgerald), Tender is the Night (Fitzgerald), The Trial (Kafka), Babbitt (S. Lewis), Tarr (W. Lewis), 1984 (Orwell), Burmese Days (Orwell), The Autobiography of Alice B. Toklas (Stein), Twilight Sleep (Wharton)

Cluster 2, exemplar Ulysses:Nightwood (Barnes), A Passage to India (Forster), Tess of the D’Urbervilles (Hardy), The Dubliners (Joyce), Portrait of the Artist as a Young Man (Joyce), Ulysses (Joyce)

Cluster 3, exemplar Seven Pillars of Wisdom:Seven Pillars of Wisdom (Lawrence)

Cluster 4, exemplar Time Regained:The Ambassadors (James), The Captive (Proust), Time Regained (Proust)

Cluster 5, exemplar Mrs. Dalloway:The Good Soldier (Ford), Howard’s End (Forster), Sons and Lovers (Lawrence), Women in Love (Lawrence), Of Human Bondage (Maugham), Three Lives (Stein), The Picture of Dorian Gray (Wilde), Mrs. Dalloway (Woolf), The Waves (Woolf)

POST-PROCESSINGMODERNISM SUB-CLUSTERS

Page 47: Big Modernism

Cluster 1, exemplar Tender is the Night:The Awakening (Chopin), Heart of Darkness (Conrad), Lord Jim (Conrad), The Secret Agent (Conrad), The Great Gatsby (Fitzgerald), Tender is the Night (Fitzgerald), The Trial (Kafka), Babbitt (S. Lewis), Tarr (W. Lewis), 1984 (Orwell), Burmese Days (Orwell), The Autobiography of Alice B. Toklas (Stein), Twilight Sleep (Wharton)

Cluster 2, exemplar Ulysses:Nightwood (Barnes), A Passage to India (Forster), Tess of the D’Urbervilles (Hardy), The Dubliners (Joyce), Portrait of the Artist as a Young Man (Joyce), Ulysses (Joyce)

Cluster 3, exemplar Seven Pillars of Wisdom:Seven Pillars of Wisdom (Lawrence)

Cluster 4, exemplar Time Regained:The Ambassadors (James), The Captive (Proust), Time Regained (Proust)

Cluster 5, exemplar Mrs. Dalloway:The Good Soldier (Ford), Howard’s End (Forster), Sons and Lovers (Lawrence), Women in Love (Lawrence), Of Human Bondage (Maugham), Three Lives (Stein), The Picture of Dorian Gray (Wilde), Mrs. Dalloway (Woolf), The Waves (Woolf)

POST-PROCESSINGMODERNISM SUB-CLUSTERS

Page 48: Big Modernism

Affinity Propagation on Modernism

POST-PROCESSING

Page 49: Big Modernism

Affinity Propagation on Modernism

POST-PROCESSING

Page 50: Big Modernism
Page 51: Big Modernism

10GIFTS and SOCIETYgive felt time father mind people speak present poor

26 EMBODIED TIMEtime face hand eyes day looked place house turned

17FAMILY RELATIONSsister family mother friend manner feelings time morning father

27BODIES IN SPACEnight half round room eye eyes sat heard head

TOPIC INDEX

19th-Century Novels

Page 52: Big Modernism

Sensory Experience of Temporality

POST-PROCESSING

Family Relation

s

Embodied Time

Gifts and Social

Relations

Page 53: Big Modernism

Cluster 1, exemplar Emma (Austen):Emma (Austen), Pride and Prejudice (Austen), Persuasion (Austen)

Cluster 2, exemplar Villette (Brontë):Jane Eyre (Brontë), Villette (Brontë)

Cluster 3, exemplar A Tale of Two Cities (Dickens):A Tale of Two Cities (Dickens)

Cluster 4, exemplar Great Expectations (Dickens):Great Expectations (Dickens), Oliver Twist (Dickens), North and South (Gaskell), The Portrait of a Lady (James), The Turn of the Screw (James)

Cluster 5, exemplar Middlemarch (Eliot):Middlemarch (Eliot), Silas Marner (Eliot), The Mill on the Floss (Eliot), The Return of the Native (Eliot)

POST-PROCESSINGMODERNISM SUB-CLUSTERS

Page 54: Big Modernism

47TIME EMBODIEDface eyes time hand head night house turned looked

18 WOMEN, TIME, AND SPACEtime day mind room woman life years place heard

8SENSORY INTERPRETATIONfelt sense fact question face life present eyes light

TOPICS

Modernism and 19th-Century Novels

Page 55: Big Modernism

Cluster 1, exemplar Tender is the Night: Nightwood, The Awakening, Heart of Darkness, Lord Jim, The Great Gatsby, Tender is

the Night, Babbitt, Tarr, 1984, The Captive, Time Regained, The Autobiography of Alice B. Toklas, Twilight Sleep

Cluster 2, exemplar A Passage to India: The Good Soldier, A Passage to India, The Trial, Burmese Days

Cluster 3, exemplar Ulysses: The Secret Agent, Dubliners, Portrait of the Artist, Ulysses, North and South

Cluster 4, exemplar Seven Pillars of Wisdom: Seven Pillars of Wisdom

Cluster 5, exemplar Mrs. Dalloway: Howard’s End, Women in Love, Sons and Lovers, Of Human Bondage, Three Lives,

The Picture of Dorian Gray, Mrs. Dalloway, The WavesCluster 6, exemplar Emma:

Emma, Persuasion, Pride and PrejudiceCluster 7, exemplar Great Expectations:

A Tale of Two Cities, Great Expectations, Oliver TwistCluster 8, exemplar Silas Marner:

Tess of the D’Urbervilles, Middlemarch, Silas Marner, The Mill on the Floss, Return of the Native

Cluster 9, exemplar The Turn of the Screw: The Ambassadors, The Turn of the Screw, Jane Eyre, Villette, The Portrait of a Lady,

The Turn of the Screw

POST-PROCESSINGMODERNISM AND 19th-CENTURY SUB-CLUSTERS

Page 56: Big Modernism

Cluster 1, exemplar Tender is the Night: Nightwood, The Awakening, Heart of Darkness, Lord Jim, The Great Gatsby, Tender is

the Night, Babbitt, Tarr, 1984, The Captive, Time Regained, The Autobiography of Alice B. Toklas, Twilight Sleep

Cluster 2, exemplar A Passage to India: The Good Soldier, A Passage to India, The Trial, Burmese Days

Cluster 3, exemplar Ulysses: The Secret Agent, Dubliners, Portrait of the Artist, Ulysses, North and South

Cluster 4, exemplar Seven Pillars of Wisdom: Seven Pillars of Wisdom

Cluster 5, exemplar Mrs. Dalloway: Howard’s End, Women in Love, Sons and Lovers, Of Human Bondage, Three Lives,

The Picture of Dorian Gray, Mrs. Dalloway, The WavesCluster 6, exemplar Emma:

Emma, Persuasion, Pride and PrejudiceCluster 7, exemplar Great Expectations:

A Tale of Two Cities, Great Expectations, Oliver TwistCluster 8, exemplar Silas Marner:

Tess of the D’Urbervilles, Middlemarch, Silas Marner, The Mill on the Floss, Return of the Native

Cluster 9, exemplar The Turn of the Screw: The Ambassadors, The Turn of the Screw, Jane Eyre, Villette, The Portrait of a Lady,

The Turn of the Screw

POST-PROCESSINGMODERNISM AND 19th-CENTURY SUB-CLUSTERS

Page 57: Big Modernism

Cluster 1, exemplar Tender is the Night:The Awakening, The Great Gatsby, The Good Soldier, Howard’s End, A Passage to India, The Ambassadors, The Trial, Seven Pillars of Wisdom, Women in Love, Babbitt, Tarr, Of Human Bondage, 1984, Burmese Days, The Captive, Time Regained, The Autobiography of Alice B., Three Lives, Emma, Persuasion, Pride and Prejudice, Middlemarch, The Mill on the Floss, The Portrait of a Lady, The Turn of the Screw

Cluster 2, exemplar Ulysses:Nightwood, Heart of Darkness, Lord Jim, The Secret Agent, Tess of the D’Urbervilles, Dubliners, Portrait of the Artist, Sons and Lovers, Twilight Sleep, The Picture of Dorian Gray, Mrs. Dalloway, The Waves, Jane Eyre, Villette, A Tale of Two Cities, Great Expectations, Oliver Twist, Silas Marner, North and South, Return of the Native

POST-PROCESSINGMODERNISM AND 19th-CENTURY SUB-CLUSTERS

Page 58: Big Modernism

Cluster 1, exemplar Tender is the Night:The Awakening, The Great Gatsby, The Good Soldier, Howard’s End, A Passage to India, The Ambassadors, The Trial, Seven Pillars of Wisdom, Women in Love, Babbitt, Tarr, Of Human Bondage, 1984, Burmese Days, The Captive, Time Regained, The Autobiography of Alice B., Three Lives, Emma, Persuasion, Pride and Prejudice, Middlemarch, The Mill on the Floss, The Portrait of a Lady, The Turn of the Screw

Cluster 2, exemplar Ulysses:Nightwood, Heart of Darkness, Lord Jim, The Secret Agent, Tess of the D’Urbervilles, Dubliners, Portrait of the Artist, Sons and Lovers, Twilight Sleep, The Picture of Dorian Gray, Mrs. Dalloway, The Waves, Jane Eyre, Villette, A Tale of Two Cities, Great Expectations, Oliver Twist, Silas Marner, North and South, Return of the Native

POST-PROCESSINGMODERNISM AND 19th-CENTURY SUB-CLUSTERS

Page 59: Big Modernism

Mystery NovelsINFERENCE

Example: Given X.txt, Y.txt, and Z.txt novels, find the closest novel

Page 60: Big Modernism

Profiling the texts

INFERENCE

Mystery

TextsXYZ

Mystery Texts, Topic Inference

Page 61: Big Modernism

INFERENCESimilarity to other novels

Page 62: Big Modernism

Modernist Versions ProjectCompute Canada

Maker Lab in the Humanities

Contact info:Belaid Moa

[email protected] Millar [email protected]

@jana_mu

Thank you