[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/writegood-mode a00ba459e7 26/47: Modified the syllable est
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/writegood-mode a00ba459e7 26/47: Modified the syllable estimation function |
Date: |
Mon, 12 Dec 2022 21:01:41 -0500 (EST) |
branch: elpa/writegood-mode
commit a00ba459e799d06243594b1b3f6ac0448dd150ae
Author: Benjamin Beckwith <bnbeckwith@gmail.com>
Commit: Benjamin Beckwith <bnbeckwith@gmail.com>
Modified the syllable estimation function
Consecutive syllables are not counted as one. The endings -es -ed and -e
are subtracted from the overall count.
---
writegood-mode.el | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/writegood-mode.el b/writegood-mode.el
index 54b573830f..f45fe717a1 100755
--- a/writegood-mode.el
+++ b/writegood-mode.el
@@ -234,8 +234,13 @@
(how-many (regexp-opt-charset writegood-sentence-punctuation) rstart rend))
(defun writegood-count-syllables (rstart rend)
- "Count the number of syllables in the region bounded by RSTART and REND."
- (how-many (regexp-opt-charset writegood-vowels) rstart rend))
+ "Count the (approximate) number of syllables in the region bounded by RSTART
and REND.
+
+ Consecutive vowels count as one syllable. The endings -es -ed
+ and -e are not counted as syllables.
+ "
+ (- (how-many "[aeiouy]+" rstart rend)
+ (how-many "\\(es\\|ed\\|e\\)\\b" rstart rend)))
(defun writegood-fk-parameters (&optional rstart rend)
"Flesch-Kincaid reading parameters"
- [nongnu] elpa/writegood-mode edab9536c4 12/47: Merge pull request #1 from reedrelay/master, (continued)
- [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
- [nongnu] elpa/writegood-mode c4951a5317 40/47: Typo, ELPA Syncer, 2022/12/12
- [nongnu] elpa/writegood-mode 51180eab3a 06/47: Updated regexps to be multiline. Turned on case-insensitive matching, ELPA Syncer, 2022/12/12
- [nongnu] elpa/writegood-mode 0dc564c03f 04/47: Changed README to org-mode style. Updated content., ELPA Syncer, 2022/12/12
- [nongnu] elpa/writegood-mode 86385bf29c 07/47: Fixed weaselwords regexp to include word boundaries, ELPA Syncer, 2022/12/12
- [nongnu] elpa/writegood-mode 4031390291 13/47: Updated Readme.org to include alternative projects, ELPA Syncer, 2022/12/12
- [nongnu] elpa/writegood-mode 3dc7aec83a 20/47: Update writegood-mode.el, ELPA Syncer, 2022/12/12
- [nongnu] elpa/writegood-mode fb287d3db6 11/47: Update README.org, ELPA Syncer, 2022/12/12
- [nongnu] elpa/writegood-mode 0753af2c75 18/47: Require word end in passive voice regexp., ELPA Syncer, 2022/12/12
- [nongnu] elpa/writegood-mode a00ba459e7 26/47: Modified the syllable estimation function,
ELPA Syncer <=
- [nongnu] elpa/writegood-mode 3e860abd24 17/47: Ran dos2unix and fixed header conventions, ELPA Syncer, 2022/12/12
- [nongnu] elpa/writegood-mode 6368559c5e 15/47: Added 'literally', 'not rocket science', and 'outside the box' to the list of words/phrases to avoid, ELPA Syncer, 2022/12/12
- [nongnu] elpa/writegood-mode 7d9f0a746e 21/47: Nits, ELPA Syncer, 2022/12/12
- [nongnu] elpa/writegood-mode 32e41bbe59 43/47: Don't `require' `cl', ELPA Syncer, 2022/12/12