Pharmakon Miner
Cross-corpus semantic search system for mapping ancient Greek pharmacological terms to modern biochemistry and quantum mechanisms.
π― Purpose
Extract untranslated Greek pharmakon (ΟΞ¬ΟΞΌΞ±ΞΊΞΏΞ½) terms from ancient texts and triangulate them against modern scientific corpora to identify:
- Modern compound equivalents
- Biochemical mechanisms
- Quantum biological effects
ποΈ Architecture
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β PHARMAKON MINER β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β Greek Text: "ΞΊΟ
ΞΊΞ΅ΟΞ½ mixed with βάλΟΞ±ΞΌΞΏΞ½ heals fever" β
β β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β ENTITY EXTRACTION β β
β β β’ Greek terms: ΞΊΟ
ΞΊΞ΅ΟΞ½, βάλΟΞ±ΞΌΞΏΞ½ β β
β β β’ Symptoms: fever β β
β β β’ Context: preparation, dosage, ritual β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β MULTI-CORPUS SEMANTIC SEARCH β β
β β β β
β β [greek_corpus] β ancient text context β β
β β [science_corpus] β biochem/pharmacology β β
β β [physicists_corpus] β quantum mechanisms β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β CROSS-REFERENCE & MAPPING β β
β β β β
β β βάλΟΞ±ΞΌΞΏΞ½ β Commiphora/Balsamodendron (myrrh family) β β
β β ΞΊΟ
ΞΊΞ΅ΟΞ½ β barley drink + ergot alkaloids β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β CONFIDENCE SCORING β β
β β β β
β β π’ High: 3-corpus hit β β
β β π‘ Medium: 2-corpus hit + strong semantic score β β
β β π΄ Low: single corpus, speculative β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
π Corpora
| Corpus | Contents | Use Case |
|---|---|---|
greek_corpus | Ancient Greek texts, medical papyri, Hippocratic corpus | Source terms, historical context |
science_corpus | Modern biochemistry, pharmacology, botany | Compound identification |
physicists_corpus | Quantum biology, photobiomodulation | Mechanism mapping |
π Pipeline
1. Extract Greek Pharmakon Terms
- Identify untranslated Greek terms (ΟΞ¬ΟΞΌΞ±ΞΊΞΏΞ½, Ξ²ΞΏΟάνη, etc.)
- Handle variant spellings (βάλΟΞ±ΞΌΞΏΞ½ vs Ξ²Ξ±Ξ»Οάμινον)
- Normalize via lemmatization before embedding
2. Pull Surrounding Context
- Wide context window (Β±3 sentences)
- Extract: symptoms, preparation methods, effects, dosage
- Medical papyri bury details in preparation instructions
3. Embed and Search Science Corpus
- Semantic search for modern equivalents
- Match on: compound names, plant families, effects
4. Map Ancient β Modern Compounds
- Entity co-occurrence analysis
- Botanical family mapping
- Effect/symptom correlation
5. Confidence Scoring
- Weight by number of corpus hits
- Penalize single-source matches
- Boost multi-corpus convergence
π¦ Output Schema
{
"greek_term": "ΞΊΟ
ΞΊΞ΅ΟΞ½",
"transliteration": "kykeΕn",
"context": "ritual drink, grain-based, ergot contamination",
"modern_matches": [
{"compound": "ergotamine", "corpus": "science", "score": 0.89},
{"compound": "LSA (ergine)", "corpus": "science", "score": 0.84}
],
"quantum_links": ["serotonin receptor binding", "neural coherence"],
"confidence": "high",
"sources": ["Hymn to Demeter", "Wasson et al."]
}π§ͺ Demo Cases
ΞΊΟ ΞΊΞ΅ΟΞ½ (Kykeon)
| Aspect | Ancient | Modern |
|---|---|---|
| Description | Ritual drink at Eleusis | Barley beverage |
| Active compound | Unknown βmysteryβ | Ergot alkaloids (LSA, ergine) |
| Effects | Visionary states | Serotonin receptor agonism |
| Sources | Hymn to Demeter | Wasson, Hofmann, Ruck (1978) |
βάλΟΞ±ΞΌΞΏΞ½ (Balsamon)
| Aspect | Ancient | Modern |
|---|---|---|
| Description | Healing resin | Myrrh family (Commiphora) |
| Uses | Wounds, fever | Antimicrobial, anti-inflammatory |
| Mechanisms | β | Terpenoid compounds |
| Quantum angle | β | Photobiomodulation synergy? |
π οΈ Implementation
Function: translate_pharmakon()
def translate_pharmakon(greek_term: str, context: str = "") -> dict:
"""
Translate ancient Greek pharmakon term to modern equivalents.
Args:
greek_term: Greek term (Unicode or transliterated)
context: Optional surrounding text for better matching
Returns:
PharmakonResult with modern matches and confidence
"""
# 1. Normalize/lemmatize Greek term
normalized = lemmatize_greek(greek_term)
# 2. Search greek_corpus for usage context
greek_hits = search_corpus("greek_corpus", normalized, context)
# 3. Extract symptoms/effects/preparation from context
entities = extract_medical_entities(greek_hits)
# 4. Semantic search science_corpus
science_hits = search_corpus("science_corpus",
f"{normalized} {entities}")
# 5. Search physicists_corpus for mechanisms
quantum_hits = search_corpus("physicists_corpus",
f"{entities} mechanism")
# 6. Cross-reference and score
return build_result(
greek_term=greek_term,
greek_hits=greek_hits,
science_hits=science_hits,
quantum_hits=quantum_hits
)Dependencies
- Knowledge RAG system (ChromaDB + embeddings)
- Greek lemmatizer (CLTK or custom)
- Entity extraction (spaCy or LLM-based)
π TODO
- Build
translate_pharmakon()function - Add Greek lemmatization (handle variants)
- Create entity extraction for medical terms
- Build confidence scoring algorithm
- Test with ΞΊΟ ΞΊΞ΅ΟΞ½ and βάλΟΞ±ΞΌΞΏΞ½ cases
- Expand to full Hippocratic corpus terms
π Related
π References
- Wasson, Hofmann, Ruck (1978) β The Road to Eleusis
- CLTK (Classical Language Toolkit) β Greek NLP
- Dioscorides β De Materia Medica
Last updated: 2025-02-02