Computational text analysis for African digital humanities: 33 runnable notebooks on African-language news, public-domain African archives and court records. sklearn + stdlib only.
# Computational Text Analysis Pack
Computational text analysis for African digital humanities. One notebook per
method, where **one row is a document, a passage or a word** rather than a
spreadsheet cell. Built for scholars of literature, languages and linguistics
who want the statistics behind the tools.
## Using them
Each notebook is self-contained — open any one without having run the others.
**In Google Colab:** click the badge at the top of a notebook, then run the
first cell. It will ask you to upload the CSVs; pick them from this pack's
`data/` folder. The upload is remembered for the rest of the session.
**Locally:** put the notebook in the same folder as the CSVs and run it.
Needs `pandas`, `numpy`, `matplotlib`, `scipy`, `scikit-learn`, `statsmodels`.
**Inside CourseHub:** every notebook is also the 📓 Lab Notebook tab on its
lesson, next to the quiz. Nothing to install and no upload step.
## Data
Real African-language and African-archive text. News in 16 African languages
with topic labels, passages from 150 public-domain works about Africa, and
passages from 48 African court judgments and government reports.
Everything is public domain, open government, or AFL-3.0. Nothing in-copyright
is included. See `data/PROVENANCE.md`.
| File | What it is |
|---|---|
| `masakhanews.csv` | news in 16 African languages with topic labels; 3,600 of the 8,400 documents are in Hausa, Igbo, Yoruba or Nigerian Pidgin |
| `masakhaner.csv` | |
| `colonial_texts.csv` | 5,984 passages from 150 public-domain works about Africa — a colonial-discourse corpus, not an African-authored one |
| `african_legal.csv` | 1,692 passages from 48 African court judgments and government reports |
## The notebooks
| # | Notebook | Technique |
|---|---|---|
| | **Module 00 — Text as Data** | |
| `00` | Text as Data | Turning a corpus into a table: document, token, type |
| | **Module 01 — Framing the Question** | |
| `01a` | What a Corpus Can and Cannot Answer | Matching a literary or …