Classification Methodology

Back to Analyzer
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:

Both are displayed so users can audit the result.

4A) Syllable (Varna) Counting Rules

Example: if a pada is parsed into 8 aksharas, its syllable count is 8.

4B) Matra Counting Rules

Formula: Total Matra = Sum(akshara matra values)

4C) Worked Example

Suppose a pada has akshara matras:

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:

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

Not yet implemented (illustrative Sanskrit meters and features):

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.