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.
Release files for pycounts 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pycounts-0.4.0.tar.gz | 85.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pycounts-0.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 170.7 kB
Release files / pycounts-0.4.0.tar.gz
| Download URL | pycounts-0.4.0.tar.gz |
|---|---|
| Size | 85.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cf07a5ff6971c29c39990900e43985ca88df4ea0f8926eb949bf39f482297a52
|
|
BLAKE2b-256 checksum How to use checksums |
5808f8a9108807a00558e91e4c393c798d2cd32e4ae346775e8a6f2955c043af
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Release files / pycounts-0.4.0-py3-none-any.whl
| Download URL | pycounts-0.4.0-py3-none-any.whl |
|---|---|
| Size | 85.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
91e30ff64c728ee11c165d13ba7dd3d98be126ada38a5bf8cb8ad6c26cbe6f1a
|
|
BLAKE2b-256 checksum How to use checksums |
a955e4285d35548c31e024065bdb2a6af93056ce067a263e82198486aa607829
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|