After updating Anaconda, downloading Spacy and PylDavis through Anaconda Prompt, I started going through the tm_experiment_sample workbook step-by-step. I had to change a couple of things in the original code since Jupyter Notebook did not understand spacy for lemmatization so I just passed import spacy into it. Regarding matplotlib, some additional arguments caused some error messages popping (“Cannot import TrasformPatchPatch”) so I simply changed it to import matplotlib.

For some of the commands it took too long to be executed (more than one hour) and I stopped them after a while. I read through the workbook and found this section to be the place where we were supposed to change the number of topics to 40:

# %%time
# # Build LDA model
number_of_topics = 40
lda_model = gensim.models.LdaModel(corpus=corpus,
                                   id2word=dictionary,
                                   num_topics=number_of_topics,
                                   update_every=20,
                                   passes=100,
                                   alpha='auto')
print("-"*50)
path = "D:\\Perseus_DATA\\"
lda_model.save(path+'dispatch_1864.lda')

Meanwhile, I read Nelson’s account of the topics of the Dispatch during the U.S. Civil War (1860-65). Nelson identifies several major topic-clusters, such as ‘slavery’, ‘nationalism and patriotism’ and ‘soldiers’ and several topics within each of them (such as ‘poetry and patriotism’, ‘anti-northern diatribes’ and ‘secession’ within ‘nationalism and patriotism’). Nelson provides lists of predictive words and exemplary articles for all topics. In the case of ‘poetry and patriotism’, the predictive words are as follows:

COUNTRY LIFE GOD HEART BRAVE NOBLE HOME SOLDIER BATTLE MAN SPIRIT DEATH HONOR GALLANT SONS HOPE TRUE FIELD LOVE GLORIOUS HEARTS PATRIOTISM LAND DUTY

One exemplary article is the following poem titled God Bless Our Boys! by a certain “L.A.M., a Richmond Girl” for the 1865-11-25 issue of the Dispatch:

God bless each meaty form.
Gone to defend his home;
God bless our boys!
God bless each steady bead,
In this bright Southern land;
God bless each patriot band
Of our brave boys!

God bless each youthful heart;
May they from sin depart;
God bless one boys!
Preserve their names from barm,
Strengthen each trembling arm,
Keep them from war’s alarm;
God bless our boys!

God keep the feelings right,
Of those who’ve gone to fight
For their loved homes!
Preserve them by thy power,
Bless them to death’s dark hour,
Save them mid cannon’s roar,
When the foe come!

Make them to trust in them
God of our liability.
Oh, bless our boys!
Mother’s and sister’s prayers,
Mingled with fathers’ cares,
All, all of these are theirs,
God bless one boys!