readscore 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. readscore-1.0.0/.gitignore +233 -0
  2. readscore-1.0.0/LICENSES/Apache-2.0.txt +73 -0
  3. readscore-1.0.0/LICENSES/LicenseRef-PlainMIT.md +32 -0
  4. readscore-1.0.0/LICENSES/MIT.md +22 -0
  5. readscore-1.0.0/PKG-INFO +113 -0
  6. readscore-1.0.0/README.md +89 -0
  7. readscore-1.0.0/docs-site/README.md +55 -0
  8. readscore-1.0.0/pyproject.toml +164 -0
  9. readscore-1.0.0/src/readscore/__about__.py +13 -0
  10. readscore-1.0.0/src/readscore/__init__.py +125 -0
  11. readscore-1.0.0/src/readscore/constants/about_metric.py +80 -0
  12. readscore-1.0.0/src/readscore/metrics/__init__.py +60 -0
  13. readscore-1.0.0/src/readscore/metrics/ari.py +85 -0
  14. readscore-1.0.0/src/readscore/metrics/coleman_liau.py +39 -0
  15. readscore-1.0.0/src/readscore/metrics/dale_chall.py +76 -0
  16. readscore-1.0.0/src/readscore/metrics/flesch.py +89 -0
  17. readscore-1.0.0/src/readscore/metrics/flesch_kincaid.py +35 -0
  18. readscore-1.0.0/src/readscore/metrics/gunning_fog.py +56 -0
  19. readscore-1.0.0/src/readscore/metrics/linsear_write.py +39 -0
  20. readscore-1.0.0/src/readscore/metrics/smog.py +98 -0
  21. readscore-1.0.0/src/readscore/metrics/spache.py +37 -0
  22. readscore-1.0.0/src/readscore/py.typed +0 -0
  23. readscore-1.0.0/src/readscore/readability.py +127 -0
  24. readscore-1.0.0/src/readscore/resources/__init__.py +36 -0
  25. readscore-1.0.0/src/readscore/resources/data/dale_chall_easy.txt +2950 -0
  26. readscore-1.0.0/src/readscore/resources/data/dale_chall_easy.txt.license +3 -0
  27. readscore-1.0.0/src/readscore/resources/data/dale_chall_porterstem.txt +2950 -0
  28. readscore-1.0.0/src/readscore/resources/data/dale_chall_porterstem.txt.license +3 -0
  29. readscore-1.0.0/src/readscore/resources/data/spache_easy.txt +1064 -0
  30. readscore-1.0.0/src/readscore/resources/data/spache_easy.txt.license +3 -0
  31. readscore-1.0.0/src/readscore/resources/data/spache_easy_porterstem.txt +1064 -0
  32. readscore-1.0.0/src/readscore/resources/data/spache_easy_porterstem.txt.license +3 -0
  33. readscore-1.0.0/src/readscore/resources/loader.py +40 -0
  34. readscore-1.0.0/src/readscore/resources/nltk_data/tokenizers/punkt_tab/english/abbrev_types.txt +156 -0
  35. readscore-1.0.0/src/readscore/resources/nltk_data/tokenizers/punkt_tab/english/abbrev_types.txt.license +3 -0
  36. readscore-1.0.0/src/readscore/resources/nltk_data/tokenizers/punkt_tab/english/collocations.tab +37 -0
  37. readscore-1.0.0/src/readscore/resources/nltk_data/tokenizers/punkt_tab/english/collocations.tab.license +3 -0
  38. readscore-1.0.0/src/readscore/resources/nltk_data/tokenizers/punkt_tab/english/ortho_context.tab +20366 -0
  39. readscore-1.0.0/src/readscore/resources/nltk_data/tokenizers/punkt_tab/english/ortho_context.tab.license +3 -0
  40. readscore-1.0.0/src/readscore/resources/nltk_data/tokenizers/punkt_tab/english/sent_starters.txt +39 -0
  41. readscore-1.0.0/src/readscore/resources/nltk_data/tokenizers/punkt_tab/english/sent_starters.txt.license +3 -0
  42. readscore-1.0.0/src/readscore/resources/stemmer.py +30 -0
  43. readscore-1.0.0/src/readscore/text/__init__.py +40 -0
  44. readscore-1.0.0/src/readscore/text/analyzer.py +134 -0
  45. readscore-1.0.0/src/readscore/text/statistics.py +20 -0
  46. readscore-1.0.0/src/readscore/text/syllables.py +40 -0
  47. readscore-1.0.0/src/readscore/text/tokenizer.py +49 -0
  48. readscore-1.0.0/src/readscore/types/__init__.py +80 -0
  49. readscore-1.0.0/src/readscore/types/_interfaces.py +74 -0
  50. readscore-1.0.0/src/readscore/types/enums.py +240 -0
  51. readscore-1.0.0/src/readscore/types/results.py +93 -0
