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.1.0.post1.tar.gz (6.3 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.1.0.post1-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file shikaku-0.1.0.post1.tar.gz.

File metadata

  • Download URL: shikaku-0.1.0.post1.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for shikaku-0.1.0.post1.tar.gz
Algorithm Hash digest
SHA256 c25769c61cb07eacecc9a35be1c5963fcc39ffc07626e162877e9c9e9cd87d1f
MD5 902b00d25fed3d7f014b3708e9a0ccd1
BLAKE2b-256 56770b7aeb0659b3f120e1ac717a752862e4065c78678adab6f8febf1295876f

See more details on using hashes here.

File details

Details for the file shikaku-0.1.0.post1-py3-none-any.whl.

File metadata

  • Download URL: shikaku-0.1.0.post1-py3-none-any.whl
  • Upload date:
  • Size: 7.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for shikaku-0.1.0.post1-py3-none-any.whl
Algorithm Hash digest
SHA256 caae176702b3e44349d166f8143eab2489c8b89c32ae57eb16368bf4eb03d450
MD5 7c6c038cba69a9d9b32dfad2aa50f86a
BLAKE2b-256 797817c6eb2abc70c3e5af67cf916ef36e8668070f4db1f5ea7e07243ccd273c

See more details on using hashes here.

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