Seventeen Centuries
A knowledge graph connecting three philosophical texts across seventeen centuries—from Marcus Aurelius (170 AD) to Machiavelli (1513) to Nietzsche (1886)—exploring how ideas of virtue, power, and morality evolved through time.
Overview
This project transforms philosophical texts into an interconnected knowledge graph using IWE. The graph is hierarchical with polyhierarchy support—documents can belong to multiple parent documents simultaneously. A concept like “virtue” can appear under both a book index and a thematic category, reflecting how knowledge naturally connects across domains.
The graph contains 1,200+ documents including:
- 838 text fragments from three books
- 340+ concept files linking philosophical ideas, historical figures, and themes
- Category documents organizing concepts into navigable groupings
Source texts
All source texts are public domain editions from Standard Ebooks:
| Book | Author | Fragments |
|---|---|---|
| Beyond Good and Evil | Friedrich Nietzsche | 296 |
| Meditations | Marcus Aurelius | 515 |
| The Prince | Niccolò Machiavelli | 27 |
Highlights
Some concept files reveal how the same idea carries different meanings across philosophers.
Virtue — For Marcus Aurelius, virtue is acting according to nature and reason, serving the common good as naturally as the eye sees. Machiavelli inverts this: a prince who acts entirely virtuously will be ruined among so much evil. Nietzsche warns against becoming enslaved to one’s own virtues, noting that every virtue inclines toward stupidity.
How the graph was constructed
The knowledge graph was built through a five-stage pipeline, transforming raw XHTML source files into an interconnected web of addressable markdown documents.
Stage 1: Fragment extraction
Each book was converted from Standard Ebooks XHTML format into atomic markdown fragments—one file per aphorism, passage, or chapter.
Beyond Good and Evil: 296 numbered aphorisms across 9 parts, extracted from <section> elements.
Meditations: 12 books containing 515 individual passages, each paragraph becoming one fragment.
The Prince: A dedication and 26 chapters, each chapter becoming one fragment.
Fragment format example:
# 146
He who fights with monsters should be careful lest he thereby become a monster. And if thou gaze long into an abyss, the abyss will also gaze into thee.Stage 2: Entity extraction
With ~845 fragments extracted, an LLM identified philosophical concepts, historical figures, and themes within each fragment, creating entity files and inline links.
Entity types extracted:
- Philosophical concepts — Abstract ideas, technical terms (Will to Power, Logos, Virtù)
- Named persons/figures — Historical figures, philosophers (Spinoza, Caesar, Plato)
- Themes/topics — Recurring subjects (morality, power, death, nature)
Each fragment was limited to 3-7 most significant entities to avoid over-linking.
Stage 3: Flattening and merging
Initially, each book existed in its own subdirectory with independent entity files. The flattening stage merged everything into a single flat directory, handling naming collisions and combining overlapping concepts.
Concepts appearing in multiple books were merged into single files with book-specific sections:
# Virtue
## Mentioned In
### The Prince
- [prince-15](prince-15.md)
### Meditations
- [meditations-009-043](meditations-009-043.md)
### Beyond Good and Evil
- [bge-041](bge-041.md)Stage 4: Adding categories
Categories provide thematic entry points for navigation and discovery. Unlike folders, a concept like Socrates can belong to both “philosophers” and “ancient-greeks.”
Stage 5: Writing summaries
The final stage added summaries to concept files that appear across multiple books, highlighting how the same idea carries different meanings for different philosophers.
Categories
Concepts are organized into thematic categories:
- philosophers — Thinkers discussed across the texts
- virtues — Qualities of character and excellence
- moral-systems — Different ethical frameworks
- nietzschean-concepts — Ideas central to Nietzsche
- power-dynamics — Hierarchy, domination, social stratification
- religion — Religious concepts and critiques
- politics — Forms of government, political theory
- ancient-cultures — Civilizations referenced as examples
- psychology — Mental phenomena, drives, emotions
- philosophical-schools — Named traditions and movements
Usage
Explore the graph using the IWE CLI:
iwe find # List all documents
iwe retrieve -k virtue -b # Get virtue with backlinks
iwe tree -k bge # Show BGE document tree
iwe find --refs-to will-to-power # Find references to will-to-power
iwe stats # Graph statistics