Skip to main content

Toolbox for Japanese text.

Project description

Shikaku (詩客)

Test PyPI version

Toolbox for Japanese text.

Example

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")

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

shikaku-0.2.4.tar.gz (9.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

shikaku-0.2.4-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

Details for the file shikaku-0.2.4.tar.gz.

File metadata

  • Download URL: shikaku-0.2.4.tar.gz
  • Upload date:
  • Size: 9.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for shikaku-0.2.4.tar.gz
Algorithm Hash digest
SHA256 15dd54445f5f5a5bf715efa6ba80545f44dd7581bff923bc3ec238fe40e0a8b0
MD5 62c951259ab47ffa7e14c94a377aa613
BLAKE2b-256 05141410a896c8890fed84a9715ffd4e037f7e92b199c7d466dd08d9a6e785e6

See more details on using hashes here.

Provenance

The following attestation bundles were made for shikaku-0.2.4.tar.gz:

Publisher: release.yml on tueda/shikaku

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file shikaku-0.2.4-py3-none-any.whl.

File metadata

  • Download URL: shikaku-0.2.4-py3-none-any.whl
  • Upload date:
  • Size: 10.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for shikaku-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 9f76eb1146a5951a7dbe5f67d03833cdf30e36b47cc32e31c86adf2747fc5dcd
MD5 30893feee1eedf9ae6938c47992ec094
BLAKE2b-256 a2e702e7792e60c5f9b2fc2d550fc09d05d1b0fe85a17e7fb583172778fb840e

See more details on using hashes here.

Provenance

The following attestation bundles were made for shikaku-0.2.4-py3-none-any.whl:

Publisher: release.yml on tueda/shikaku

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page