@@ -0,0 +1,233 @@
1
+ # SPDX-FileCopyrightText: 2025 Knitli Inc.
2
+ # SPDX-FileContributor: Adam Poulemanos <adam@knit.li>
3
+ #
4
+ # SPDX-License-Identifier: MIT OR Apache-2.0
5
+
6
+ # local configs
7
+ .claude/*.local.*
8
+ **/*.local.*
9
+ **/*.local.*.license
10
+ mise.local.toml
11
+ mise.*.local.toml
12
+ mise.local.toml.license
13
+ mise.*.local.toml.license
14
+ hk.local.pkl.license
15
+ .ruff_cache
16
+ .roo/mcp.json
17
+ # local terminal zsh config -- can contain sensitive info
18
+ .vscode/terminal.local.zsh
19
+ *mcp*.backup*
20
+
21
+ # CLAUDE.md -- we symlink this file from AGENTS.md in the setup script
22
+ CLAUDE.md
23
+ GEMINI.md
24
+
25
+ # non-public working files
26
+ .workbench/
27
+ .devenv/
28
+ .testbuild/
29
+ .history
30
+ .temp/
31
+
32
+ # Workspace files
33
+ *.code-workspace
34
+ *.code-workspace.license
35
+
36
+ # mkdocs
37
+ .cache
38
+
39
+ # Playwright
40
+ logs
41
+ _.log
42
+ report.[0-9]_[0-9]_[0-9]_[0-9]_.json
43
+ out
44
+ dist/
45
+ *.tgz
46
+ coverage
47
+ *.lcov
48
+ .env
49
+ *.local.*
50
+ *.local
51
+ .eslintcache
52
+ .cache
53
+ !.cache/uv/
54
+ *.tsbuildinfo
55
+ **/dist/
56
+
57
+ # venv
58
+ **/.venv
59
+ .venv/
60
+
61
+ # node and docs-site
62
+ node_modules/
63
+ **/node_modules/
64
+ docs-site/dist/
65
+ docs-site/.cache/
66
+ docs-site/.astro/
67
+ docs-site/.wrangler/
68
+
69
+ # Cache files
70
+ **/__pycache__/
71
+ **/.pytest_cache/
72
+ __pycache__/
73
+ .pytest_cache/
74
+ .eslintcache
75
+ # Visual Studio cache files
76
+ # files ending in .cache can be ignored
77
+ *.[Cc]ache
78
+ .pytest_cache
79
+
80
+ dist/
81
+ site/
82
+ *.tar
83
+ *.tar.*
84
+ *.jar
85
+ *.exe
86
+ *.msi
87
+ *.zip
88
+ *.tgz
89
+ *.log
90
+ *.log.*
91
+ *.sig
92
+
93
+ .DS_Store
94
+ *.swp
95
+
96
+ # Installer logs
97
+ pip-log.txt
98
+ pip-delete-this-directory.txt
99
+
100
+ # Local config
101
+ ipython_config.py
102
+
103
+ # Environments
104
+ .env
105
+ .venv
106
+ env/
107
+ venv/
108
+ ENV/
109
+ env.bak/
110
+ venv.bak/
111
+
112
+ # Build results
113
+ [Dd]ebug/
114
+ [Dd]ebugPublic/
115
+ [Rr]elease/
116
+ [Rr]eleases/
117
+ x64/
118
+ x86/
119
+ [Ww][Ii][Nn]32/
120
+ [Aa][Rr][Mm]/
121
+ [Aa][Rr][Mm]64/
122
+ bld/
123
+ [Oo]bj/
124
+ [Ll]og/
125
+ [Ll]ogs/
126
+
127
+ # Files built by Visual Studio
128
+ *_i.c
129
+ *_p.c
130
+ *_h.h
131
+ *.ilk
132
+ *.meta
133
+ *.obj
134
+ *.iobj
135
+ *.pch
136
+ *.pdb
137
+ *.ipdb
138
+ *.pgc
139
+ *.pgd
140
+ *.rsp
141
+ *.sbr
142
+ *.tlb
143
+ *.tli
144
+ *.tlh
145
+ *.tmp
146
+ *.tmp_proj
147
+ *_wpftmp.csproj
148
+ *.log
149
+ *.tlog
150
+ *.vspscc
151
+ *.vssscc
152
+ .builds
153
+ *.pidb
154
+ *.svclog
155
+ *.scc
156
+
157
+ # Including strong name files can present a security risk
158
+ # (https://github.com/github/gitignore/pull/2483#issue-259490424)
159
+ *.snk
160
+
161
+ # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
162
+ bower_components/
163
+
164
+ # Local History for Visual Studio Code
165
+ .history/
166
+ lib64/
167
+ remote-debug-profile/
168
+
169
+ # zcomp and zhistory files
170
+ .vscode/zsh/.zcompdump
171
+ .vscode/zsh/.zcompdump-*
172
+ .vscode/zsh/.zsh_history
173
+
174
+ __pycache__/
175
+ # //!SECTION EXCEPTIONS -- Put all inverted ("!") rules at the end of the file!
176
+
177
+ # but keep track of directories ending in .cache
178
+ !?*.[Cc]ache/
179
+
180
+ # Leave launch.json public
181
+ !.vscode/launch.json
182
+ !.vscode/launch.json.license
183
+
184
+ # Leave settings.json and workspace zshrc/init public
185
+ !.vscode/tasks.json
186
+ !.vscode/tasks.json.license
187
+ !.vscode/extensions.json
188
+ !.vscode/extensions.json.license
189
+ !.vscode/mcp.json
190
+ !.vscode/mcp.json.license
191
+ !.vscode/settings.json
192
+ !.vscode/settings.json.license
193
+ !.vscode/terminal.extra.zsh
194
+ !.vscode/terminal.extra.zsh.example
195
+ !.vscode/zsh/.zshrc
196
+
197
+ # project-level git files that should be public and easily get caught in ignores
198
+ !.gitattributes
199
+ !.gitconfig.license
200
+ !.gitignore
201
+ !.gitconfig
202
+ !.mailmap
203
+
204
+ !.cache/uv/
205
+
206
+ # Generated Files
207
+ **/htmlcov/
208
+ htmlcov/
209
+ .coverage
210
+ .coveragexml
211
+ .vscode/.history/
212
+ coverage.xml
213
+ docs-site/dist/
214
+ htmlcov/
215
+ lcov-report/
216
+ server.json
217
+ server.json.license
218
+ server.yaml
219
+ server.yaml.license
220
+ src/readscore/__about__.py
221
+ test-results.xml
222
+
223
+ .jj/
224
+
225
+ # Finally, stuff we *really* don't want to let leak
226
+ .local.env
227
+ .codeweaver.local.env
228
+ .codeweaver/local.env
229
+ mise.local.toml
230
+ mise.local.env
231
+
232
+ .gemini/
233
+ gha-creds-*.json
@@ -0,0 +1,73 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
10
+
11
+ "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
12
+
13
+ "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
14
+
15
+ "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
16
+
17
+ "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
18
+
19
+ "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
20
+
21
+ "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
22
+
23
+ "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
24
+
25
+ "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
26
+
27
+ "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
28
+
29
+ 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
30
+
31
+ 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
32
+
33
+ 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
34
+
35
+ (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
36
+
37
+ (b) You must cause any modified files to carry prominent notices stating that You changed the files; and
38
+
39
+ (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
40
+
41
+ (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readscore copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
42
+
43
+ You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
44
+
45
+ 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
46
+
47
+ 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
48
+
49
+ 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
50
+
51
+ 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
52
+
53
+ 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
54
+
55
+ END OF TERMS AND CONDITIONS
56
+
57
+ APPENDIX: How to apply the Apache License to your work.
58
+
59
+ To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
60
+
61
+ Copyright [yyyy] [name of copyright owner]
62
+
63
+ Licensed under the Apache License, Version 2.0 (the "License");
64
+ you may not use this file except in compliance with the License.
65
+ You may obtain a copy of the License at
66
+
67
+ http://www.apache.org/licenses/LICENSE-2.0
68
+
69
+ Unless required by applicable law or agreed to in writing, software
70
+ distributed under the License is distributed on an "AS IS" BASIS,
71
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
72
+ See the License for the specific language governing permissions and
73
+ limitations under the License.
@@ -0,0 +1,32 @@
1
+ # Plain MIT License
2
+
3
+ Copyright Notice: (c) 2026 PlainLicense
4
+
5
+ ## You Can Do Anything with The Work
6
+
7
+ We give you permission to:
8
+ - **Use** it
9
+ - **Copy** it
10
+ - **Change** it
11
+ - **Share** it
12
+ - **Sell** it
13
+ - **Mix** or put it together with other works
14
+
15
+ You can do all of these things **for free**. You can do them for any reason.
16
+ Everyone else can do these things too, as long as they follow these rules.
17
+
18
+ ## **If** You Give Us Credit and Keep This Notice
19
+
20
+ You can do any of these things with the work, **if you follow these two rules**:
21
+
22
+ 1. **You must keep our copyright notice**. This tells people who created the work.
23
+ 2. **You must *also* keep this notice with all versions of the work**.
24
+
25
+ ## No Promises
26
+
27
+ We give the work to you as it is, without any promises or guarantees. This means:
28
+
29
+ - **"As is"**: You get the work exactly how it is, including anything broken.
30
+ - **No Guarantees**: We are not promising it will work well for any specific tasks, or that it will not break any rules. It may not work at all.
31
+
32
+ We are not responsible for any problems or damages that happen because of the work. You use it at your own risk.
@@ -0,0 +1,22 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 PlainLicense
4
+ Copyright (c) 2018 Carmine M DiMascio
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in all
14
+ copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ SOFTWARE.
@@ -0,0 +1,113 @@
1
+ Metadata-Version: 2.4
2
+ Name: readscore
3
+ Version: 1.0.0
4
+ Summary: Modernized readability scoring for Python
5
+ Project-URL: Changelog, https://github.com/plainlicense/readscore/releases
6
+ Project-URL: Documentation, https://docs.plainlicense.org/readscore/
7
+ Project-URL: Issues, https://github.com/plainlicense/readscore/issues
8
+ Project-URL: Repository, https://github.com/plainlicense/readscore
9
+ Author: Carmine M DiMascio
10
+ Author-email: PlainLicense <hello@plainlicense.org>, Adam Poulemanos <adam@plainlicense.org>
11
+ License-File: LICENSES/Apache-2.0.txt
12
+ License-File: LICENSES/LicenseRef-PlainMIT.md
13
+ License-File: LICENSES/MIT.md
14
+ Classifier: Development Status :: 5 - Production/Stable
15
+ Classifier: License :: OSI Approved :: MIT License
16
+ Classifier: Operating System :: OS Independent
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Programming Language :: Python :: 3.14
20
+ Requires-Python: >=3.12
21
+ Requires-Dist: lateimport>=0.1.0
22
+ Requires-Dist: nltk>=3.9.3
23
+ Description-Content-Type: text/markdown
24
+
25
+ <!--
26
+ SPDX-FileCopyrightText: 2026 PlainLicense
27
+
28
+ SPDX-License-Identifier: LicenseRef-PlainMIT OR MIT
29
+ -->
30
+
31
+ <p align="center">
32
+ <img src="docs-site/src/assets/images/readscore_logo.svg" alt="readscore" width="120" />
33
+ </p>
34
+
35
+ # readscore
36
+ [![MIT license](https://img.shields.io/badge/License-MIT-green.svg)](https://lbesson.mit-license.org/)
37
+
38
+ Score the _readability_ of text using popular readability formulas and metrics including: [Flesch Kincaid Grade Level](#flesch-kincaid-grade-level), [Flesch Reading Ease](#flesch-reading-ease), [Gunning Fog Index](#gunning-fog), [Dale Chall Readability](#dale-chall-readability), [Automated Readability Index (ARI)](#automated-readability-index-ari), [Coleman Liau Index](#coleman-liau-index), [Linsear Write](#linsear-write), [SMOG](#smog), and [SPACHE](#spache).
39
+
40
+ [![GitHub stars](https://img.shields.io/github/stars/plainlicense/readscore.svg?style=social&label=Star&maxAge=2592000)](https://GitHub.com/plainlicense/readscore/stargazers/)
41
+
42
+ ## Prerequisites
43
+
44
+ - Python 3.12 or higher
45
+
46
+ ## Installation
47
+
48
+ ```bash
49
+ pip install readscore
50
+ ```
51
+
52
+ ## Quick Start
53
+
54
+ ```python
55
+ from readscore import Readability
56
+
57
+ text = """
58
+ In linguistics, the Gunning fog index is a readability test for English writing.
59
+ The index estimates the years of formal education a person needs to understand
60
+ the text on the first reading. For instance, a fog index of 12 requires the
61
+ reading level of a United States high school senior (around 18 years old).
62
+ The test was developed in 1952 by Robert Gunning, an American businessman
63
+ who had been involved in newspaper and textbook publishing.
64
+ """
65
+
66
+ r = Readability(text)
67
+
68
+ # Automated Readability Index (ARI)
69
+ ari = r.ari()
70
+ print(f"ARI Score: {ari.score}")
71
+ print(f"Grade Levels: {ari.grade_levels}")
72
+ print(f"Ages: {ari.ages}")
73
+
74
+ # Flesch Reading Ease
75
+ flesch = r.flesch()
76
+ print(f"Flesch Score: {flesch.score}")
77
+ print(f"Ease: {flesch.ease}")
78
+
79
+ # Flesch-Kincaid Grade Level
80
+ fk = r.flesch_kincaid()
81
+ print(f"FK Score: {fk.score}")
82
+ print(f"Grade Level: {fk.grade_level}")
83
+
84
+ # Get all statistics used for calculation
85
+ stats = r.statistics()
86
+ print(stats)
87
+
88
+ # For custom metrics, use r.stats (returns a StatSummary object)
89
+ print(r.stats)
90
+ ```
91
+
92
+ For score interpretation, metric selection, and full API docs, see **[docs.plainlicense.org/readscore](https://docs.plainlicense.org/readscore/)**.
93
+
94
+ ## About
95
+
96
+ readscore is a fork of the excellent [py-readability-metrics](https://github.com/cdimascio/py-readability-metrics) library by [Carmine DiMascio (@cdimascio)](https://github.com/cdimascio). We wanted to build on the great work that Carmine did, and add some additional features and metrics as an engine for future [Plain License](https://plainlicense.org/) projects, like our in-development CLI tool, [**plainr**](https://github.com/plainlicense/plainr) and similar plain language focused CI/CD tools. We also wanted to make some major breaking changes to the API and add robust typing support, so we decided to fork the project and start fresh.
97
+
98
+ ## Supported Metrics
99
+
100
+ - **ARI** (Automated Readability Index)
101
+ - **Coleman-Liau** Index
102
+ - **Dale-Chall** Readability Score
103
+ - **Flesch** Reading Ease
104
+ - **Flesch-Kincaid** Grade Level
105
+ - **Gunning Fog** Index
106
+ - **Linsear Write** Formula
107
+ - **SMOG** Index
108
+ - **Spache** Readability Formula
109
+
110
+ ## Acknowledgements
111
+
112
+ readscore is a fork of [py-readability-metrics](https://github.com/cdimascio/py-readability-metrics)
113
+ by [Carmine DiMascio](https://github.com/cdimascio). We are grateful for that foundation.
@@ -0,0 +1,89 @@
1
+ <!--
2
+ SPDX-FileCopyrightText: 2026 PlainLicense
3
+
4
+ SPDX-License-Identifier: LicenseRef-PlainMIT OR MIT
5
+ -->
6
+
7
+ <p align="center">
8
+ <img src="docs-site/src/assets/images/readscore_logo.svg" alt="readscore" width="120" />
9
+ </p>
10
+
11
+ # readscore
12
+ [![MIT license](https://img.shields.io/badge/License-MIT-green.svg)](https://lbesson.mit-license.org/)
13
+
14
+ Score the _readability_ of text using popular readability formulas and metrics including: [Flesch Kincaid Grade Level](#flesch-kincaid-grade-level), [Flesch Reading Ease](#flesch-reading-ease), [Gunning Fog Index](#gunning-fog), [Dale Chall Readability](#dale-chall-readability), [Automated Readability Index (ARI)](#automated-readability-index-ari), [Coleman Liau Index](#coleman-liau-index), [Linsear Write](#linsear-write), [SMOG](#smog), and [SPACHE](#spache).
15
+
16
+ [![GitHub stars](https://img.shields.io/github/stars/plainlicense/readscore.svg?style=social&label=Star&maxAge=2592000)](https://GitHub.com/plainlicense/readscore/stargazers/)
17
+
18
+ ## Prerequisites
19
+
20
+ - Python 3.12 or higher
21
+
22
+ ## Installation
23
+
24
+ ```bash
25
+ pip install readscore
26
+ ```
27
+
28
+ ## Quick Start
29
+
30
+ ```python
31
+ from readscore import Readability
32
+
33
+ text = """
34
+ In linguistics, the Gunning fog index is a readability test for English writing.
35
+ The index estimates the years of formal education a person needs to understand
36
+ the text on the first reading. For instance, a fog index of 12 requires the
37
+ reading level of a United States high school senior (around 18 years old).
38
+ The test was developed in 1952 by Robert Gunning, an American businessman
39
+ who had been involved in newspaper and textbook publishing.
40
+ """
41
+
42
+ r = Readability(text)
43
+
44
+ # Automated Readability Index (ARI)
45
+ ari = r.ari()
46
+ print(f"ARI Score: {ari.score}")
47
+ print(f"Grade Levels: {ari.grade_levels}")
48
+ print(f"Ages: {ari.ages}")
49
+
50
+ # Flesch Reading Ease
51
+ flesch = r.flesch()
52
+ print(f"Flesch Score: {flesch.score}")
53
+ print(f"Ease: {flesch.ease}")
54
+
55
+ # Flesch-Kincaid Grade Level
56
+ fk = r.flesch_kincaid()
57
+ print(f"FK Score: {fk.score}")
58
+ print(f"Grade Level: {fk.grade_level}")
59
+
60
+ # Get all statistics used for calculation
61
+ stats = r.statistics()
62
+ print(stats)
63
+
64
+ # For custom metrics, use r.stats (returns a StatSummary object)
65
+ print(r.stats)
66
+ ```
67
+
68
+ For score interpretation, metric selection, and full API docs, see **[docs.plainlicense.org/readscore](https://docs.plainlicense.org/readscore/)**.
69
+
70
+ ## About
71
+
72
+ readscore is a fork of the excellent [py-readability-metrics](https://github.com/cdimascio/py-readability-metrics) library by [Carmine DiMascio (@cdimascio)](https://github.com/cdimascio). We wanted to build on the great work that Carmine did, and add some additional features and metrics as an engine for future [Plain License](https://plainlicense.org/) projects, like our in-development CLI tool, [**plainr**](https://github.com/plainlicense/plainr) and similar plain language focused CI/CD tools. We also wanted to make some major breaking changes to the API and add robust typing support, so we decided to fork the project and start fresh.
73
+
74
+ ## Supported Metrics
75
+
76
+ - **ARI** (Automated Readability Index)
77
+ - **Coleman-Liau** Index
78
+ - **Dale-Chall** Readability Score
79
+ - **Flesch** Reading Ease
80
+ - **Flesch-Kincaid** Grade Level
81
+ - **Gunning Fog** Index
82
+ - **Linsear Write** Formula
83
+ - **SMOG** Index
84
+ - **Spache** Readability Formula
85
+
86
+ ## Acknowledgements
87
+
88
+ readscore is a fork of [py-readability-metrics](https://github.com/cdimascio/py-readability-metrics)
89
+ by [Carmine DiMascio](https://github.com/cdimascio). We are grateful for that foundation.
@@ -0,0 +1,55 @@
1
+ <!--
2
+ SPDX-FileCopyrightText: 2026 PlainLicense
3
+
4
+ SPDX-License-Identifier: LicenseRef-PlainMIT OR MIT
5
+ -->
6
+
7
+ # Starlight Starter Kit: Basics
8
+
9
+ [![Built with Starlight](https://astro.badg.es/v2/built-with-starlight/tiny.svg)](https://starlight.astro.build)
10
+
11
+ ```
12
+ npm create astro@latest -- --template starlight
13
+ ```
14
+
15
+ > πŸ§‘β€πŸš€ **Seasoned astronaut?** Delete this file. Have fun!
16
+
17
+ ## πŸš€ Project Structure
18
+
19
+ Inside of your Astro + Starlight project, you'll see the following folders and files:
20
+
21
+ ```
22
+ .
23
+ β”œβ”€β”€ public/
24
+ β”œβ”€β”€ src/
25
+ β”‚ β”œβ”€β”€ assets/
26
+ β”‚ β”œβ”€β”€ content/
27
+ β”‚ β”‚ └── docs/
28
+ β”‚ └── content.config.ts
29
+ β”œβ”€β”€ astro.config.mjs
30
+ β”œβ”€β”€ package.json
31
+ └── tsconfig.json
32
+ ```
33
+
34
+ Starlight looks for `.md` or `.mdx` files in the `src/content/docs/` directory. Each file is exposed as a route based on its file name.
35
+
36
+ Images can be added to `src/assets/` and embedded in Markdown with a relative link.
37
+
38
+ Static assets, like favicons, can be placed in the `public/` directory.
39
+
40
+ ## 🧞 Commands
41
+
42
+ All commands are run from the root of the project, from a terminal:
43
+
44
+ | Command | Action |
45
+ | :------------------------ | :----------------------------------------------- |
46
+ | `npm install` | Installs dependencies |
47
+ | `npm run dev` | Starts local dev server at `localhost:4321` |
48
+ | `npm run build` | Build your production site to `./dist/` |
49
+ | `npm run preview` | Preview your build locally, before deploying |
50
+ | `npm run astro ...` | Run CLI commands like `astro add`, `astro check` |
51
+ | `npm run astro -- --help` | Get help using the Astro CLI |
52
+
53
+ ## πŸ‘€ Want to learn more?
54
+
55
+ Check out [Starlight’s docs](https://starlight.astro.build/), read [the Astro documentation](https://docs.astro.build), or jump into the [Astro Discord server](https://astro.build/chat).