shikaku


Nameshikaku JSON
Version 0.2.2 PyPI version JSON
download
home_pagehttps://github.com/tueda/shikaku
SummaryToolbox for Japanese text.
upload_time2023-12-02 01:32:13
maintainer
docs_urlNone
authorTakahiro Ueda
requires_python>=3.10,<4.0
licenseMIT
keywords japanese text-generation markov-chain word-cloud
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Shikaku (詩客)

[![Test](https://github.com/tueda/shikaku/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/tueda/shikaku/actions/workflows/test.yml?query=branch%3Amain)
[![PyPI version](https://badge.fury.io/py/shikaku.svg)](https://pypi.org/project/shikaku/)

Toolbox for Japanese text.

## Example

```python
from shikaku import load_aozorabunko, TextModel, WordCloud
import matplotlib.pyplot as plt

# Aozora Bunko, author_id = 35, work_id = 1567 ==> Run, Melos!
text = load_aozorabunko(35, 1567)

# Text generator using Markov chains.
model = TextModel()
model.fit(text)
result = model.generate()
print(result)

# Word cloud.
wc = WordCloud()
wc.fit(text)
result = wc.generate()
result.to_file("wc.png")

# Visualize Markov chains (preliminary).
model = TextModel(state_size=1)
model.fit("吾輩は猫である。名前はまだない。")
model.plot()
plt.savefig("model.png")
```


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/tueda/shikaku",
    "name": "shikaku",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.10,<4.0",
    "maintainer_email": "",
    "keywords": "japanese,text-generation,markov-chain,word-cloud",
    "author": "Takahiro Ueda",
    "author_email": "t.ueda.od@juntendo.ac.jp",
    "download_url": "https://files.pythonhosted.org/packages/c2/d9/a4c2874a2ce5f244e863123f3248ad808a0d49ef6b36d1a038e2f8d15cd6/shikaku-0.2.2.tar.gz",
    "platform": null,
    "description": "# Shikaku (\u8a69\u5ba2)\n\n[![Test](https://github.com/tueda/shikaku/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/tueda/shikaku/actions/workflows/test.yml?query=branch%3Amain)\n[![PyPI version](https://badge.fury.io/py/shikaku.svg)](https://pypi.org/project/shikaku/)\n\nToolbox for Japanese text.\n\n## Example\n\n```python\nfrom shikaku import load_aozorabunko, TextModel, WordCloud\nimport matplotlib.pyplot as plt\n\n# Aozora Bunko, author_id = 35, work_id = 1567 ==> Run, Melos!\ntext = load_aozorabunko(35, 1567)\n\n# Text generator using Markov chains.\nmodel = TextModel()\nmodel.fit(text)\nresult = model.generate()\nprint(result)\n\n# Word cloud.\nwc = WordCloud()\nwc.fit(text)\nresult = wc.generate()\nresult.to_file(\"wc.png\")\n\n# Visualize Markov chains (preliminary).\nmodel = TextModel(state_size=1)\nmodel.fit(\"\u543e\u8f29\u306f\u732b\u3067\u3042\u308b\u3002\u540d\u524d\u306f\u307e\u3060\u306a\u3044\u3002\")\nmodel.plot()\nplt.savefig(\"model.png\")\n```\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Toolbox for Japanese text.",
    "version": "0.2.2",
    "project_urls": {
        "Homepage": "https://github.com/tueda/shikaku",
        "Repository": "https://github.com/tueda/shikaku"
    },
    "split_keywords": [
        "japanese",
        "text-generation",
        "markov-chain",
        "word-cloud"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8191362218d6999d497f04f76ae1751acb68c15cd117baf05a7c31df1f2a50d8",
                "md5": "702c2b3eb7507b8cb97a819699272120",
                "sha256": "eed02d5c7c23994491cf455a878cec2ff36f5ea781886bf30209b57e1e08f27a"
            },
            "downloads": -1,
            "filename": "shikaku-0.2.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "702c2b3eb7507b8cb97a819699272120",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10,<4.0",
            "size": 8375,
            "upload_time": "2023-12-02T01:32:11",
            "upload_time_iso_8601": "2023-12-02T01:32:11.935831Z",
            "url": "https://files.pythonhosted.org/packages/81/91/362218d6999d497f04f76ae1751acb68c15cd117baf05a7c31df1f2a50d8/shikaku-0.2.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c2d9a4c2874a2ce5f244e863123f3248ad808a0d49ef6b36d1a038e2f8d15cd6",
                "md5": "c53a0428fa38e219d4d3cf6c6ae98419",
                "sha256": "705f9402a9186184d32f1f0035aee14be4fee99019faf4c643db8bf6510285ee"
            },
            "downloads": -1,
            "filename": "shikaku-0.2.2.tar.gz",
            "has_sig": false,
            "md5_digest": "c53a0428fa38e219d4d3cf6c6ae98419",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10,<4.0",
            "size": 7512,
            "upload_time": "2023-12-02T01:32:13",
            "upload_time_iso_8601": "2023-12-02T01:32:13.068395Z",
            "url": "https://files.pythonhosted.org/packages/c2/d9/a4c2874a2ce5f244e863123f3248ad808a0d49ef6b36d1a038e2f8d15cd6/shikaku-0.2.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-02 01:32:13",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "tueda",
    "github_project": "shikaku",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "shikaku"
}
        
Elapsed time: 0.15714s