Skip to main content

Translate Japanese name into scientific name

Project description

ja2sci

ja2sci converts Japanese name into scientific name. If the given name is not on the internal dictionary, it automatically searches the wikipedia.

生物の和名を学名に変換するライブラリです。 内部辞書に学名が登録されていない場合、自動的に Wikipedia から学名を取得します。

How to use

As a CLI tool

$ pip install ja2sci
$ ja2sci ニホンカワウソ
Lutra lutra nippon

Inside python script

>>> import ja2sci
>>> ja2sci.translate('ユーラシアカワウソ')
'Lutra lutra

Advanced usage: asynchronous translation

>>> import ja2sci
>>> import asyncio
>>> loop = asyncio.get_event_loop()
>>> results = loop.run_until_complete(asyncio.gather(
...     ja2sci.async_translate('ホンドテン'), # Not on internal dictionary
...     ja2sci.async_translate('ミンク')      # Not on internal dictionary
... ))
>>> print(results)
['Martes melampus melampus', 'Neovison vison']

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

ja2sci-0.1.1.post1.tar.gz (2.8 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page