PyKatsuyou


NamePyKatsuyou JSON
Version 1.1.1 PyPI version JSON
download
home_pagehttps://github.com/SmashinFries/PyKatsuyou
SummaryA Japanese inflections tool
upload_time2023-09-04 22:35:03
maintainerSmashinfries
docs_urlNone
authorJustin Lukasik
requires_python>=3.6
license
keywords japanese inflections conjugation
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # PyKatsuyou

A Japanese verb/adjective inflections tool for python.  

PyKatsuyou uses these great packages:

- [igo-python](https://github.com/hideaki-t/igo-python) (detecting verbs and adjectives)
- [jaconv](https://github.com/ikegami-yukino/jaconv) (convert katakana --> hiragana)
- [tabulate](https://github.com/astanin/python-tabulate) (print a table)

## Install

```bash
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).

```python
from tabulate import tabulate
from pykatsuyou import getInflections
from igo.tagger import Tagger

tt = Tagger() # Optional

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

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

### CLI

```bash
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

```python
{
    # 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

<table>
<thead>
<tr><th>Godan Verb     </th><th>Affirmative  </th><th>Negative        </th></tr>
</thead>
<tbody>
<tr><td>Dict-Form      </td><td>行く         </td><td>行かない        </td></tr>
<tr><td>Non-Past Polite</td><td>行きます     </td><td>行きません      </td></tr>
<tr><td>Past           </td><td>行った       </td><td>行かなかった    </td></tr>
<tr><td>Past Polite    </td><td>行きました   </td><td>行きませんでした</td></tr>
<tr><td>Te-Form        </td><td>行って       </td><td>行かなくて      </td></tr>
<tr><td>Imperative     </td><td>行け         </td><td>行くな          </td></tr>
<tr><td>Conditional    </td><td>行けば       </td><td>行かなければ    </td></tr>
<tr><td>Volitional     </td><td>行こう       </td><td>x              </td></tr>
</tbody>
</table>

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/SmashinFries/PyKatsuyou",
    "name": "PyKatsuyou",
    "maintainer": "Smashinfries",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "japanese,inflections,conjugation",
    "author": "Justin Lukasik",
    "author_email": "jus10luka@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/91/3c/45ab2618feca7b194d1689d25c70efe97690662a9cc9dc46dc7cc613493f/PyKatsuyou-1.1.1.tar.gz",
    "platform": null,
    "description": "# PyKatsuyou\r\n\r\nA Japanese verb/adjective inflections tool for python.  \r\n\r\nPyKatsuyou uses these great packages:\r\n\r\n- [igo-python](https://github.com/hideaki-t/igo-python) (detecting verbs and adjectives)\r\n- [jaconv](https://github.com/ikegami-yukino/jaconv) (convert katakana --> hiragana)\r\n- [tabulate](https://github.com/astanin/python-tabulate) (print a table)\r\n\r\n## Install\r\n\r\n```bash\r\npip install pykatsuyou\r\n```\r\n\r\n## Usage\r\n\r\nThis 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).\r\n\r\n```python\r\nfrom tabulate import tabulate\r\nfrom pykatsuyou import getInflections\r\nfrom igo.tagger import Tagger\r\n\r\ntt = Tagger() # Optional\r\n\r\ndata = getInflections('\u3059\u308b', jsonIndent=2, tt=tt)\r\nprint(data['json'])\r\nprint(data['list'])\r\n\r\ntable = getInflections('\u884c\u304f', dataframe=True)\r\nprint(tabulate(table, headers='keys', tablefmt='pretty'))\r\n```\r\n\r\n### CLI\r\n\r\n```bash\r\npykatsuyou \u3059\u308b\r\n\r\npykatsuyou -h\r\n\r\nUsage:\r\npykatsuyou [verb/adjective] [-h/-j/-l]\r\n*Must use dictionary form\r\n\r\nOptions:\r\n***A table is printed by default***\r\n-h (--help) = outputs this text\r\n-j (--json) = prints json\r\n-l (--list) = prints a list\r\n```\r\n\r\n## Output - \u884c\u304f\r\n\r\n### Object\r\n\r\n```python\r\n{\r\n    # json contains a json string\r\n\t'json': '{\r\n\t\t\"Affirmative\": {\r\n\t\t\t\"Dict-Form\": \"\u884c\u304f\",\r\n\t\t\t\"Non-Past Polite\": \"\u884c\u304d\u307e\u3059\",\r\n\t\t\t\"Past\": \"\u884c\u3063\u305f\",\r\n\t\t\t\"Past Polite\": \"\u884c\u304d\u307e\u3057\u305f\",\r\n\t\t\t\"Te-Form\": \"\u884c\u3063\u3066\",\r\n\t\t\t\"Imperative\": \"\u884c\u3051\",\r\n\t\t\t\"Conditional\": \"\u884c\u3051\u3070\",\r\n\t\t\t\"Volitional\": \"\u884c\u3053\u3046\"\r\n\t\t},\r\n\t\t\"Negative\": {\r\n\t\t\t\"Dict-Form\": \"\u884c\u304b\u306a\u3044\",\r\n\t\t\t\"Non-Past Polite\": \"\u884c\u304d\u307e\u305b\u3093\",\r\n\t\t\t\"Past\": \"\u884c\u304b\u306a\u304b\u3063\u305f\",\r\n\t\t\t\"Past Polite\": \"\u884c\u304d\u307e\u305b\u3093\u3067\u3057\u305f\",\r\n\t\t\t\"Te-Form\": \"\u884c\u304b\u306a\u304f\u3066\",\r\n\t\t\t\"Imperative\": \"\u884c\u304f\u306a\",\r\n\t\t\t\"Conditional\": \"\u884c\u304b\u306a\u3051\u308c\u3070\",\r\n\t\t\t\"Volitional\": \"\uff58\"\r\n\t\t}\r\n\t}',\r\n\t'list': [\r\n\t\t'\u884c\u304d\u307e\u3059',\r\n\t\t'\u884c\u3063\u305f',\r\n\t\t'\u884c\u304d\u307e\u3057\u305f',\r\n\t\t'\u884c\u3063\u3066',\r\n\t\t'\u884c\u3051',\r\n\t\t'\u884c\u3051\u3070',\r\n\t\t'\u884c\u3053\u3046',\r\n\t\t'\u884c\u304d\u307e\u305b\u3093',\r\n\t\t'\u884c\u304b\u306a\u304b\u3063\u305f',\r\n\t\t'\u884c\u304d\u307e\u305b\u3093\u3067\u3057\u305f',\r\n\t\t'\u884c\u304b\u306a\u304f\u3066',\r\n\t\t'\u884c\u304f\u306a',\r\n\t\t'\u884c\u304b\u306a\u3051\u308c\u3070'\r\n\t]\r\n}\r\n```\r\n\r\n\r\n\r\n### Table\r\n\r\n<table>\r\n<thead>\r\n<tr><th>Godan Verb     </th><th>Affirmative  </th><th>Negative        </th></tr>\r\n</thead>\r\n<tbody>\r\n<tr><td>Dict-Form      </td><td>\u884c\u304f         </td><td>\u884c\u304b\u306a\u3044        </td></tr>\r\n<tr><td>Non-Past Polite</td><td>\u884c\u304d\u307e\u3059     </td><td>\u884c\u304d\u307e\u305b\u3093      </td></tr>\r\n<tr><td>Past           </td><td>\u884c\u3063\u305f       </td><td>\u884c\u304b\u306a\u304b\u3063\u305f    </td></tr>\r\n<tr><td>Past Polite    </td><td>\u884c\u304d\u307e\u3057\u305f   </td><td>\u884c\u304d\u307e\u305b\u3093\u3067\u3057\u305f</td></tr>\r\n<tr><td>Te-Form        </td><td>\u884c\u3063\u3066       </td><td>\u884c\u304b\u306a\u304f\u3066      </td></tr>\r\n<tr><td>Imperative     </td><td>\u884c\u3051         </td><td>\u884c\u304f\u306a          </td></tr>\r\n<tr><td>Conditional    </td><td>\u884c\u3051\u3070       </td><td>\u884c\u304b\u306a\u3051\u308c\u3070    </td></tr>\r\n<tr><td>Volitional     </td><td>\u884c\u3053\u3046       </td><td>\uff58              </td></tr>\r\n</tbody>\r\n</table>\r\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "A Japanese inflections tool",
    "version": "1.1.1",
    "project_urls": {
        "Bug Tracker": "https://github.com/SmashinFries/PyKatsuyou/issues",
        "Homepage": "https://github.com/SmashinFries/PyKatsuyou"
    },
    "split_keywords": [
        "japanese",
        "inflections",
        "conjugation"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "181a42d05b1e1ac44f8290f6b19344fa6f191b1e4d86131a08137023744fe8cf",
                "md5": "0fe193eda3866e080b3cacd0e8d34050",
                "sha256": "2452b9f728f6918d4e7cd1f36d75ceedbf45ec11c17901cde34ff76b95990efd"
            },
            "downloads": -1,
            "filename": "PyKatsuyou-1.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "0fe193eda3866e080b3cacd0e8d34050",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 11164,
            "upload_time": "2023-09-04T22:35:01",
            "upload_time_iso_8601": "2023-09-04T22:35:01.862606Z",
            "url": "https://files.pythonhosted.org/packages/18/1a/42d05b1e1ac44f8290f6b19344fa6f191b1e4d86131a08137023744fe8cf/PyKatsuyou-1.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "913c45ab2618feca7b194d1689d25c70efe97690662a9cc9dc46dc7cc613493f",
                "md5": "4122f7a48de132f48ff0c5d5ef86768e",
                "sha256": "c9bc132037bb80e27fa5cc75a64066b8369a6bba8080f5077c68fc2d0077f562"
            },
            "downloads": -1,
            "filename": "PyKatsuyou-1.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "4122f7a48de132f48ff0c5d5ef86768e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 8155,
            "upload_time": "2023-09-04T22:35:03",
            "upload_time_iso_8601": "2023-09-04T22:35:03.638900Z",
            "url": "https://files.pythonhosted.org/packages/91/3c/45ab2618feca7b194d1689d25c70efe97690662a9cc9dc46dc7cc613493f/PyKatsuyou-1.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-09-04 22:35:03",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "SmashinFries",
    "github_project": "PyKatsuyou",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "pykatsuyou"
}
        
Elapsed time: 0.11027s