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.3.tar.gz (1.5 MB view details)

Uploaded Source

File details

Details for the file ja2sci-0.1.3.tar.gz.

File metadata

  • Download URL: ja2sci-0.1.3.tar.gz
  • Upload date:
  • Size: 1.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

File hashes

Hashes for ja2sci-0.1.3.tar.gz
Algorithm Hash digest
SHA256 ce148cfdf9cb5ce46fbef1e43e83f2f709c8e5b51f168d06a242e8999d45269f
MD5 d195d8ac5169e12a1669164fca188de8
BLAKE2b-256 2487bd77b21439e652b2f8e3cdc4b3e8a1c9906dd708a55b4d0d3fdb3645b4d3

See more details on using hashes here.

Supported by

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