Skip to main content

A Japanese inflections tool

Project description

PyKatsuyou

A Japanese verb/adjective inflections tool for python.

PyKatsuyou uses these great packages:

Install

pip install pykatsuyou

Usage

This tool requires that you input the dictionary form of the verb/adjective. Using only hiragana may have strange results (unless it's an irregular verb).

from tabulate import tabulate
from pykatsuyou import getInflections

data = getInflections('する', jsonIndent=2)
print(data['json'])
print(data['list'])

table = getInflections('行く', dataframe=True)
print(tabulate(table, headers='keys', tablefmt='pretty'))

CLI

pykatsuyou する

pykatsuyou -h

Usage:
pykatsuyou [verb/adjective] [-h/-j/-l]
*Must use dictionary form

Options:
***A table is printed by default***
-h (--help) = outputs this text
-j (--json) = prints json
-l (--list) = prints a list

Output - 行く

Object

{
    # json contains a json string
	'json': '{
		"Affirmative": {
			"Dict-Form": "行く",
			"Non-Past Polite": "行きます",
			"Past": "行った",
			"Past Polite": "行きました",
			"Te-Form": "行って",
			"Imperative": "行け",
			"Conditional": "行けば",
			"Volitional": "行こう"
		},
		"Negative": {
			"Dict-Form": "行かない",
			"Non-Past Polite": "行きません",
			"Past": "行かなかった",
			"Past Polite": "行きませんでした",
			"Te-Form": "行かなくて",
			"Imperative": "行くな",
			"Conditional": "行かなければ",
			"Volitional": "x"
		}
	}',
	'list': [
		'行きます',
		'行った',
		'行きました',
		'行って',
		'行け',
		'行けば',
		'行こう',
		'行きません',
		'行かなかった',
		'行きませんでした',
		'行かなくて',
		'行くな',
		'行かなければ'
	]
}

Table

Godan Verb Affirmative Negative
Dict-Form 行く 行かない
Non-Past Polite行きます 行きません
Past 行った 行かなかった
Past Polite 行きました 行きませんでした
Te-Form 行って 行かなくて
Imperative 行け 行くな
Conditional 行けば 行かなければ
Volitional 行こう

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

PyKatsuyou-1.0.1.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

PyKatsuyou-1.0.1-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

Details for the file PyKatsuyou-1.0.1.tar.gz.

File metadata

  • Download URL: PyKatsuyou-1.0.1.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

File hashes

Hashes for PyKatsuyou-1.0.1.tar.gz
Algorithm Hash digest
SHA256 63c0c502718798406268d69f16f218f481b85582522d1f90a423d96fec8c6461
MD5 73791d5e34934c9a871d9411df95e6a9
BLAKE2b-256 cd52f1c0e0245fd13635d1af54beda48f57ca7fba481d3680abbb53ff39ebd39

See more details on using hashes here.

File details

Details for the file PyKatsuyou-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: PyKatsuyou-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 10.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

File hashes

Hashes for PyKatsuyou-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 edc44d59c9e37cfb7c0dc3e7f5c23ba3a22f3b3423a52f96136bbed8f9b906c4
MD5 7f0f0168ec6e813639d298cca60c156e
BLAKE2b-256 fdb38cfb993cc92ef98ad34bb7150b53835ac4539feb7494b2ba600f9ebde7a4

See more details on using hashes here.

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