Classification Methodology
Sanskrit Phase
This page explains how the analyzer computes varna and matra details, then maps the observed pattern to a chhand classification.
1) Input Normalization
The analyzer accepts Devanagari Sanskrit input and normalizes spacing. Vedic accent marks are removed for metrical counting consistency.
2) Segmentation (Split View)
Input is segmented by danda symbols and line breaks. Each segment is treated as a pada candidate. The exact split is shown in output for transparency.
3) Akshara Parsing
Each word is parsed into aksharas using consonant clusters, vowel signs, and modifiers. Trailing consonant behavior and conjunct effects are applied to derive guru/laghu weight.
4) Matra and Varna Computation
For each analyzed pada:
- Varna: count of akshara units used for varna-based meter mapping.
- Matra: per-akshara weight shown as laghu (1) or guru (2).
Both are displayed so users can audit the result.
4A) Syllable (Varna) Counting Rules
- Each parsed akshara contributes 1 syllable (varna).
- Akshara boundaries are derived from Devanagari consonants, vowel signs, and halant behavior.
- Conjuncts remain one akshara if they are part of the same spoken unit.
- The final pada syllable count is the number of aksharas in that pada.
Example: if a pada is parsed into 8 aksharas, its syllable count is 8.
4B) Matra Counting Rules
- Each akshara gets a base weight: laghu = 1, guru = 2.
- Short vowels (such as अ, इ, उ, ऋ and corresponding short signs) start as laghu.
- Long vowels (such as आ, ई, ऊ, ए, ऐ, ओ, औ and long signs) are guru.
- Anusvara, visarga, chandrabindu, or avagraha on an akshara make it guru.
- If a laghu akshara is followed by a conjunct onset (consonant + halant + consonant), it is upgraded to guru.
- The pada matra total is the sum of all akshara weights in that pada.
Formula: Total Matra = Sum(akshara matra values)
4C) Worked Example
Suppose a pada has akshara matras:
2, 1, 2, 2, 1, 1, 2, 2
- Syllables (varna) = 8 (8 aksharas)
- Matra total = 13 (2+1+2+2+1+1+2+2)
This is the same structure you see in output breakdown: each akshara with its laghu/guru weight and the computed totals.
5) Chhand Mapping
The observed varna pattern (example: 8-8-8-8) is compared against modeled patterns such as:
- Gāyatrī (गायत्री): 8-8-8
- Uṣṇih (उष्णिह): 8-8-12
- Anuṣṭubh (अनुष्टुभ): 8-8-8-8
- Bṛhatī (बृहती): 8-8-12-8
- Paṅkti (पङ्क्ति): 8-8-8-8-8
- Triṣṭubh (त्रिष्टुभ): 11-11-11-11
- Jagatī (जगती): 12-12-12-12
The top match is returned with confidence and rationale. Additional candidates are shown for ambiguity handling.
5A) Coverage: Implemented vs Not Yet Implemented
Currently implemented in this analyzer (Phase 1):
- Gāyatrī:
8-8-8
- Uṣṇih:
8-8-12
- Anuṣṭubh:
8-8-8-8
- Bṛhatī:
8-8-12-8
- Paṅkti:
8-8-8-8-8
- Triṣṭubh:
11-11-11-11
- Jagatī:
12-12-12-12
Not yet implemented (illustrative Sanskrit meters and features):
- Atijagatī: typically
13-13-13-13 (extended varna family).
- Śakvarī/Atiśakvarī group: longer and recensional variants; often needs expanded Vedic variant modeling.
- Āryā (jāti/mātrā-based): usually modeled by mātrā scheme (commonly
12-18-12-15), not fixed varna per pāda.
- Vasantatilakā: classical varna-vrtta with
14 syllables per pāda plus gaṇa-level constraints.
- Mandākrāntā: classical varna-vrtta with
17 syllables per pāda, strict gaṇa progression.
- Śārdūlavikrīḍita: classical varna-vrtta with
19 syllables per pāda, detailed gaṇa/yati constraints.
- Sragdharā: classical long meter with
21 syllables per pāda, heavy gaṇa constraints.
- Upajāti family (e.g., Indravajrā/Upendravajrā mix): 11-syllable lines but requires gaṇa-sequence validation, not count-only matching.
For these not-yet-implemented meters, future support needs gaṇa-rule validation, yati handling, and broader corpus benchmarking.
6) Timeout UX Rule
If analysis exceeds 10 seconds, the UI displays:
It has taken more than 10 seconds. Please contact ino@kotibyte.com for further support.