Computation for Linguists
Activity Day: Detective Gutenberg, Day 2
2025-10-15
Activity: Detective Gutenberg
Detective Gutenberg
Goal: discover what makes an author’s writing style distinctive using the Python tools you already know.
- If you don’t remember how to do something, revisit past lectures.
Last time:
- Downloaded two files, loaded & cleaned them.
- Counted how many words there were (total & unique).
Today, you’ll:
- Measure style and print up the results.
Overview of Activity — Explore the Data
- What is the average word length?
- How many adverbs are there? Pick three other affixes to investigate.
- How much dialogue is there? (Use
quot_list = ['"', '“', '”'])
- What are the most common words (excluding “the,” “and,” “of”)? Arrange your values with
sorted(dict_name.items(), key=lambda x: x[1], reverse=True)
If You Finish Early
- Add a third author (Dickens, Poe, Twain)
- Feel free to add yourself as the third author!