Prosegrinder
A relatively fast, functional prose text counter with readability scoring.
Installation
prosegrinder is available on PyPI. Simply install it with pip:
pip install prosegrinder
Usage
The main use is via the prosegrinder.Prose object.
>>> from prosegrinder import Prose
>>> p = Prose("Some lengthy text that's actual prose, like a novel or article.")
The Prose object will parse everything down and compute basic statistics, including word count, sentence count, paragraph count, syllable count, point of view, dialogue, narrative, and a set of readability scores. All objects and attributes should be treated as immutable.
I know this isn't great documentation, but it should be enough to get you going.
Command Line Interface
Prosegrinder now includes a simple CLI for analyzing text in a file:
$ prosegrinder --help
Usage: prosegrinder [OPTIONS] FILES...
Setup the command line interface
Options:
-i, --indent INTEGER Python pretty-print json indent level.
-s, --save FILENAME File to save output to.
--help Show this message and exit.
Will provide basic statistics on text from a file or set of files including the filename and sh256 of text in each file analyzed. Output is json to help facilitate use in automation::
[
{
"filename": "shortstory.txt",
"statistics": {
"sha256": "5b756dea7c7f0088ff3692e402466af7f4fc493fa357c1ae959fa4493943fc03",
"word_character_count": 7008,
"phone_count": 5747,
"syllable_count": 2287,
"word_count": 1528,
"sentence_count": 90,
"paragraph_count": 77,
"complex_word_count": 202,
"long_word_count": 275,
"pov_word_count": 113,
"first_person_word_count": 8,
"second_person_word_count": 74,
"third_person_word_count": 31,
"pov": "first",
"readability_scores": {
"automated_readability_index": 0.281,
"coleman_liau_index": 9.425,
"flesch_kincaid_grade_level": 8.693,
"flesch_reading_ease": 62.979,
"gunning_fog_index": 12.079,
"linsear_write": 10.733,
"lix": 34.975,
"rix": 3.056,
"smog": 11.688
}
}
},
{
"filename": "copyright.txt",
"statistics": {
"sha256": "553bfd087a2736e4bbe2f312e3d3a5b763fb57caa54e3626da03b0fd3f42e017",
"word_character_count": 222,
"phone_count": 169,
"syllable_count": 78,
"word_count": 46,
"sentence_count": 7,
"paragraph_count": 16,
"complex_word_count": 10,
"long_word_count": 12,
"pov_word_count": 1,
"first_person_word_count": 1,
"second_person_word_count": 0,
"third_person_word_count": 0,
"pov": "first",
"readability_scores": {
"automated_readability_index": 1.404,
"coleman_liau_index": 8.073,
"flesch_kincaid_grade_level": 6.982,
"flesch_reading_ease": 56.713,
"gunning_fog_index": 11.324,
"linsear_write": 3.714,
"lix": 32.658,
"rix": 1.714,
"smog": 9.957
}
}
}
]
Readability scores
The set of scores automatically calculated:
- Automated Readability Index
- Coleman Liau Index
- Flesch Kincaid Grade Level
- Flesch Reading Ease
- Gunning Fog Index
- Linsear Write
- LIX
- RIX
- SMOG
Metadata
Release files for prosegrinder 1.4.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| prosegrinder-1.4.4.tar.gz | 21.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| prosegrinder-1.4.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 47.1 kB
Release files / prosegrinder-1.4.4.tar.gz
| Download URL | prosegrinder-1.4.4.tar.gz |
|---|---|
| Size | 21.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bd137b32e399c2a60547526de554ec4e6b899d56c1e8751db2a030115b127c54
|
|
BLAKE2b-256 checksum How to use checksums |
047d1bfb5bdeea62621d547923cfb912a64cc7b59b87ed81a5b85eb71bfdcaeb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.3.4 CPython/3.12.3 Linux/6.17.0-1010-azure
|
Release files / prosegrinder-1.4.4-py3-none-any.whl
| Download URL | prosegrinder-1.4.4-py3-none-any.whl |
|---|---|
| Size | 25.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8249fb38519c684f5374d965cd3b12a10bbdc034c212caf7b1833a8afdb3caca
|
|
BLAKE2b-256 checksum How to use checksums |
6de76dd1d7eb9115601b94c1438f405d32cb5e488175cf7723a7eb26f63119df
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.3.4 CPython/3.12.3 Linux/6.17.0-1010-azure
|
Security for prosegrinder 1.4.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.