[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/writegood-mode 0bb65772a5 39/47: Add comment about Reading
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/writegood-mode 0bb65772a5 39/47: Add comment about Reading Ease Score |
Date: |
Mon, 12 Dec 2022 21:01:42 -0500 (EST) |
branch: elpa/writegood-mode
commit 0bb65772a55c3b82ba30d5b5fd5ac7fbb0218e64
Author: zimoun <zimoun.toutoune@gmail.com>
Commit: zimoun <zimoun.toutoune@gmail.com>
Add comment about Reading Ease Score
---
writegood-mode.el | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/writegood-mode.el b/writegood-mode.el
index 7c41c38f6b..cd16a6999e 100644
--- a/writegood-mode.el
+++ b/writegood-mode.el
@@ -257,6 +257,20 @@
(sentences (float (writegood-count-sentences start end))))
(list sentences words syllables)))
+(defun writegood-reading-ease-score->comment (score)
+ "Rough meaning of the Flesch-Kincaid reading ease test.
+
+From Wikipedia URL
`https://en.wikipedia.org/wiki/Flesch–Kincaid_readability_tests'."
+ (cond
+ ((< score 0) "Ouch! (Proust litterature)")
+ ((and (<= 0 score) (< score 30.0)) "Very difficult (college graduate)")
+ ((and (<= 30.0 score) (< score 50.0)) "Difficult (almost college)")
+ ((and (<= 50.0 score) (< score 60.0)) "Fairly difficult (10-12th grade)")
+ ((and (<= 60.0 score) (< score 70.0)) "Plain English (8-9th grade)")
+ ((and (<= 70.0 score) (< score 80.0)) "Fairly easy (7th grade)")
+ ((and (<= 80.0 score) (< score 90.0)) "Easy (6th grade)")
+ ((<= 90.0 score) "Very easy (5th grade)")))
+
;;;###autoload
(defun writegood-reading-ease (&optional start end)
"Flesch-Kincaid reading ease test. Scores roughly between 0 and 100."
@@ -266,7 +280,8 @@
(words (nth 1 params))
(syllables (nth 2 params))
(score (- 206.835 (* 1.015 (/ words sentences)) (* 84.6 (/
syllables words)))))
- (message "Flesch-Kincaid reading ease score: %.2f" score)))
+ (message "Flesch-Kincaid reading ease score: %.2f. %s" score
+ (writegood-reading-ease-score->comment score))))
;;;###autoload
(defun writegood-grade-level (&optional start end)
- [nongnu] elpa/writegood-mode 599aed98f5 03/47: Fixed the link in the README to the original scripts, (continued)
- [nongnu] elpa/writegood-mode 599aed98f5 03/47: Fixed the link in the README to the original scripts, ELPA Syncer, 2022/12/12
- [nongnu] elpa/writegood-mode 41d8a193c1 24/47: Flesch-Kincaid tests, ELPA Syncer, 2022/12/12
- [nongnu] elpa/writegood-mode c772829f30 10/47: Blocks of comments are now checked as well. (See Test Text for examples), ELPA Syncer, 2022/12/12
- [nongnu] elpa/writegood-mode 07275921a1 22/47: Merge pull request #6 from frankshearar/fix-nits, ELPA Syncer, 2022/12/12
- [nongnu] elpa/writegood-mode 2dcba94eb2 33/47: Whitespaces, ELPA Syncer, 2022/12/12
- [nongnu] elpa/writegood-mode da662098e4 31/47: Fix issue of dynamically updating regexes, ELPA Syncer, 2022/12/12
- [nongnu] elpa/writegood-mode 3c068f389e 23/47: Updated revision to 1.3, ELPA Syncer, 2022/12/12
- [nongnu] elpa/writegood-mode 15f27658e5 28/47: Updated version string., ELPA Syncer, 2022/12/12
- [nongnu] elpa/writegood-mode a99896531a 35/47: Update Artbollocks link, ELPA Syncer, 2022/12/12
- [nongnu] elpa/writegood-mode 572fcbeab0 36/47: Fix Version and Last-Updated to use new policy, ELPA Syncer, 2022/12/12
- [nongnu] elpa/writegood-mode 0bb65772a5 39/47: Add comment about Reading Ease Score,
ELPA Syncer <=
- [nongnu] elpa/writegood-mode 664667dbe3 41/47: Merge pull request #21 from zimoun/master, ELPA Syncer, 2022/12/12
- [nongnu] elpa/writegood-mode ed42d918d9 44/47: Update changelog, ELPA Syncer, 2022/12/12
- [nongnu] elpa/writegood-mode 2ae759944a 45/47: Add additional custom regexps for weasel words and passive voice, ELPA Syncer, 2022/12/12
- [nongnu] elpa/writegood-mode 9da42fc558 02/47: Added github urls, ELPA Syncer, 2022/12/12
- [nongnu] elpa/writegood-mode 273a8befd9 09/47: Changed defconst into defvar, ELPA Syncer, 2022/12/12
- [nongnu] elpa/writegood-mode 3cd3d3bc80 27/47: Removed unused `writegood-vowels`, ELPA Syncer, 2022/12/12
- [nongnu] elpa/writegood-mode b71757ec33 42/47: Update version / fix some docstrings, ELPA Syncer, 2022/12/12
- [nongnu] elpa/writegood-mode d423f26bc2 46/47: Remove extra character from regexp, ELPA Syncer, 2022/12/12
- [nongnu] elpa/writegood-mode edab9536c4 12/47: Merge pull request #1 from reedrelay/master, ELPA Syncer, 2022/12/12
- [nongnu] elpa/writegood-mode b0eba77c4d 30/47: Fix customization definition of word lists, ELPA Syncer, 2022/12/12