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 hashes)

Uploaded Source

Built Distribution

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

Uploaded Python 3

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