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)
Metadata
Release files for wordc 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| wordc-1.0.1.tar.gz | 13.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| wordc-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 21.9 kB
Release files / wordc-1.0.1.tar.gz
| Download URL | wordc-1.0.1.tar.gz |
|---|---|
| Size | 13.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
714e8e1cf5b6808b024592c2cc1f1decc92243c509893b48b172926137858876
|
|
BLAKE2b-256 checksum How to use checksums |
e36a39251d6bec931351cf469b8e07f8e56d02202820e64e123076075bffa459
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.3
|
Release files / wordc-1.0.1-py3-none-any.whl
| Download URL | wordc-1.0.1-py3-none-any.whl |
|---|---|
| Size | 8.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1e42263e5f0c4e5a69d54c0934e0c68c5131e27ed73193de751a66d5c809b3ef
|
|
BLAKE2b-256 checksum How to use checksums |
010390a95021b37aa2c5da0f3ea5944f9d6d3bddc94b523df07096ec64f48888
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.3
|