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.2.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: pycountsxch-0.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 72be3d1637e462e4415a8ad1629334117e054f9b73ca0f6689f3664c5d5ae1dd
MD5 d1888f9c4cea08de0a8df6040b0451a5
BLAKE2b-256 67bfd2e71c4f58be56ceb3399b1e8c0c5396d39b6dd3d3c31fd232d64ae7dc6a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pycountsxch-0.1.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d2d463ae0a03f11f232b02879ca11a2b5f64ca6cbf3ed3fc26ba77b74f8c3b93
MD5 3e06366cd262a663921288cd4d6ca9c3
BLAKE2b-256 e7c0456499bc11d89f0f986a7a2310bdd4f755ddac1bf3ebc8c47d67fec8ee4c

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