Google Transliterate API for Python
Project description
Google Transliteration - Python API
A Python library to use Google Transliterate API which powers the G Input Tools.
Install using:
pip install google-transliteration-api
Note:
- This is not Google's official library since Google has deprecated Input Tools API.
- Do not confuse with Google Translate API
Usage
Check here for list of supported languages.
Get suggestions for a word
from google.transliteration import transliterate_word
suggestions = transliterate_word('America', lang_code='ja')
print(suggestions)
['アメリカ', '米国', '米', '亜米利加', '亜墨利加', '米利堅']
The above transliterates the word 'America' into Japanese script and returns a list of possible suggestions.
Transliterate a sentence or text
(Experimental)
from google.transliteration import transliterate_text
result = transliterate_text('Hello comrade!', lang_code='ru')
print(result)
хелло комраде!
Transliterate numerals
from google.transliteration import transliterate_numerals
result = transliterate_numerals('3210', lang_code='zh')
print(result)
三二一〇
Similar works
- Google Input Tools Client
- Google Input Tools VS Code Extension
- AksharaMukha - Brahmic scripts (South Asia and South-East Asia) (list)
- Indic-Trans
- Soviet Transliterate
Please feel free to contribute by Pull Requests or raise an issue.
DMCA & Disclaimer
If you're Google and want us to take down the API, please raise an issue mentioning the main contributors.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file google-transliteration-api-1.0.3.tar.gz
.
File metadata
- Download URL: google-transliteration-api-1.0.3.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3739221ae9026c40140e3fe2ae08c29e4d55481e7b135b1714683ef184dfc031 |
|
MD5 | b11e64f409f47c71c889afd7e91ef45b |
|
BLAKE2b-256 | 949eda0681d6a0f0966a822b3c01745b0bc78824fd44d4876022a6c0bc963ba6 |
File details
Details for the file google_transliteration_api-1.0.3-py3-none-any.whl
.
File metadata
- Download URL: google_transliteration_api-1.0.3-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a56bf88c6b459eb42165c9b73ee6d4f287823d71d5b426751487acfbb54ef68 |
|
MD5 | 8bfad6d15b6673b698067acce9f1a19a |
|
BLAKE2b-256 | a9d3a7cc059b0c47c11a6059733d5b3a294b98239af259078830ecaf6e917a0f |