Transliteration with Deep Learning
Project description
DeepTranslit: Towards better transliteration for Indic languages.
telugu
, kannada
, tamil
, malayalam
, marathi
, hindi
are the current supported languages.
Usage
Via docker
# Start the container in background
docker run -d -p 8080:8080 notaitech/deeptranslit:hindi
# Query from python
import requests
requests.post('http://localhost:8080/sync', json={"data": ['mera naam amitab.']}).json()
As python module
pip install --upgrade deeptranslit
from deeptranslit import DeepTranslit
# hindi
transliterator = DeepTranslit('hindi')
# Single sentence prediction
transliterator.transliterate('mera naam amitab.')
# [{'pred': 'मेरा नाम अमिताब.', 'prob': 0.25336900797483103}]
# Multiple sentence prediction
transliterator.transliterate(['mera naam amitab.', 'amitab-aur-abhishek'])
#[[{'pred': 'मेरा नाम अमिताब.', 'prob': 0.25336900797483103}],
# [{'pred': 'अमिताब-और-अभिषेक', 'prob': 0.1027598988040056}]]
Notes:
- Tokens (characters) not present in input space (english alphabet) are copied over to output.
- eg: (
amitab.
->अमिताब.
,amitab-aur-abhishek
->अमिताब-और-अभिषेक
)
- eg: (
- Predictions are cached at word level. i.e: computationally,
transliterate('amitab amitab')
is equivalent totransliterate('amitab')
ortransliterate('amitab amitab amitab')
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
deeptranslit-1.1.1.tar.gz
(5.0 kB
view details)
Built Distribution
File details
Details for the file deeptranslit-1.1.1.tar.gz
.
File metadata
- Download URL: deeptranslit-1.1.1.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2.post20191203 requests-toolbelt/0.9.1 tqdm/4.40.0 CPython/3.6.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a970f36e54a97cf9f5e517611f70299810a136396bf8336a18bb060feea1c5b7 |
|
MD5 | e14236d1663572225240ebe626d37157 |
|
BLAKE2b-256 | 89e14d285a3865441b54dc113a130b79f64672dd16d7e2569d545478575342ce |
File details
Details for the file deeptranslit-1.1.1-py2.py3-none-any.whl
.
File metadata
- Download URL: deeptranslit-1.1.1-py2.py3-none-any.whl
- Upload date:
- Size: 16.5 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2.post20191203 requests-toolbelt/0.9.1 tqdm/4.40.0 CPython/3.6.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f79b93e4d9594f253102f9e0d2df245722af91c59109319fea7c12489f5b61ab |
|
MD5 | 5baec61c97492421b05fa7393768bf6c |
|
BLAKE2b-256 | 2b374dc36ac22d8a0c59eb586fae8560221589549331764640fa14b0365668df |