Skip to content

Commit d6badbb

Browse files
author
Carmine DiMascio
committed
2 parents dbab28f + 5ef1b3e commit d6badbb

File tree

4 files changed

+47
-1
lines changed

4 files changed

+47
-1
lines changed

CONTRIBUTING.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,15 @@ _The following use [ARI](https://github.com/cdimascio/py-readability-metrics/blo
3939

4040
### Docs
4141

42+
Prequisites:
43+
1. Install Sphinx
44+
45+
```shell
46+
pip install -U sphinx m2r
47+
```
48+
49+
Modify Documentation
50+
4251
1. Fork the repo
4352
2. Navigate to `docs`
4453
3. Make a change
@@ -53,6 +62,14 @@ _The following use [ARI](https://github.com/cdimascio/py-readability-metrics/blo
5362

5463
Contributors should ignore the steps below.
5564

65+
Prerequisites:
66+
67+
```shell
68+
pip install twine
69+
```
70+
71+
publish
72+
5673
```shell
5774
rm -rf build dist py_readability_metrics.egg-info && python setup.py sdist bdist_wheel
5875
twine upload dist/*

docs/source/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ Here is some text explaining some complicated stuff
3636
r.ari()
3737
r.linsear_write()
3838
r.smog()
39+
r.spache()
3940

4041
## Readability Metrics
4142

@@ -50,6 +51,7 @@ Here is some text explaining some complicated stuff
5051
coleman_liau
5152
gunning_fog
5253
smog
54+
spache
5355
linsear_write
5456

5557
# Indices and tables

docs/source/spache.rst

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
SPACHE
2+
===========
3+
4+
5+
About
6+
^^^^^
7+
8+
G. Spache devised the Spache Readability Formula in 1953 through an article, A New Readability Formula for Primary-Grade Reading Materials, published in The Elementary School Journal. The formula calculates the grade level of a text sample based on sentence length and number of unfamiliar words. The Spache Formula considers “unfamiliar words” as words that 3rd grade and below do not recognize. The Spache Formula is best used to calculate the difficulty of text that falls at the 3rd grade level or below. [reference]_
9+
10+
Usage
11+
^^^^^
12+
13+
.. code-block:: python
14+
15+
r = Readability(text)
16+
17+
s = r.spache()
18+
19+
print(s.score)
20+
print(s.grade_level)
21+
22+
23+
References
24+
----------
25+
26+
.. [reference] `readabilityformulas.com <https://www.readabilityformulas.com/spache-readability-formula.php>`_
27+

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
setup(
99
name='py-readability-metrics',
10-
version='1.3.5',
10+
version='1.4.1',
1111
author='Carmine DiMAscio',
1212
author_email='cdimascio@gmail.com',
1313
description='Score text "Readability" with popular metrics such as Flesch-Kincaid, Gunning Fog, ARI, Dale Chall, SMOG, and more',

0 commit comments

Comments
 (0)