Skip to main content

Calculate word counts in a text file and plot word counts

Project description

pycounts_jd25

Calculate word counts in a text file!

Installation

pip install pycounts_jd25

Usage

pycounts can be used to count words in a text file and plot results as follows:

from pycounts_jd25.pycounts_jd25 import count_words
from pycounts_jd25.plotting import plot_words
import matplotlib.pyplot as plt

file_path = "test.txt"  # path to your file
counts = count_words(file_path)
fig = plot_words(counts, n=10)
plt.show()

Contributing

Interested in contributing? Check out the contributing guidelines. Please note that this project is released with a Code of Conduct. By contributing to this project, you agree to abide by its terms.

License

pycounts was created by Tomas Beuzen. It is licensed under the terms of the MIT license.

Credits

pycounts was created with cookiecutter and the py-pkgs-cookiecutter template.

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

pycounts_jd25-0.1.0.tar.gz (2.6 kB view details)

Uploaded Source

Built Distribution

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

pycounts_jd25-0.1.0-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file pycounts_jd25-0.1.0.tar.gz.

File metadata

  • Download URL: pycounts_jd25-0.1.0.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.0 CPython/3.13.1 Darwin/24.2.0

File hashes

Hashes for pycounts_jd25-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0eeb6ad93b64d2a5350c70e8c625ac5a79ffa7ce1f3e283ce33124fa9ebde4d5
MD5 abb12eecd166108ea98b578c9446dd61
BLAKE2b-256 f79ebe526b3685f5764d8f9869dea2520e9544ea285c344fcf971ee97ce49027

See more details on using hashes here.

File details

Details for the file pycounts_jd25-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pycounts_jd25-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.0 CPython/3.13.1 Darwin/24.2.0

File hashes

Hashes for pycounts_jd25-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8f295bf9c879e7f264e9b842123904156e3ecaf019a860f106ceb6f0e150094a
MD5 0a967515e23821bd872ac773d00cccf2
BLAKE2b-256 fac5a12ffe72e86da0274fcefeec5716997df98595570b122192f27632fe5aaa

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