How hemantgharat/transliteration-api works
Project type and purpose
• This is a standalone backend API service (no heavy frontend) built with FastAPI and Uvicorn.
• Purpose: accept HTTP requests carrying an ITRANS-encoded word, return its Devanagari transliteration plus fuzzy-matched suggestions from a predefined Hindi word list.
File structure
• Top-level files:
• main.py → FastAPI application definitions and route handlers
• hindi_words.txt → Data source for suggestion engine
• index.html → Simple static landing page (optional UI/test page)
• requirements.txt → Python dependencies
• Dockerfile/.dockerignore → Containerization for deployment
• .gitignore
• No frontend folder, no database folder: this is a single‐service API.
• Configuration files (Dockerfile) show it’s intended to run in a container.
README for additional insights
• Confirms FastAPI + Uvicorn stack
• Uses two core libraries:
• indic-transliteration for script conversion
• rapidfuzz for fuzzy matching suggestions
• Provides one GET endpoint (/transliterate/), expects a “word” query parameter, returns JSON
Key advice
• Be detailed but stay focused: capture every moving part (ASGI server, CORS, transliteration lib, suggestion lib).
• Do not over-compartmentalize; this service is small—group related functions together.