Projects · No. 032026

लोकाः समस्ताः सुखिनो भवन्तुMay all beings everywhere be at peace.

Sanskrit Engine

A reading tool for Sanskrit. Give it a sentence and it explains every word, its grammar and its meaning, and shows where each answer comes from.

Type
Personal project
Year
2026
Status
In progress
Role
Solo
Core
Grammar rules · Vidyut · a local AI model

How it works

Grammar is computed; meaning is retrieved

Sanskrit grammar has fixed rules, so code can apply them exactly. The AI only writes the English explanation, and every claim it makes is checked against a dictionary.

१–५five steps
  1. १

    Input

    Accepts Sanskrit in Devanagari or English letters.

  2. २

    Split

    Separates words that are written joined together.

  3. ३

    Analyse

    Finds each word's root and grammatical form.

  4. ४

    Roles

    Works out the subject, the object and the action.

  5. ५

    Translate

    Gives each word's meaning, with its dictionary source.

Example

kartāthe doer · 1.4.54karaṇathe means · 1.4.42karmawhat is acted on · 1.4.49

बालः हस्तेन अन्नं खादति

  1. बालःbālaḥbālasubjectthe boy
  2. हस्तेनhastenahastameans (with)with the hand
  3. अन्नम्annamannaobjectfood
  4. kriyā · the verbखादतिkhādati√khādverbeats
“The boy eats food with his hand.”

Difficulties

Roadblocks along the way

  1. १

    Joined words

    Sanskrit often writes words joined together, and splitting them can have more than one right answer.

  2. २

    Wrong dictionary forms

    The word library returned verb roots instead of the nouns people look up, so this had to be corrected.

  3. ३

    Compound words

    One in five words is part of a compound word. Splitting these correctly is the next step.

Python · NLP · Vidyut · sanskrit_parser · RAG · Ollama · Qwen2.5-7B · instructor · Pydantic · BGE-M3 · Qdrant · LLM evaluation · Streamlit · pytest · 

Stack: Python, NLP, Vidyut, sanskrit_parser, RAG, Ollama, Qwen2.5-7B, instructor, Pydantic, BGE-M3, Qdrant, LLM evaluation, Streamlit, pytest

Next · ProjectsERO →
Lekhana Kalyan Raj
RésuméLinkedInGitHub