Skip to main content

Creative · metre

thepulimaangani — Tamil metre in the browser

Classical Tamil metre in the browser. Paste verse, get syllable splits and metre labels. No server required.

For Students, scholars, and builders who need Tamil metre without calling a remote API.

  • Syllable splits and metre labels in the browser
  • Text stays on your machine — no remote API
  • Rust parser you can reuse outside the web app
  • Rule-based checker, not a general text model

Surfaces

  • Paste / editor surface for verse
  • Result panels for segmentation and metre labels
  • Static Vercel demo host

Product

  • Paste Tamil verse. See syllable splits and metre labels.
  • Classical rules run first.
  • Nothing leaves your browser.

Tamil classical metre (yāppu) is strict structure. Most tools skip it or lock it in desktop-only files.

Tech and architecture

  • Rust
  • WASM
  • TypeScript
  • React

Architecture

  • Rust parser compiles to WebAssembly (WASM) for the browser hot path
  • React loads the module once and calls it for each analysis
  • UI state stays in TypeScript; static hosting is enough for the demo
  • Offline ML helpers stay out of the browser path; live analysis uses classical rules

Key components

  • Rust metre crate: tokenization, syllable / acai structure, metre classification
  • WASM bridge: typed exports the UI can call without reimplementing grammar in JavaScript
  • React UI: reading-first panels for verse and labels

Data flow

  1. User text
  2. React state
  3. WASM parse
  4. Structured result
  5. Render

No network round-trip for the core path. Optional corpora or saved sessions stay outside the parser boundary so the linguistic core remains a pure function of input text.

Tradeoffs

  • WASM payload size versus server-side NLP: first load costs bytes; later analysis is free and private
  • Encoding classical rules in Rust is slower than a heuristic JS port; correctness and reuse outweigh one-time compile cost
  • Browser-only demo limits heavy corpus jobs; fine for an interactive reading tool

Testing and ops

  • Parser fixtures against known metre examples catch rule regressions
  • UI smoke covers load-WASM and round-trip display
  • Deploy is static: build WASM + frontend, ship. No database or model endpoint

More shipped walkthroughs in this set, or back to the landscape.