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

CorpusContentsUse Case
greek_corpusAncient Greek texts, medical papyri, Hippocratic corpusSource terms, historical context
science_corpusModern biochemistry, pharmacology, botanyCompound identification
physicists_corpusQuantum biology, photobiomodulationMechanism 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)

AspectAncientModern
DescriptionRitual drink at EleusisBarley beverage
Active compoundUnknown β€œmystery”Ergot alkaloids (LSA, ergine)
EffectsVisionary statesSerotonin receptor agonism
SourcesHymn to DemeterWasson, Hofmann, Ruck (1978)

βάλσαμον (Balsamon)

AspectAncientModern
DescriptionHealing resinMyrrh family (Commiphora)
UsesWounds, feverAntimicrobial, 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


πŸ“š References

  • Wasson, Hofmann, Ruck (1978) β€” The Road to Eleusis
  • CLTK (Classical Language Toolkit) β€” Greek NLP
  • Dioscorides β€” De Materia Medica

Last updated: 2025-02-02