Skip to content

Commit

Permalink
Implement Spache Readability Scorer #5
Browse files Browse the repository at this point in the history
  • Loading branch information
Carmine DiMascio committed Dec 8, 2019
1 parent 554543b commit d0024ca
Show file tree
Hide file tree
Showing 10 changed files with 2,222 additions and 2 deletions.
8 changes: 8 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@

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

### Prequisites

1. Install deps
```
pip install .
python -m nltk.downloader punkt
```

### Code

1. Fork the repo
Expand Down
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ r.dale_chall()
r.ari()
r.linsear_write()
r.smog()
r.spache()
```

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

## Readability Metric Details and Properties
Expand Down Expand Up @@ -187,6 +189,22 @@ print(s.score)
print(s.grade_level)
```

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.

**_call:_**

```python
r.spache()
```

**_example:_**

```python
s = r.spache()
print(s.score)
print(s.grade_level)
```

### Linsear Write

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.
Expand Down
Loading

0 comments on commit d0024ca

Please sign in to comment.