Skip to content

Commit

Permalink
Adds FleshKincaid and IELTS
Browse files Browse the repository at this point in the history
  • Loading branch information
rachfop committed Jan 2, 2024
1 parent b361d48 commit 68d7d84
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .vale.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ StylesPath = vale/styles
MinAlertLevel = suggestion
Packages = Google, proselint
[*]
BasedOnStyles = Vale, Google, proselint
BasedOnStyles = Vale, Google, proselint, Readability
8 changes: 8 additions & 0 deletions vale/styles/Readability/FleschKincaid.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
extends: metric
message: "Try to keep the Flesch–Kincaid grade level (%s) below 8."
link: https://en.wikipedia.org/wiki/Flesch%E2%80%93Kincaid_readability_tests

formula: |
(0.39 * (words / sentences)) + (11.8 * (syllables / words)) - 15.59
condition: "> 8"
13 changes: 13 additions & 0 deletions vale/styles/Readability/IELTS.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
extends: metric
message: "Try to keep the IELTS-Inspired Readability Score (%s) within the range suitable for your target audience."
link: https://www.ielts.org/about-the-test/how-ielts-is-scored

# Hypothetical formula inspired by aspects of IELTS
formula: |
(0.25 * (complex_words / words)) +
(0.25 * (long_words / words)) +
(0.25 * (syllables / words)) +
(0.25 * (words / sentences))
# Adjust based on the desired complexity of your content
condition: "> 7"
4 changes: 4 additions & 0 deletions vale/styles/Readability/meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"feed": "https://github.com/errata-ai/Readability/releases.atom",
"vale_version": ">=2.13.0"
}

0 comments on commit 68d7d84

Please sign in to comment.