From 68d7d84ddeb7275a1788a19dc89bd548aa9623c5 Mon Sep 17 00:00:00 2001 From: rachfop Date: Tue, 2 Jan 2024 08:19:16 -0800 Subject: [PATCH] Adds FleshKincaid and IELTS --- .vale.ini | 2 +- vale/styles/Readability/FleschKincaid.yml | 8 ++++++++ vale/styles/Readability/IELTS.yml | 13 +++++++++++++ vale/styles/Readability/meta.json | 4 ++++ 4 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 vale/styles/Readability/FleschKincaid.yml create mode 100644 vale/styles/Readability/IELTS.yml create mode 100644 vale/styles/Readability/meta.json diff --git a/.vale.ini b/.vale.ini index a4632f5..8f19642 100644 --- a/.vale.ini +++ b/.vale.ini @@ -2,4 +2,4 @@ StylesPath = vale/styles MinAlertLevel = suggestion Packages = Google, proselint [*] -BasedOnStyles = Vale, Google, proselint \ No newline at end of file +BasedOnStyles = Vale, Google, proselint, Readability \ No newline at end of file diff --git a/vale/styles/Readability/FleschKincaid.yml b/vale/styles/Readability/FleschKincaid.yml new file mode 100644 index 0000000..3f60f20 --- /dev/null +++ b/vale/styles/Readability/FleschKincaid.yml @@ -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" diff --git a/vale/styles/Readability/IELTS.yml b/vale/styles/Readability/IELTS.yml new file mode 100644 index 0000000..e8b30a6 --- /dev/null +++ b/vale/styles/Readability/IELTS.yml @@ -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" diff --git a/vale/styles/Readability/meta.json b/vale/styles/Readability/meta.json new file mode 100644 index 0000000..0ff71c3 --- /dev/null +++ b/vale/styles/Readability/meta.json @@ -0,0 +1,4 @@ +{ + "feed": "https://github.com/errata-ai/Readability/releases.atom", + "vale_version": ">=2.13.0" +} \ No newline at end of file