big modernism
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
Topic Modeling for Literary Analysis BIG MODERNISM
Belaid Moa, PhD Computing Specialist, Compute Canada Jana Millar Usiskin PhD Student, Department of English
THE CHALLENGE
1. Defining
2. Aggregating
3. Preprocessing 4. Analyzing
5. Postprocessing
THE PROCESS
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
Interpret ive Poss ib i l i t ies
DEFINING
The Data Set AGGREGATING
metadata (xml) text (txt)
PREPROCESSING CLEANING TEXT
PREPROCESSING PREPPING FOR MAXIMUM INTERPRETATION
Learn from seen (large) data Patterns, Properties, etc.
Perform well on unseen (large) data Predict Decide Classify
“Torture data” just right
What is Machine Learning?
ANALYZING
As s imple as poss ib le but not s impler.
MACHINE LEARNING
In
I2 I1
thm
ori
Alg
Machine Learning
PROCESS
Choose the methods
Feed the data
Take decisions, make predictions
Toolbox Define space of possible models
Learn structure and the parameters of the model
Take decisions, make predictions
Modeling
Categor izat ion
MACHINE LEARNING
• Input • Some output • Learn a model • Prediction, Decision
Supervised
• Input • Learn patterns using a model • Prediction, Decision
Unsupervised
• Input • Grading of some output • Prediction, Decision
Reinforcement Learning
Labeled data
Unlabeled data
Rewarded data
Bayesian Learning
• Probabilistic models • Learn parameters
based on Bayesian rule/integration
LDA
• Generative model • Hidden/latent variables • Word, Document, Topic
triplet
Probab i l i s t i c/Bayes ian Learn ing
UNSUPERVISED LEARNING
Top ic Mode l ing
BAYESIAN LEARNING
Find hidden (thematic) patterns/topics in documents
Produce labels according to the patterns
Understand, organize, search and summarize the collection of documents
S imple Idea!
PROCESS
Topic 1
Topic 3
Topic 2
Mrs Dalloway
Ulysses
house
Time
man Child
Day
Documents as a mixture of topics
LDA
Document 1
Document 2
Topics as a mixture of words
LDA
Topic 1 arabs 0.023 army 0.016 railway 0.0146 day 0.0144 ….
Topic 2 God 0.020 Father 0.0160 soul 0.0135 Sin 0.0080 Priest 0.00798 ….
Topic 3 time 0.0129 father 0.0107 Sister 0.00677 room 0.00676 House 0.0066 ….
Topics as d ist r ibut ions on words
LDA
Topic 1
Topic 2
Topic 3
Generat ive Process
LDA
For each topic Tp, a) Choose a distribution pTp over
words For each novel Li: a) Choose a distribution pLi over
K topics b) for each word in Li:
i. Draw one of the K topics, Tj, according to pLi
ii. Draw one of the V words according to pTj
LDA Novels LDA
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
Graphical Model
LDA
N
D
K
For B ig Modernism
LDA
LDA (mallet train-topics …)
Corpus
Filter
Topic & word Distributions
Exploration
PROCESSING STREAMLINED SCRIPT
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
Interpretat ion
POST-PROCESSING
3 SENSORY EXPERIENCE OF TEMPORALITY time felt day looked knew work face hand night
18 TIME EMBODIED eyes face life time white dark round hand head
26 INHABITING SPACES men people began room house talk suddenly end years
TOPIC INDEX
WEI
GH
T Modernist Novels
Time Embodied
Inhabiting Everyday Spaces
POST-PROCESSING Label ing Most Modernist Topics
Sensory Experience
of Temporality
Sensor y Exper ience of Temporal i ty
POST-PROCESSING
Sensor y Exper ience of Temporal i ty
POST-PROCESSING
Inhabi t ing Spaces
POST-PROCESSING
Inhabi t ing Spaces
POST-PROCESSING
Time Embodied
POST-PROCESSING
Time Embodied
POST-PROCESSING
POST-PROCESSING DISTRIBUTION TABLE
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-PROCESSING AUTHOR DISTANCES
Top 10 Gener ic Modernist Novels
POST-PROCESSING
The Ambassadors Howard’s End Twilight Sleep The Captive The Good Soldier The Awakening Lord Jim The Waves Heart of Darkness
Top 10 Gener ic Modernist Novels
POST-PROCESSING
Mrs. Dalloway The Ambassadors Howard’s End Twilight Sleep The Captive The Good Soldier The Awakening Lord Jim The Waves Heart of Darkness
Top 10 Unique Modernist Novels
POST-PROCESSING
Seven Pillars The Trial Babbitt The Autobiography of Alice B. Toklas Three Lives Time Regained Nightwood 1984 Passage to India
Top 10 Unique Modernist Novels
POST-PROCESSING
Ulysses Seven Pillars The Trial Babbitt The Autobiography of Alice B. Toklas Three Lives Time Regained Nightwood 1984 Passage to India
Cluster ing
MACHINE LEARNING
Af f in i ty Propagat ion
CLUSTERING
Af f in i ty Propagat ion
CLUSTERING
Af f in i ty Propagat ion
CLUSTERING Exemplar
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 Pil lars 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-PROCESSING MODERNISM SUB-CLUSTERS
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 Pil lars 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-PROCESSING MODERNISM SUB-CLUSTERS
Af f in i ty Propagat ion on Modernism
POST-PROCESSING
Fitzgerald Tender is the
Night The Great Gatsby
Chopin The
Awakening Conrad Heart of
Darkness Lord Jim
The Secret Agent
Lewis Tarr
Kafka The Trial
Orwell 1984
Burmese Days
Stein The
Autobiography of Alice B
Wharton Twilight Sleep
Joyce Ulysses Dubliners
Portrait of the Artist
Hardy Tess of the
D’Urbervilles
Barnes Nightwood
Forster A Passage to
India
Lawrence The Seven Pillars of Wisdom
Af f in i ty Propagat ion on Modernism
POST-PROCESSING Woolf
Mrs. Dalloway The Waves
Ford The Good
Soldier
Forster Howard’s
End
Lawrence Sons and
Lovers Women in
Love
Stein Three Lives
Wilde The Picture of Dorian
Gray
Proust Time Regained
The Captive
James The
Ambassadors
Fitzgerald Tender is the
Night The Great Gatsby
Chopin The
Awakening
Conrad H. of D.
Lord Jim Secret Agent
Ford The Good
Soldier
Forster Howard’s End
James The
Ambassadors
Kafka The Trial
Lawrence The Seven
Pillars Lawrence Sons and
Lovers Women in
Love
Lewis Tarr
Lewis Babbitt
Maugham Of Human Bondage
Orwell 1984
Burmese Days
Proust Time
Regained The Captive
Stein The Autobio
of Alice Three Lives
Wharton Twilight Sleep
Joyce Ulysses Dubliners
Portrait of the Artist
Barnes Nightwood
Hardy Tess of the
D’Urbervilles
Forster A Passage
to India
Wilde The Picture of Dorian
Gray
Woolf Mrs.
Dalloway The Waves
10 GIFTS and SOCIETY give felt time father mind people speak present poor 26 EMBODIED TIME time face hand eyes day looked place house turned 17 FAMILY RELATIONS sister family mother friend manner feelings time morning father 27 BODIES IN SPACE night half round room eye eyes sat heard head
TOPIC INDEX
WEI
GH
T 19th-Century Novels
Sensor y Exper ience of Temporal i ty
POST-PROCESSING
Family
Relations
Embodied
Time
Gifts and Social
Relations
Cluster 1 , exemplar Emma (Austen):
Emma (Austen), Pride and Prejudice (Austen), Persuasion (Austen) Cluster 2, exemplar Vil lette (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-PROCESSING MODERNISM SUB-CLUSTERS
47 TIME EMBODIED face eyes time hand head night house turned looked 18 WOMEN, TIME, AND SPACE time day mind room woman life years place heard 8 SENSORY INTERPRETATION
felt sense fact question face life present eyes light
TOPICS
WEI
GH
T Modernism and 19th-Century Novels
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 Pi l lars of Wisdom : Seven Pillars of Wisdom
Cluster 5, exemplar Mrs. Dal loway : Howard’s End, Women in Love, Sons and Lovers, Of Human Bondage, Three Lives, The
Picture of Dorian Gray, Mrs. Dalloway, The Waves Cluster 6, exemplar Emma :
Emma, Persuasion, Pride and Prejudice Cluster 7, exemplar Great Expectations:
A Tale of Two Cities, Great Expectations, Oliver Twist Cluster 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-PROCESSING MODERNISM AND 19th-CENTURY SUB-CLUSTERS
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 Pi l lars of Wisdom : Seven Pillars of Wisdom
Cluster 5, exemplar Mrs. Dal loway : Howard’s End, Women in Love, Sons and Lovers, Of Human Bondage, Three Lives, The
Picture of Dorian Gray, Mrs. Dalloway, The Waves Cluster 6, exemplar Emma :
Emma, Persuasion, Pride and Prejudice Cluster 7, exemplar Great Expectations:
A Tale of Two Cities, Great Expectations, Oliver Twist Cluster 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-PROCESSING MODERNISM AND 19th-CENTURY SUB-CLUSTERS
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-PROCESSING MODERNISM AND 19th-CENTURY SUB-CLUSTERS
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-PROCESSING MODERNISM AND 19th-CENTURY SUB-CLUSTERS
Myster y Novels INFERENCE
Given the topics, compute the topic distribution of a new novels
Infer the closest Novels (KL distance)
Example: Given X.txt, Y.txt, and Z.txt novels, find the closest novel
Prof i l ing the texts
INFERENCE
Mystery Texts
X Y Z
Mystery Texts, Topic Inference
X Ulysses-0.776
Nightwood–1.098 Mrs. Dalloway–1.107
Portrait-1.251 The Waves-1.358
Mrs. Dalloway–0.8 The Waves-0.925
Ulysses–0.934 Nightwood–1.032
Heart of Darkness–1.237
Y The Secret Agent-0.47
Tarr–0.686 Lord Jim–0.85
Heart of Darkness–0.908 Ulysses–1.153
The Secret Agent–0.385 Lord Jim–0.7 Tarr–0.741
Heart of Darkness–0.762 Turn of the Screw–1.164
Z Tender is the Night–1.375
Dubliners-1.566 Babbitt-1.588 The Trial-1.6 Tarr-1.663
The Trial-1.046 Babbitt-1.908
Sons and Lovers-1.918 Tarr-2.116
Tender is the Night-2.142
INFERENCE Simi lar i ty to other novels
Modernist Versions Project Compute Canada
Maker Lab in the Humanities
Contact info: Belaid Moa
[email protected] Jana Millar Usiskin
[email protected] @jana_mu
THANK YOU