Laghu-Guru Pattern Validator
Why this counts as Indian Knowledge Systems
Piṅgala's Chandaḥśāstra treats every metrical syllable as one of exactly two states - laghu or guru - and shows how fixed-length sequences of these two states can be enumerated, counted, and converted to and from an ordinal index. That is functionally identical to representing a number in base 2, worked out roughly two thousand years before it was needed for electronic computing. This tool takes that same principle and applies it as a rule-based classifier and pattern matcher, so the syllable rules become executable code rather than a manuscript formula.
Classification rules implemented here: a syllable is guru if its vowel is inherently long, if it carries an anusvāra, visarga or candrabindu, or if it is followed by a conjunct of two or more consonants before the next vowel; otherwise it is laghu. The optional "pada-end" toggle reflects the traditional convention that the final syllable of a line may be counted as guru regardless of its natural weight.