Try an Example
Click a button to load a well-known shloka and test the analyzer.
Step 1: Input Shloka Text
Analysis Summary
Identified Śloka Meter
N/A
Meter Type
N/A
Syllable Pattern
N/A
Total Lines (Pādas)
0
Detailed Pāda Analysis
| Line | Syllables | Mātrās | Ganas | Laghu-Guru Visualization | L/G Pattern (Raw) | Identified Meter(s) | Match Status | Pāda (Line Text) |
|---|
How It Works
This tool analyzes Sanskrit text based on a formal phonological pipeline and declarative meter grammars.
- Normalization & Segmentation: The text is normalized (Unicode NFC) and segmented into phonetic syllables (akṣaras), correctly handling conjuncts, viramas, and vocalics (ऋ, ऌ).
- 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 Guruoption treats the last syllable of any line as Guru by convention.
- 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]`).
- Varṇa-vṛtta (Syllable Meters): The L/G pattern is matched against a database of meter-specific Regular Expressions (e.g., Vasantatilakā:
- Gana Identification: For display, the L/G pattern is grouped into Ganas (e.g.,
ya, ma, ta, ra, ja, bha, na, sa).