Skip to main content

Calculate word counts in a text file!

Project description

pycounts

Calculate word counts in a text file!

Installation

$ pip install pycounts

Usage

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

from pycounts.pycounts import count_words
from pycounts.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-0.4.0.tar.gz (85.1 kB view details)

Uploaded Source

Built Distribution

pycounts-0.4.0-py3-none-any.whl (85.6 kB view details)

Uploaded Python 3

File details

Details for the file pycounts-0.4.0.tar.gz.

File metadata

  • Download URL: pycounts-0.4.0.tar.gz
  • Upload date:
  • Size: 85.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7

File hashes

Hashes for pycounts-0.4.0.tar.gz
Algorithm Hash digest
SHA256 cf07a5ff6971c29c39990900e43985ca88df4ea0f8926eb949bf39f482297a52
MD5 137691ccf35503783926805d2f71f2c2
BLAKE2b-256 5808f8a9108807a00558e91e4c393c798d2cd32e4ae346775e8a6f2955c043af

See more details on using hashes here.

File details

Details for the file pycounts-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: pycounts-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 85.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7

File hashes

Hashes for pycounts-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 91e30ff64c728ee11c165d13ba7dd3d98be126ada38a5bf8cb8ad6c26cbe6f1a
MD5 5d08de3b1f9923bdf1a150c5a16bccc4
BLAKE2b-256 a955e4285d35548c31e024065bdb2a6af93056ce067a263e82198486aa607829

See more details on using hashes here.

Supported by

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