Skip to main content

Python package to count text

Project description

pycounts

Calculate word counts in a text file!

Installation

$ pip install pycountsxch

Usage

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

from pycountsxch.pycounts import count_words
from pycountsxch.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

pycountsxch was created by Charles Xu. 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

pycountsxch-0.1.1.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

pycountsxch-0.1.1-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file pycountsxch-0.1.1.tar.gz.

File metadata

  • Download URL: pycountsxch-0.1.1.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.0 CPython/3.12.1 Darwin/22.6.0

File hashes

Hashes for pycountsxch-0.1.1.tar.gz
Algorithm Hash digest
SHA256 257d134f1b7224f1c57fc94ac86a2ea80d68c5717fa77af87622b4fd97e78745
MD5 84b92cbbf2d8dc333d91cb5282548303
BLAKE2b-256 2c4810700137f20b31734ed246922772272edffcdca723e097b20b7143611b25

See more details on using hashes here.

File details

Details for the file pycountsxch-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: pycountsxch-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.0 CPython/3.12.1 Darwin/22.6.0

File hashes

Hashes for pycountsxch-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 eff8a6158ac99834df1fdd6a70b323d78697455dc8358a44d90331d1b89bcee9
MD5 fe7ef5da157c9437968d0ab13bc98f06
BLAKE2b-256 afae05e38bb0c4f506de9d113bef090ed0319364442bc7c8c69e86e1c15f6ad4

See more details on using hashes here.

Supported by

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