A .NET 8 solution for transliterating text between Urdu (Arabic script), Hindi (Devanagari), and Romanised forms — with dictionary-enhanced conversion and GoldenDict-compatible natural dictionary support.
| Project | Description |
|---|---|
Nawishta |
Core library — rule-based transliteration engine, character mappings, and dictionary store |
Nawishta.NaturalDictionary |
GoldenDict-compatible dictionary import — StarDict and DSL parsers, SQLite storage |
Nawishta.Web |
ASP.NET Core web API + React SPA frontend |
Nawishta.Tests |
xUnit test suite |
All six conversion directions between three scripts:
- Roman ↔ Urdu Arabic
- Roman ↔ Hindi Devanagari
- Urdu Arabic ↔ Hindi Devanagari
Conversion uses a rule-based engine with character mapping tables, enhanced by a dictionary for known words (providing correct spellings that rule-based mapping can't always produce).
Upload any GoldenDict-compatible dictionary source and use it as a lookup dictionary within the app.
Supported formats:
- StarDict —
.ifo+.idx+.dict(or.dict.dz/.dict.gz) - DSL — ABBYY Lingvo
.dsl(or.dsl.dz)
Capabilities:
- Upload dictionaries as
.zipor.tar.gzarchives - Auto-detection of dictionary format
- Browse entries alphabetically with pagination
- Search headwords within a dictionary
- Cross-dictionary word lookup
- Autocomplete suggestions
- .NET 8 SDK
- Node.js 18+ (for the frontend)
# Restore and build all projects
dotnet build
# Build the frontend
cd Nawishta.Web/ClientApp
npm install
npm run build# Run the web app (API + SPA)
dotnet run --project Nawishta.WebThe app will be available at http://localhost:5000 (or the port configured in launchSettings.json).
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/convert |
Convert text between scripts |
Request body:
{ "text": "salam", "from": "Roman", "to": "UrduArabic" }| Method | Endpoint | Description |
|---|---|---|
| GET | /api/dictionary?q=&limit= |
List/search entries |
| GET | /api/dictionary/stats |
Dictionary statistics |
| POST | /api/dictionary |
Add an entry |
| PUT | /api/dictionary/{id} |
Update an entry |
| DELETE | /api/dictionary/{id} |
Delete an entry |
| POST | /api/dictionary/bulk |
Bulk import entries |
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/natural-dictionary/upload |
Upload a dictionary archive (multipart form, field: file) |
| GET | /api/natural-dictionary |
List all imported dictionaries |
| GET | /api/natural-dictionary/{id} |
Get dictionary metadata |
| DELETE | /api/natural-dictionary/{id} |
Delete a dictionary |
| GET | /api/natural-dictionary/lookup?word= |
Look up a word across all dictionaries |
| GET | /api/natural-dictionary/suggest?prefix= |
Autocomplete headword suggestions |
| GET | /api/natural-dictionary/{id}/browse?page=&pageSize= |
Browse entries in a dictionary |
| GET | /api/natural-dictionary/{id}/search?q=&page=&pageSize= |
Search within a dictionary |
Configuration is in Nawishta.Web/appsettings.json:
{
"Dictionary": {
"Provider": "Json",
"ConnectionString": "Data/dictionary.json",
"SeedIfEmpty": true
},
"NaturalDictionary": {
"ConnectionString": "Data Source=Data/natural_dictionaries.db"
}
}Dictionary providers: Json (default, file-based), Sqlite, MySql
dotnet testNawishta/
Converters/ — Script-specific converter implementations
Mappings/ — Character mapping tables (Urdu-Roman, Hindi-Roman, Urdu-Hindi)
Dictionary/ — Built-in transliteration dictionary (JSON/SQLite/MySQL storage)
Nawishta.NaturalDictionary/
Models/ — Domain models (NaturalDictionaryInfo, Article, BrowseResult)
Parsers/ — Format parsers (StarDictParser, DslParser)
Services/ — DictionaryImportService (archive extraction + format detection)
Storage/ — EF Core entities, DbContext, and store implementation
Nawishta.Web/
Program.cs — API endpoints (minimal APIs)
ClientApp/src/ — React SPA (Converter, DictionaryManager, NaturalDictionary, DictionaryBrowser)
Private project.