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.

Filename, size & hash SHA256 hash help File type Python version Upload date
ja2sci-0.1.3.tar.gz (1.5 MB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page