Skip to main content

boilerplate you need to create a Python package.

Project description

wordc

Small utility to analyze the word frequency in a text file

🚀 Quickstart


💾 Installation

Using pipx (undoubtedly the best way):

pipx install wordc

OS X & Linux:

pip3 install wordc

Windows:

pip install wordc

🔧 Development setup


pip install --editable wordc

📝 Usage


Display the help menu with the -h argument

~ $ wordc -h
usage: wordc [-h] [-e ENCODING] [-c] [-s SIZE] [-t TOP_WORDS] [--version] FILENAME

Utility to list the top word frequency in a document

positional arguments:
  FILENAME              file to analyze for word frequency

optional arguments:
  -h, --help            show this help message and exit
  -e ENCODING, --encoding ENCODING
                        Encoding to use when reading file
  -c, --chunk           Force file chunking irrespective of file size
  -s SIZE, --size SIZE  Chunk size to use when reading file
  -t TOP_WORDS, --top_words TOP_WORDS
                        Number of top words to list
  --version             display version number

specify the file

~ $ wordc text_file.txt
4284 the
2192 and
2185 of
1861 a
1685 to

File chunking will happen automatically in certain situations:

  1. When the (file size / availanle memory) ratio is over 25%
  2. When the file size is over 100Mb

File chunking can be forced however by using the -c argument.

<ℹ️> Meta


Docker

Author: Stephen R A King (sking.github@gmail.com)

Created with Cookiecutter template: pydough version 1.3.4

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

wordc-1.0.1.tar.gz (13.2 kB view details)

Uploaded Source

Built Distribution

wordc-1.0.1-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

Details for the file wordc-1.0.1.tar.gz.

File metadata

  • Download URL: wordc-1.0.1.tar.gz
  • Upload date:
  • Size: 13.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for wordc-1.0.1.tar.gz
Algorithm Hash digest
SHA256 714e8e1cf5b6808b024592c2cc1f1decc92243c509893b48b172926137858876
MD5 83d2842e2e782be72316450cac4eea57
BLAKE2b-256 e36a39251d6bec931351cf469b8e07f8e56d02202820e64e123076075bffa459

See more details on using hashes here.

File details

Details for the file wordc-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: wordc-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 8.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for wordc-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1e42263e5f0c4e5a69d54c0934e0c68c5131e27ed73193de751a66d5c809b3ef
MD5 c9077a23a3e274232f1ce6a6054ac96f
BLAKE2b-256 010390a95021b37aa2c5da0f3ea5944f9d6d3bddc94b523df07096ec64f48888

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