shikaku


Nameshikaku JSON
Version 0.2.3 PyPI version JSON
download
home_pagehttps://github.com/tueda/shikaku
SummaryToolbox for Japanese text.
upload_time2024-10-13 08:57:11
maintainerNone
docs_urlNone
authorTakahiro Ueda
requires_python<4.0,>=3.10
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": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.10",
    "maintainer_email": null,
    "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/56/fe/7d8c090d000cec1652c1ba1efa6665f9b481614ef8106c7262b4c8c3a4b7/shikaku-0.2.3.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.3",
    "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": "df788dd7633808d9d2cb1891cf235094cb8c36f66a57f2e5b716373290f54f0c",
                "md5": "28371d1fd123760bb4bb96cea5259725",
                "sha256": "f464771846f05db60ebea22b4f901e3c13f05dacfa0593841d80f52f6c92eb52"
            },
            "downloads": -1,
            "filename": "shikaku-0.2.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "28371d1fd123760bb4bb96cea5259725",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.10",
            "size": 8375,
            "upload_time": "2024-10-13T08:57:10",
            "upload_time_iso_8601": "2024-10-13T08:57:10.072017Z",
            "url": "https://files.pythonhosted.org/packages/df/78/8dd7633808d9d2cb1891cf235094cb8c36f66a57f2e5b716373290f54f0c/shikaku-0.2.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "56fe7d8c090d000cec1652c1ba1efa6665f9b481614ef8106c7262b4c8c3a4b7",
                "md5": "023e2475f6642c7982bb9e190b0b8e09",
                "sha256": "00f9e3d806cdb3dfb4ce8af551c34f460f8e3eae2abe61551a3b403f5e382c3c"
            },
            "downloads": -1,
            "filename": "shikaku-0.2.3.tar.gz",
            "has_sig": false,
            "md5_digest": "023e2475f6642c7982bb9e190b0b8e09",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.10",
            "size": 7520,
            "upload_time": "2024-10-13T08:57:11",
            "upload_time_iso_8601": "2024-10-13T08:57:11.298977Z",
            "url": "https://files.pythonhosted.org/packages/56/fe/7d8c090d000cec1652c1ba1efa6665f9b481614ef8106c7262b4c8c3a4b7/shikaku-0.2.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-13 08:57:11",
    "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.66344s