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

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.0.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

PyKatsuyou-1.0.0-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: PyKatsuyou-1.0.0.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.0.tar.gz
Algorithm Hash digest
SHA256 d0b820cc456ab352613af5bc42321e51e99552c4be4ae08c20b5a1f27517e897
MD5 f151cfca504a7bd126bab88faef0d086
BLAKE2b-256 2b8e656f5f1cbb931e02fec42c274cb113aafe1200c7c0aa127541189274ba91

See more details on using hashes here.

File details

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

File metadata

  • Download URL: PyKatsuyou-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 10.5 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 58b382b54e953e09ef190a6d2860be637d99aa4238c81a3cd5af458717cae582
MD5 d7b606ea10bcbe98bc077a7660f6933e
BLAKE2b-256 80d9a7aea39bd623748395642ebe64c49b3db03fa2e4dc40e08a7f9b52b2ecb0

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