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:
- When the (file size / availanle memory) ratio is over 25%
- When the file size is over 100Mb
File chunking can be forced however by using the -c
argument.
<ℹ️> Meta
Author: Stephen R A King (sking.github@gmail.com)
Project details
Release history Release notifications | RSS feed
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)
Built Distribution
wordc-1.0.1-py3-none-any.whl
(8.8 kB
view hashes)