This project provides an API for transliterating Uzbek text between Latin and Cyrillic scripts. Built using the NestJS framework and TypeScript, it offers two main endpoints for transliteration.
- Transliterate from Latin to Cyrillic: Convert Uzbek text written in the Latin script to the Cyrillic script.
- Transliterate from Cyrillic to Latin: Convert Uzbek text written in the Cyrillic script to the Latin script.
- Method:
POST
- Description: Transliterates Uzbek text from Cyrillic to Latin.
- Request Body:
{ "text": "your cyrillic text here" }
- Response:
{ "transliteratedText": "transliterated latin text" }
- Method:
POST
- Description: Transliterates Uzbek text from Latin to Cyrillic.
- Request Body:
{ "text": "your latin text here" }
- Response:
{ "transliteratedText": "transliterated cyrillic text" }
-
Clone the repository:
git clone https://github.com/khamrakulov/uzbek-transliteration.git cd uzbek-transliteration
-
Install dependencies:
yarn add
-
Start the development server:
yarn start:dev
The server will be running at
http://localhost:3000
.
You can test the endpoints using tools like Postman or cURL.
-
To Latin:
curl -X POST http://localhost:3000/transliterate/to-latin -H "Content-Type: application/json" -d '{"text": "Тест"}'
-
To Cyrillic:
curl -X POST http://localhost:3000/transliterate/to-cyrillic -H "Content-Type: application/json" -d '{"text": "Test"}'
src/
: Contains the main application code.transliterate/
: Contains the transliteration logic.controllers/
: Controllers of transliterate module.dtos/
: Data transfer objects for transliterate module.services/
: Services for transliterate module.
app.module.ts
: The root module of the application.main.ts
: The entry point of the application.
test/
: Contains the unit tests.
Feel free to submit issues or pull requests. For major changes, please open an issue first to discuss what you would like to change.