/** * Greek Isopsephy Computation Functions * * Provides computation functions for Greek isopsephy (ἰσοψηφία), the practice * of summing the numerical values of Greek letters. * * ## Systems Implemented * * | System | Greek Name | Method | Source | * |--------|------------|--------|--------| * | Standard | ἰσοψηφία | Milesian numerals (27 letters) | Gow 1883 | * | Ordinal | στοιχεῖα | Alphabet position (1-24) | Dionysius Thrax 2nd c. BCE | * | Reduced | πυθμήν | Digital root of standard | Hippolytus ~220 CE | * * ## Primary Sources (Public Domain) * * ### Standard Isopsephy (ἰσοψηφία) * * Gow, James. "The Greek Numerical Alphabet." *The Journal of Philology* 12 * (1883): 278–84. * * - Internet Archive: https://archive.org/details/journalofphilolo12claruoft * * ### Ordinal (στοιχεῖα) * * Dionysius Thrax. *Ars Grammatica* (Τέχνη Γραμματική). Section 6. 2nd century BCE. * Edited by Gustav Uhlig. Leipzig: Teubner, 1883. * * - Internet Archive: https://archive.org/details/dionysiithracis00unkngoog * - Wikisource (English): https://en.wikisource.org/wiki/The_grammar_of_Dionysios_Thrax * * ### Reduced/Pythmen (πυθμήν) * * Hippolytus of Rome. *Refutation of All Heresies*. Book IV, Chapter 14 (~220 CE). * Trans. J. H. MacMahon. In *Ante-Nicene Fathers*, vol. 5. Buffalo, NY: * Christian Literature Publishing, 1886. * * - Internet Archive: https://archive.org/details/antenicenefathe00444gut * - Early Church Texts: https://www.earlychurchtexts.com/public/hippolytus_refutation_book4.htm * - New Advent: https://www.newadvent.org/fathers/050104.htm * * @module greek/isopsephy/compute */ import type { IsopsephyResult } from './types.js'; import { STANDARD, ORDINAL, ARCHAIC_LETTERS } from './systems.js'; export { STANDARD, ORDINAL, ARCHAIC_LETTERS }; /** * Check if text contains Greek characters. */ export declare function isGreek(text: string): boolean; /** * Remove diacritical marks from Greek text. * Iota subscripts are first converted to adscripts so they count for isopsephy. */ export declare function removeDiacritics(text: string): string; /** * Extract only Greek letters from text. */ export declare function extractGreekLetters(text: string): string; /** * Count Greek words in text. */ export declare function countWords(text: string): number; /** * Compute standard Greek isopsephy value (ἰσοψηφία). * * Uses the Milesian/Ionic numeral system with 27 letters: * - Units (1-9): α, β, γ, δ, ε, ϛ, ζ, η, θ * - Tens (10-90): ι, κ, λ, μ, ν, ξ, ο, π, ϟ * - Hundreds (100-900): ρ, σ, τ, υ, φ, χ, ψ, ω, ϡ * * Includes three archaic "episema" (ἐπίσημα): stigma (ϛ=6), koppa (ϟ=90), * and sampi (ϡ=900). * * Source: Gow, "The Greek Numerical Alphabet," *Journal of Philology* 12 * (1883): 278–284. */ export declare function computeStandard(text: string): number; /** * Compute ordinal Greek value (alphabet position). * * Uses the standard 24-letter Greek alphabet (alpha to omega), numbered 1-24. * Archaic letters (stigma Ϛ/ϛ, koppa Ϟ/ϟ, sampi Ϡ/ϡ) have standard isopsephy * values but NO ordinal position in the alphabet. * * The Greek concept of ordered letters is explicit in Dionysius Thrax's * *Ars Grammatica* (2nd c. BCE), which states that letters are called * "stoicheia" (στοιχεῖα) because they have "order and arrangement" (στοῖχος * and τάξις). The alphabet was standardized in Athens in 403 BCE. * * Source: Dionysius Thrax, *Ars Grammatica*, Section 6 (2nd century BCE). * * @param text - The Greek text to calculate * @param strict - If true (default), throws an error when archaic letters are * encountered. If false, silently skips archaic letters (treats them as 0). * @throws {Error} When archaic letters are detected and strict mode is enabled */ export declare function computeOrdinal(text: string, strict?: boolean): number; /** * Compute reduced Greek value (πυθμήν / pythmen). * * Calculates the digital root of the standard isopsephy value, reducing it * to a single digit (1-9). The Pythagoreans called this the "πυθμήν" (pythmen), * meaning "root" or "base." * * The "Pythagoras to Telauges" (Πυθαγόρας πρὸς Τελαύγην) divination method * uses this reduction technique. It is attested in ~60 Byzantine manuscripts. * * Source: Hippolytus, *Refutation of All Heresies* IV.14 (~220 CE). */ export declare function computeReduced(text: string): number; /** * Compute isopsephy with full result metadata. */ export declare function compute(text: string, system: 'standard' | 'ordinal' | 'reduced'): IsopsephyResult; /** * Compute all isopsephy systems at once. */ export declare function computeAll(text: string): Record; /** * List all available system names. */ export declare function listSystems(): string[]; //# sourceMappingURL=compute.d.ts.map