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).