# Prosegrinder
[](https://pypi.python.org/pypi/prosegrinder)
[](https://github.com/prosegrinder/python-prosegrinder/actions/workflows/python-ci.yml)
A relatively fast, functional prose text counter with readability scoring.
## Installation
`prosegrinder` is available on PyPI. Simply install it with `pip`:
```bash
pip install prosegrinder
```
## Usage
The main use is via the `prosegrinder.Prose` object.
```python
>>> 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:
```bash
$ 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::
```json
[
{
"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
Raw data
{
"_id": null,
"home_page": "https://github.com/prosegrinder/python-prosegrinder",
"name": "prosegrinder",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.9",
"maintainer_email": null,
"keywords": "text analytics, prose fiction, natural language processing, NLP, linguistics",
"author": "David L. Day",
"author_email": "david@davidlday.com",
"download_url": "https://files.pythonhosted.org/packages/51/64/d51e4d229b33c5e063e14f79a0d35439a65f3649a5da6b576adf40cb770d/prosegrinder-1.4.0.tar.gz",
"platform": null,
"description": "# Prosegrinder\n\n[](https://pypi.python.org/pypi/prosegrinder)\n[](https://github.com/prosegrinder/python-prosegrinder/actions/workflows/python-ci.yml)\n\nA relatively fast, functional prose text counter with readability scoring.\n\n## Installation\n\n`prosegrinder` is available on PyPI. Simply install it with `pip`:\n\n```bash\npip install prosegrinder\n```\n\n## Usage\n\nThe main use is via the `prosegrinder.Prose` object.\n\n```python\n>>> from prosegrinder import Prose\n>>> p = Prose(\"Some lengthy text that's actual prose, like a novel or article.\")\n```\n\nThe Prose object will parse everything down and compute basic statistics,\nincluding word count, sentence count, paragraph count, syllable count, point of\nview, dialogue, narrative, and a set of readability scores. All objects and\nattributes should be treated as immutable.\n\nI know this isn't great documentation, but it should be enough to get you going.\n\n### Command Line Interface\n\nProsegrinder now includes a simple CLI for analyzing text in a file:\n\n```bash\n$ prosegrinder --help\nUsage: prosegrinder [OPTIONS] FILES...\n\n Setup the command line interface\n\nOptions:\n -i, --indent INTEGER Python pretty-print json indent level.\n -s, --save FILENAME File to save output to.\n --help Show this message and exit.\n```\n\nWill provide basic statistics on text from a file or set of files including the\nfilename and sh256 of text in each file analyzed. Output is json to help\nfacilitate use in automation::\n\n```json\n[\n {\n \"filename\": \"shortstory.txt\",\n \"statistics\": {\n \"sha256\": \"5b756dea7c7f0088ff3692e402466af7f4fc493fa357c1ae959fa4493943fc03\",\n \"word_character_count\": 7008,\n \"phone_count\": 5747,\n \"syllable_count\": 2287,\n \"word_count\": 1528,\n \"sentence_count\": 90,\n \"paragraph_count\": 77,\n \"complex_word_count\": 202,\n \"long_word_count\": 275,\n \"pov_word_count\": 113,\n \"first_person_word_count\": 8,\n \"second_person_word_count\": 74,\n \"third_person_word_count\": 31,\n \"pov\": \"first\",\n \"readability_scores\": {\n \"automated_readability_index\": 0.281,\n \"coleman_liau_index\": 9.425,\n \"flesch_kincaid_grade_level\": 8.693,\n \"flesch_reading_ease\": 62.979,\n \"gunning_fog_index\": 12.079,\n \"linsear_write\": 10.733,\n \"lix\": 34.975,\n \"rix\": 3.056,\n \"smog\": 11.688\n }\n }\n },\n {\n \"filename\": \"copyright.txt\",\n \"statistics\": {\n \"sha256\": \"553bfd087a2736e4bbe2f312e3d3a5b763fb57caa54e3626da03b0fd3f42e017\",\n \"word_character_count\": 222,\n \"phone_count\": 169,\n \"syllable_count\": 78,\n \"word_count\": 46,\n \"sentence_count\": 7,\n \"paragraph_count\": 16,\n \"complex_word_count\": 10,\n \"long_word_count\": 12,\n \"pov_word_count\": 1,\n \"first_person_word_count\": 1,\n \"second_person_word_count\": 0,\n \"third_person_word_count\": 0,\n \"pov\": \"first\",\n \"readability_scores\": {\n \"automated_readability_index\": 1.404,\n \"coleman_liau_index\": 8.073,\n \"flesch_kincaid_grade_level\": 6.982,\n \"flesch_reading_ease\": 56.713,\n \"gunning_fog_index\": 11.324,\n \"linsear_write\": 3.714,\n \"lix\": 32.658,\n \"rix\": 1.714,\n \"smog\": 9.957\n }\n }\n }\n]\n```\n\n### Readability scores\n\nThe set of scores automatically calculated:\n\n- Automated Readability Index\n- Coleman Liau Index\n- Flesch Kincaid Grade Level\n- Flesch Reading Ease\n- Gunning Fog Index\n- Linsear Write\n- LIX\n- RIX\n- SMOG\n",
"bugtrack_url": null,
"license": "GPLv3",
"summary": "A text analytics library for prose fiction.",
"version": "1.4.0",
"project_urls": {
"Bug Tracker": "https://github.com/prosegrinder/python-prosegrinder/issues",
"Homepage": "https://github.com/prosegrinder/python-prosegrinder",
"Repository": "https://github.com/prosegrinder/python-prosegrinder"
},
"split_keywords": [
"text analytics",
" prose fiction",
" natural language processing",
" nlp",
" linguistics"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "040a5b0867d24d0969b650f7cf75467eeb376ba258ced9302d3abc129431f3e4",
"md5": "0ddb2b23c792a3742649ebae9e1ba077",
"sha256": "79951872d0b2db81a9a50b05bd11ce89806889c9b30c6bee9d38f78af7849393"
},
"downloads": -1,
"filename": "prosegrinder-1.4.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "0ddb2b23c792a3742649ebae9e1ba077",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.9",
"size": 25227,
"upload_time": "2025-07-25T11:13:05",
"upload_time_iso_8601": "2025-07-25T11:13:05.223815Z",
"url": "https://files.pythonhosted.org/packages/04/0a/5b0867d24d0969b650f7cf75467eeb376ba258ced9302d3abc129431f3e4/prosegrinder-1.4.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "5164d51e4d229b33c5e063e14f79a0d35439a65f3649a5da6b576adf40cb770d",
"md5": "1fba5ada9df83d558f3896e1f5fbe056",
"sha256": "3453844d1e40ef71da5a078eb259ec3881b2da0c1168afbdfae7af928f446fb1"
},
"downloads": -1,
"filename": "prosegrinder-1.4.0.tar.gz",
"has_sig": false,
"md5_digest": "1fba5ada9df83d558f3896e1f5fbe056",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.9",
"size": 21859,
"upload_time": "2025-07-25T11:13:06",
"upload_time_iso_8601": "2025-07-25T11:13:06.316690Z",
"url": "https://files.pythonhosted.org/packages/51/64/d51e4d229b33c5e063e14f79a0d35439a65f3649a5da6b576adf40cb770d/prosegrinder-1.4.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-25 11:13:06",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "prosegrinder",
"github_project": "python-prosegrinder",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "prosegrinder"
}