https://github.com/inc44/romajikirijiapi
This program enables the transcription of Japanese text into Romaji and Kiriji, facilitating an understanding of pronunciation and meaning using a familiar alphabet.
https://github.com/inc44/romajikirijiapi
api cyrillic fastapi japanese kiriji latin romaji
Last synced: about 1 month ago
JSON representation
This program enables the transcription of Japanese text into Romaji and Kiriji, facilitating an understanding of pronunciation and meaning using a familiar alphabet.
- Host: GitHub
- URL: https://github.com/inc44/romajikirijiapi
- Owner: Inc44
- Created: 2024-03-30T02:40:52.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-30T02:46:24.000Z (about 2 years ago)
- Last Synced: 2025-01-22T11:17:17.556Z (over 1 year ago)
- Topics: api, cyrillic, fastapi, japanese, kiriji, latin, romaji
- Language: Python
- Homepage:
- Size: 3.91 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### Romaji Kiriji API
#### Install
```
conda create --name RomajiKirijiAPI python=3.10.13
conda deactivate
conda activate RomajiKirijiAPI
pip install fastapi gunicorn pykakasi uvicorn
git clone https://github.com/Inc44/RomajiKirijiAPI.git
```
#### Develop
```
cd RomajiKirijiAPI
conda deactivate
conda activate RomajiKirijiAPI
uvicorn api:api --reload
```
#### Run
```
cd RomajiKirijiAPI
conda deactivate
conda activate RomajiKirijiAPI
gunicorn api:api -w 13 -k uvicorn.workers.UvicornWorker --log-level critical
```
#### Test
```
curl -X 'POST' 'http://127.0.0.1:8000/translate/' -H 'accept: application/json' -H 'Content-Type: application/json' -d '{"japanese_text": "我は官軍我(わが)敵は天地容れざる朝敵ぞ敵の大將たる者は古今無雙(双)の英雄で"}'
```
#### Benchmark
```
cd RomajiKirijiAPI
wrk -t13 -c1000 -d10s -s post.lua http://127.0.0.1:8000/translate/
```