🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

google-transliteration-api

Package Overview
Dependencies
Maintainers
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

google-transliteration-api

Google Transliterate API for Python

1.0.3
Source
PyPI
Maintainers
2

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

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.

Keywords

Google Transliterate API - Google Input Tools Transliteration

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts