NLP analysis of ancient Egyptian funerary and mythic texts using topic modeling, embeddings, clustering, and neural classification.
# Ancient Egyptian Texts — Analyzed with AI
*A project exploring ancient Egyptian funerary and mythic texts using topic modeling, embeddings, clustering, semantic search, and neural networks.*
---
## Overview
Can modern AI help us understand texts written thousands of years ago?
This project applies Natural Language Processing (NLP) techniques to English translations of ancient Egyptian texts, especially chapters from the *Book of the Dead* and mythic narrative texts.
The project asks three main questions:
- What themes appear in funerary texts?
- Which chapters are most similar in meaning?
- Can a machine learning model distinguish funerary texts from mythic stories?
---
## Quick Takeaways
- Topic modeling recovered meaningful themes such as solar praise, judgment, and underworld passages.
- Embeddings placed semantically related chapters close together in vector space.
- Semantic search retrieved relevant passages based on ideas, not just keyword overlap.
- Funerary and mythic texts separated clearly in embedding space.
- Linear classifiers achieved **93.75% cross-validation accuracy**.
- A small neural network also learned the distinction on a held-out test split.
---
## Project Structure
| Project | Focus | Main Goal |
|--------|-------|-----------|
| **Project 1** | Topic Modeling | Discover recurring themes in *Book of the Dead* chapters |
| **Project 2** | Embeddings + Search | Compare chapters by meaning and build semantic search |
| **Project 3** | Genre Classification | Distinguish funerary texts from mythic texts |
| **Project 4** | Neural Network | Train a small classifier with backpropagation |
---
## Project 1 — Topic Modeling
This section uses **TF-IDF** and **Latent Dirichlet Allocation (LDA)** to uncover recurring themes in funerary texts.
### Main themes discovered
- ☀️ Solar praise and hymnic language
- ⚖️ Judgment, the heart, and petitions
- 🚪 Underworld passages and Osirian material
These themes align well with the known r …