Name | prosegrinder JSON |
Version |
1.3.7
JSON |
| download |
home_page | |
Summary | A text analytics library for prose fiction. |
upload_time | 2023-10-28 14:25:27 |
maintainer | |
docs_url | None |
author | David L. Day |
requires_python | >=3.7.2,<4.0.0 |
license | GPLv3 |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# 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": "",
"name": "prosegrinder",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7.2,<4.0.0",
"maintainer_email": "",
"keywords": "",
"author": "David L. Day",
"author_email": "david@davidlday.com",
"download_url": "https://files.pythonhosted.org/packages/76/48/4d8a956300d004779fe65d6ad7f679f3cc5cf246e359373e2d604bd5c339/prosegrinder-1.3.7.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.3.7",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "5d1287468c1d22c26d59f940da28df260d4236c71dea8ec4672d409304d3329c",
"md5": "4f6b0c42be91af26dc1d40ed0e4fc62f",
"sha256": "32d2a3a81d5ac872c5e3dfded58c2311f101ad63c9d409d6e8bd8ac5529e1c1b"
},
"downloads": -1,
"filename": "prosegrinder-1.3.7-py3-none-any.whl",
"has_sig": false,
"md5_digest": "4f6b0c42be91af26dc1d40ed0e4fc62f",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7.2,<4.0.0",
"size": 24291,
"upload_time": "2023-10-28T14:25:25",
"upload_time_iso_8601": "2023-10-28T14:25:25.993215Z",
"url": "https://files.pythonhosted.org/packages/5d/12/87468c1d22c26d59f940da28df260d4236c71dea8ec4672d409304d3329c/prosegrinder-1.3.7-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "76484d8a956300d004779fe65d6ad7f679f3cc5cf246e359373e2d604bd5c339",
"md5": "1559ee37a8a321af9c28170eeca2f3ee",
"sha256": "b1701425c23c6da5ce290c6bc8a931d7c6c7be20a45f3b359e2a6ee6caaf5ec4"
},
"downloads": -1,
"filename": "prosegrinder-1.3.7.tar.gz",
"has_sig": false,
"md5_digest": "1559ee37a8a321af9c28170eeca2f3ee",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7.2,<4.0.0",
"size": 21542,
"upload_time": "2023-10-28T14:25:27",
"upload_time_iso_8601": "2023-10-28T14:25:27.553976Z",
"url": "https://files.pythonhosted.org/packages/76/48/4d8a956300d004779fe65d6ad7f679f3cc5cf246e359373e2d604bd5c339/prosegrinder-1.3.7.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-10-28 14:25:27",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "prosegrinder"
}