Amidha Ayurveda

ChandasMeter

🕉️ ChandasMeter v3 – Formal Sanskrit Meter Engine

🕉️ ChandasMeter

A Formal Grammar-Based Sanskrit Meter Engine (Varṇa-vṛtta & Mātrā-vṛtta)

Try an Example

Click a button to load a well-known shloka and test the analyzer.

Step 1: Input Shloka Text

How It Works

This tool analyzes Sanskrit text based on a formal phonological pipeline and declarative meter grammars.

  1. Normalization & Segmentation: The text is normalized (Unicode NFC) and segmented into phonetic syllables (akášŖaras), correctly handling conjuncts, viramas, and vocalics (⤋, ⤌).
  2. Weighting (Laghu/Guru): Each syllable is deterministically classified as Laghu (L, 1 mātrā) or Guru (G, 2 mātrās) based on formal rule precedence:
    • A syllable is Guru (G) if its vowel is long (⤆, ⤈, ⤊, āĨ , āĨĄ, ā¤, ⤐, ⤓, ⤔) OR it ends in an Anusvara (ं), Visarga (ः), or final Virama (e.g., in ⤰ा⤜⤍्) OR it is short but followed by a conjunct consonant (saᚁyoge-guru).
    • Otherwise, it is Laghu (L).
    • The Pādānta Guru option treats the last syllable of any line as Guru by convention.
  3. Grammar Matching: The resulting pattern is matched against two separate, formal grammar databases:
    • Varṇa-vṛtta (Syllable Meters): The L/G pattern is matched against a database of meter-specific Regular Expressions (e.g., Vasantatilakā: ^G-G-L-G-L-L-L-G-L-L-G-L-G(-G)?$). Special logic handles AnuášŖáš­ubh vipulās and Upajāti mixtures.
    • Mātrā-vṛtta (Morae Meters): The total *mātrā* count of each *pāda* is calculated (L=1, G=2) and checked against patterns (e.g., Āryā: `[12, 18, 12, 15]`).
  4. Gana Identification: For display, the L/G pattern is grouped into Ganas (e.g., ya, ma, ta, ra, ja, bha, na, sa).
Amidha Ayurveda