semvec/pypi-packages huggingface dataset:
pycountstutorial 0.3.1
Calculate word counts in a text file.
License: BSD 3-Clause
Requires Python: >=3.8,<4.0

# PyCountsTutorial

[![pypi](https://img.shields.io/pypi/v/pycountstutorial)](https://pypi.org/project/pycountstutorial)
[![python](https://img.shields.io/badge/python-%5E3.8-blue)](https://pypi.org/project/pycountstutorial)
[![license](https://img.shields.io/pypi/l/pycountstutorial)](https://github.com/estripling/pycountstutorial/blob/main/LICENSE)
[![ci status](https://github.com/estripling/pycountstutorial/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/estripling/pycountstutorial/actions/workflows/ci.yml)
[![docs](https://readthedocs.org/projects/pycountstutorial/badge/?version=latest)](https://readthedocs.org/projects/pycountstutorial/?badge=latest)
[![coverage](https://codecov.io/github/estripling/pycountstutorial/coverage.svg?branch=main)](https://codecov.io/gh/estripling/pycountstutorial)
[![downloads](https://pepy.tech/badge/pycountstutorial)](https://pepy.tech/project/pycountstutorial)
[![black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![isort](https://img.shields.io/badge/%20imports-isort-%231674b1&labelColor=ef8336)](https://pycqa.github.io/isort/)

## About

Calculate word counts in a text file.

## Installation

```bash
$ pip install pycountstutorial
```

## Usage

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

```python
from pycountstutorial.core import count_words
from pycountstutorial.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

`pycountstutorial` was created by PyCountsTutorial Developers.
It is licensed under the terms of the BSD 3-Clause license.

## Credits

`pycountstutorial` was created with [`cookiecutter`](https://cookiecutter.readthedocs.io/en/latest/) and the [`pypkgcookiecutter` template](https://github.com/estripling/pypkgcookiecutter).