Skip to content

Commit d0024ca

Browse files
author
Carmine DiMascio
committed
Implement Spache Readability Scorer #5
1 parent 554543b commit d0024ca

10 files changed

+2222
-2
lines changed

CONTRIBUTING.md

+8
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@
77

88
Need help? Reach out on [gitter](https://gitter.im/cdimascio-oss/community)
99

10+
### Prequisites
11+
12+
1. Install deps
13+
```
14+
pip install .
15+
python -m nltk.downloader punkt
16+
```
17+
1018
### Code
1119

1220
1. Fork the repo

README.md

+18
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ r.dale_chall()
3434
r.ari()
3535
r.linsear_write()
3636
r.smog()
37+
r.spache()
3738
```
3839

3940
**\*Note:** `text` must contain >= 100 words\*
@@ -47,6 +48,7 @@ r.smog()
4748
- [Coleman Liau Index](#coleman-liau-index)
4849
- [Gunning Fog](#gunning-fog)
4950
- [SMOG](#smog)
51+
- [Spache](#spache)
5052
- [Linsear Write](#linsear-write)
5153

5254
## Readability Metric Details and Properties
@@ -187,6 +189,22 @@ print(s.score)
187189
print(s.grade_level)
188190
```
189191

192+
The Spache Readability Formula is used for Primary-Grade Reading Materials, published in 1953 in The Elementary School Journal. The Spache Formula is best used to calculate the difficulty of text that falls at the 3rd grade level or below.
193+
194+
**_call:_**
195+
196+
```python
197+
r.spache()
198+
```
199+
200+
**_example:_**
201+
202+
```python
203+
s = r.spache()
204+
print(s.score)
205+
print(s.grade_level)
206+
```
207+
190208
### Linsear Write
191209

192210
Linsear Write is a readability metric for English text, purportedly developed for the United States Air Force to help them calculate the readability of their technical manuals.

0 commit comments

Comments
 (0)