Google-Transliterate-API
Google-Transliterate-API copied to clipboard
Python library to use Google Transliterate API which powers the G Input Tools
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.