diff --git a/CHANGELOG.md b/CHANGELOG.md
index f0856575f..60b20d095 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -20,7 +20,7 @@
## [3.3.0](https://github.com/BLKSerene/Wordless/releases/tag/3.3.0) - ??/??/2023
### 🎉 New Features
-- Settings: Add Settings - Measures - Readability - Automated Readability Index / Bormuth's Grade Placement / Coleman's Readability Formula / Dale-Chall Readability Formula / Danielson-Bryan's Readability Formula / Flesch Reading Ease / Gunning Fog Index / Spache Grade Level / Tränkle & Bailer's Readability Formula
+- Settings: Add Settings - Measures - Readability - Automated Readability Index / Bormuth's Grade Placement / Coleman's Readability Formula / Dale-Chall Readability Formula / Danielson-Bryan's Readability Formula / Flesch Reading Ease / Flesch Reading Ease (Farr-Jenkins-Paterson) / Gunning Fog Index / Spache Grade Level / Tränkle & Bailer's Readability Formula
- Utils: Add khmer-nltk's Khmer sentence tokenizer, word tokenizer, and part-of-speech tagger
- Utils: Add PyThaiNLP's perceptron part-of-speech tagger (Blackboard)
- Utils: Add spaCy's Korean sentence recognizer, word tokenizer, part-of-speech tagger, lemmatizer, and dependency parser
@@ -30,7 +30,7 @@
### ✨ Improvements
- Utils: Update Wordless's sentence and sentence segment splitters
-- Work Area: Update Profiler - Readability - Automated Readability Index / Dale-Chall Readability Formula / Flesch Reading Ease / Gunning Fog Index / Spache Grade Level
+- Work Area: Update Profiler - Readability - Automated Readability Index / Dale-Chall Readability Formula / Flesch Reading Ease / Flesch Reading Ease (Farr-Jenkins-Paterson) / Gunning Fog Index / Spache Grade Level
### 📌 Bugfixes
- Work Area: Fix Concordancer - Generation Settings - Width unit - Character
diff --git a/doc/doc_eng.md b/doc/doc_eng.md
index a11d9f76b..6a04bee9a 100644
--- a/doc/doc_eng.md
+++ b/doc/doc_eng.md
@@ -969,8 +969,11 @@ Flesch Reading Ease:
\text{RE}_\text{Ukrainian} &= 206.84 - 28.3 \times \text{wl} - 5.93 \times \text{sl}
\end{align*}
-Flesch Reading Ease (Simplified):
- \text{RE} = 1.599 \times \left(\frac{\text{NumWords1Syl}}{\text{NumWords}} \times 100\right) - 1.015 \times \frac{\text{NumWords}}{\text{NumSentences}} - 31.517
+Flesch Reading Ease (Farr-Jenkins-Paterson):
+ \begin{align*}
+ \text{RE} &= 1.599 \times \left(\frac{\text{NumWords1Syl}}{\text{NumWords}} \times 100\right) - 1.015 \times \frac{\text{NumWords}}{\text{NumSentences}} - 31.517 \\
+ \text{RE}_\text{Farr-Jenkins-Paterson} &= 8.4335 - 0.0648 \times \left(\frac{\text{NumWords1Syl}}{\text{NumWords}} \times 100\right) + 0.0923 \times \frac{\text{NumWords}}{\text{NumSentences}}
+ \end{align*}
FORCAST Grade Level:
\text{RGL} = 20.43 - 0.11 \times \text{NumWords1Syl}
@@ -1060,7 +1063,7 @@ Measure of Readability|Formula
Easy Listening Formula¹ ([Fang, 1966](#ref-fang-1966))|![Formula](/doc/measures/readability/elf.svg)
Flesch-Kincaid Grade Level¹ ([Kincaid et al., 1975](#ref-kincaid-et-al-1975))|![Formula](/doc/measures/readability/gl.svg)
Flesch Reading Ease¹³ ([Flesch, 1948](#ref-flesch-1948) Powers-Sumner-Kearl: [Powers et al., 1958](#ref-powers-et-al-1958) Dutch: [Douma, 1960](#ref-douma-1960); [Brouwer, 1963](#ref-brouwer-1963) French: [Kandel & Moles, 1958](#ref-kandel-moles-1958) German: [Amstad, 1978](#ref-amstad-1978) Italian: [Franchina & Vacca, 1986](#ref-franchina-vacca-1986) Russian: [Oborneva, 2006](#ref-oborneva-2006) Spanish: [Fernández Huerta, 1959](#ref-fernandez-huerta-1959); [Szigriszt Pazos, 1993](#ref-szigrisze-pazos-1993) Ukrainian: [Partiko, 2001](#ref-partiko-2001))|![Formula](/doc/measures/readability/re.svg)
-Flesch Reading Ease (Simplified)¹ ([Farr et al., 1951](#ref-farr-et-al-1951))|![Formula](/doc/measures/readability/re_simplified.svg)
+Flesch Reading Ease (Farr-Jenkins-Paterson)¹³ ([Farr et al., 1951](#ref-farr-et-al-1951) Powers-Sumner-Kearl: [Powers et al., 1958](#ref-powers-et-al-1958))|![Formula](/doc/measures/readability/re_farr'-jenkins_paterson.svg)
FORCAST Grade Level¹ ([Caylor & Sticht, 1973](#ref-caylor-sticht-1973))|![Formula](/doc/measures/readability/rgl.svg)
* **One sample of 150 words** would be taken randomly from the text, so the text should be **at least 150 words long**.
Fórmula de comprensibilidad de Gutiérrez de Polini ([Gutiérrez de Polini, 1972](#ref-gutierrez-de-polini-1972))|![Formula](/doc/measures/readability/cp.svg)
* This measure applies only to **Spanish texts**.
Fórmula de Crawford¹ ([Crawford, 1985](#ref-crawford-1985))|![Formula](/doc/measures/readability/formula_de_crawford.svg)
* This measure applies only to **Spanish texts**.
@@ -1476,7 +1479,7 @@ Measure of Effect Size|Formula
[67] [**^**](#ref-odds-ratio) Pojanapunya, P., & Todd, R. W. (2016). Log-likelihood and odds ratio keyness statistics for different purposes of keyword analysis. *Corpus Linguistics and Linguistic Theory*, *15*(1), pp. 133–167. https://doi.org/10.1515/cllt-2015-0030
-[68] [**^**](#ref-x-c50) [**^**](#ref-re) Powers, R. D., Sumner, W. A., & Kearl, B. E. (1958). A recalculation of four adult readability formulas. *Journal of Educational Psychology*, *49*(2), 99–105. https://doi.org/10.1037/h0043254
+[68] [**^**](#ref-x-c50) [**^**](#ref-re) [**^**](#ref-re-farr-jenkins-paterson) Powers, R. D., Sumner, W. A., & Kearl, B. E. (1958). A recalculation of four adult readability formulas. *Journal of Educational Psychology*, *49*(2), 99–105. https://doi.org/10.1037/h0043254
[69] [**^**](#ref-poisson-collocation-measure) Quasthoff, U., & Wolff, C. (2002). The poisson collocation measure and its applications. *Proceedings of 2nd International Workshop on Computational Approaches to Collocations*. IEEE.
diff --git a/doc/measures/readability/re_farr_jenkins_paterson.svg b/doc/measures/readability/re_farr_jenkins_paterson.svg
new file mode 100644
index 000000000..dcfe492da
--- /dev/null
+++ b/doc/measures/readability/re_farr_jenkins_paterson.svg
@@ -0,0 +1,220 @@
+
+
+
\ No newline at end of file
diff --git a/doc/measures/readability/re_simplified.svg b/doc/measures/readability/re_simplified.svg
deleted file mode 100644
index b1ec1e3b1..000000000
--- a/doc/measures/readability/re_simplified.svg
+++ /dev/null
@@ -1,108 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/tests/wl_tests_measures/test_measures_readability.py b/tests/wl_tests_measures/test_measures_readability.py
index b22f17b3a..684bba30f 100644
--- a/tests/wl_tests_measures/test_measures_readability.py
+++ b/tests/wl_tests_measures/test_measures_readability.py
@@ -356,21 +356,27 @@ def test_re_flesch():
assert flesch_re_afr_12 == 206.835 - 0.846 * (18 / 12 * 100) - 1.015 * (12 / 3)
assert flesch_re_other_12 == 'no_support'
-def test_re_simplified():
- flesch_re_simplified_eng_0 = wl_measures_readability.re_simplified(main, test_text_eng_0)
- flesch_re_simplified_eng_12 = wl_measures_readability.re_simplified(main, test_text_eng_12)
- flesch_re_simplified_spa_12 = wl_measures_readability.re_simplified(main, test_text_spa_12)
- flesch_re_simplified_other_12 = wl_measures_readability.re_simplified(main, test_text_other_12)
-
- print('Flesch Reading Ease (Simplified):')
- print(f'\teng/0: {flesch_re_simplified_eng_0}')
- print(f'\teng/12: {flesch_re_simplified_eng_12}')
- print(f'\tspa/12: {flesch_re_simplified_spa_12}')
- print(f'\tother/12: {flesch_re_simplified_other_12}')
-
- assert flesch_re_simplified_eng_0 == 'text_too_short'
- assert flesch_re_simplified_eng_12 == flesch_re_simplified_spa_12 == 1.599 * (9 / 12 * 100) - 1.015 * (12 / 3) - 31.517
- assert flesch_re_simplified_other_12 == 'no_support'
+def test_re_farr_jenkins_paterson():
+ re_farr_jenkins_paterson_eng_0 = wl_measures_readability.re_farr_jenkins_paterson(main, test_text_eng_0)
+ settings['re_farr_jenkins_paterson']['use_powers_sumner_kearl_variant'] = False
+ re_farr_jenkins_paterson_eng_12 = wl_measures_readability.re_farr_jenkins_paterson(main, test_text_eng_12)
+ settings['re_farr_jenkins_paterson']['use_powers_sumner_kearl_variant'] = True
+ re_farr_jenkins_paterson_eng_12_psk = wl_measures_readability.re_farr_jenkins_paterson(main, test_text_eng_12)
+ re_farr_jenkins_paterson_spa_12 = wl_measures_readability.re_farr_jenkins_paterson(main, test_text_spa_12)
+ re_farr_jenkins_paterson_other_12 = wl_measures_readability.re_farr_jenkins_paterson(main, test_text_other_12)
+
+ print('Flesch Reading Ease (Farr-Jenkins-Paterson):')
+ print(f'\teng/0: {re_farr_jenkins_paterson_eng_0}')
+ print(f'\teng/12: {re_farr_jenkins_paterson_eng_12}')
+ print(f'\teng/12-psk: {re_farr_jenkins_paterson_eng_12_psk}')
+ print(f'\tspa/12: {re_farr_jenkins_paterson_spa_12}')
+ print(f'\tother/12: {re_farr_jenkins_paterson_other_12}')
+
+ assert re_farr_jenkins_paterson_eng_0 == 'text_too_short'
+ assert re_farr_jenkins_paterson_eng_12 == 1.599 * (9 / 12 * 100) - 1.015 * (12 / 3) - 31.517
+ assert re_farr_jenkins_paterson_eng_12_psk == 8.4335 - 0.0648 * (9 / 12 * 100) + 0.0923 * (12 / 3)
+ assert re_farr_jenkins_paterson_spa_12 != 'no_support'
+ assert re_farr_jenkins_paterson_other_12 == 'no_support'
def test_rgl():
rgl_eng_12 = wl_measures_readability.rgl(main, test_text_eng_12)
@@ -710,7 +716,7 @@ def test_wstf():
test_elf()
test_gl()
test_re_flesch()
- test_re_simplified()
+ test_re_farr_jenkins_paterson()
test_rgl()
test_cp()
test_formula_de_crawford()
diff --git a/wordless/wl_measures/wl_measures_readability.py b/wordless/wl_measures/wl_measures_readability.py
index 37d4861a9..313291fca 100644
--- a/wordless/wl_measures/wl_measures_readability.py
+++ b/wordless/wl_measures/wl_measures_readability.py
@@ -171,9 +171,9 @@ def aari(main, text):
return aari
# Automated Readability Index
-# Reference:
+# References:
# Smith, E. A., & Senter, R. J. (1967). Automated readability index. Aerospace Medical Research Laboratories. https://apps.dtic.mil/sti/pdfs/AD0667273.pdf
-# Navy variant:
+# Navy:
# Kincaid, J. P., Fishburne, R. P., Rogers, R. L., & Chissom, B. S. (1975). Derivation of new readability formulas (automated readability index, fog count, and Flesch reading ease formula) for Navy enlisted personnel (Report No. RBR 8-75). Naval Air Station Memphis. https://apps.dtic.mil/sti/pdfs/ADA006655.pdf
def ari(main, text):
text = get_counts(main, text)
@@ -305,9 +305,9 @@ def colemans_readability_formula(main, text):
# References:
# Dale, E., & Chall, J. S. (1948a). A formula for predicting readability. Educational Research Bulletin, 27(1), 11–20, 28.
# Dale, E., & Chall, J. S. (1948b). A formula for predicting readability: Instructions. Educational Research Bulletin, 27(2), 37–54.
-# Powers-Sumner-Kearl variant:
+# Powers-Sumner-Kearl:
# Powers, R. D., Sumner, W. A., & Kearl, B. E. (1958). A recalculation of four adult readability formulas. Journal of Educational Psychology, 49(2), 99–105. https://doi.org/10.1037/h0043254
-# New variant:
+# New:
# Chall, J. S., & Dale, E. (1995). Readability revisited: The new Dale-Chall readability formula. Brookline Books.
# 清川英男. (1996). CHALL, J. S. and DALE, E.(1995) Readability Revisited: The New Dale-Chall Readability Formula. Brookline Books. 教育メディア研究, 3(1), 59. https://www.jstage.jst.go.jp/article/jaems/3/1/3_KJ00009004543/_pdf
def x_c50(main, text):
@@ -433,31 +433,31 @@ def gl(main, text):
return gl
# Flesch Reading Ease
-# Reference:
+# References:
# Flesch, R. (1948). A new readability yardstick. Journal of Applied Psychology, 32(3), 221–233. https://doi.org/10.1037/h0057532
-# Powers-Sumner-Kearl variant:
+# Powers-Sumner-Kearl:
# Powers, R. D., Sumner, W. A., & Kearl, B. E. (1958). A recalculation of four adult readability formulas. Journal of Educational Psychology, 49(2), 99–105. https://doi.org/10.1037/h0043254
-# Dutch variant (Douma):
+# Dutch (Douma):
# Douma, W. H. (1960). De leesbaarheid van landbouwbladen: Een onderzoek naar en een toepassing van leesbaarheidsformules [Readability of Dutch farm papers: A discussion and application of readability-formulas]. Afdeling sociologie en sociografie van de Landbouwhogeschool Wageningen. https://edepot.wur.nl/276323
-# Dutch variant (Brouwer's Leesindex A):
+# Dutch (Brouwer's Leesindex A):
# Brouwer, R. H. M. (1963). Onderzoek naar de leesmoeilijkheid van Nederlands proza. Paedagogische studiën, 40, 454–464. https://objects.library.uu.nl/reader/index.php?obj=1874-205260&lan=en
-# French variant:
+# French:
# Kandel, L., & Moles A. (1958). Application de l’indice de flesch la langue francaise [applying flesch index to french language]. The Journal of Educational Research, 21, 283–287.
# Kopient, A., & Grabar, N. (2020). Rated lexicon for the simplification of medical texts. In B. Gersbeck-Schierholz (ed.), HEALTHINFO 2020: The fifth international conference on informatics and assistive technologies for health-care, medical support and wellbeing (pp. 11–17). IARIA. https://hal.science/hal-03095275/document
-# German variant:
+# German:
# Amstad, T. (1978). Wie verständlich sind unsere Zeitungen? [Unpublished doctoral dissertation]. University of Zurich.
# Lesbarkeitsindex. (2023, February 2). In Wikipedia. https://de.wikipedia.org/w/index.php?title=Lesbarkeitsindex&oldid=230472824
-# Italian variant:
+# Italian:
# Franchina, V., & Vacca, R. (1986). Adaptation of Flesh readability index on a bilingual text written by the same author both in Italian and English languages. Linguaggi, 3, 47–49.
# Garais, E. (2011). Web applications readability. Journal of Information Systems and Operations Management, 5(1), 117–121. http://www.rebe.rau.ro/RePEc/rau/jisomg/SP11/JISOM-SP11-A13.pdf
-# Russian variant:
+# Russian:
# Oborneva, I. V. (2006). Автоматизированная оценка сложности учебных текстов на основе статистических параметров [Doctoral dissertation, Institute for Strategy of Education Development of the Russian Academy of Education]. Freereferats.ru. https://static.freereferats.ru/_avtoreferats/01002881899.pdf?ver=3
-# Spanish variant (Fernández Huerta):
+# Spanish (Fernández Huerta):
# Fernández Huerta, J. (1959). Medidas sencillas de lecturabilidad. Consigna, 214, 29–32.
# Garais, E. (2011). Web applications readability. Journal of Information Systems and Operations Management, 5(1), 117–121. http://www.rebe.rau.ro/RePEc/rau/jisomg/SP11/JISOM-SP11-A13.pdf
-# Spanish variant (Szigriszt Pazos):
+# Spanish (Szigriszt Pazos):
# Szigriszt Pazos, F. (1993). Sistemas predictivos de legibilidad del mensaje escrito: Formula de perspicuidad [Doctoral dissertation, Complutense University of Madrid]. Biblos-e Archivo. https://repositorio.uam.es/bitstream/handle/10486/2488/3907_barrio_cantalejo_ines_maria.pdf?sequence=1&isAllowed=y
-# Ukrainian variant:
+# Ukrainian:
# Partiko, Z. V. (2001). Zagal’ne redaguvannja. Normativni osnovi. Afiša.
# Grzybek, P. (2010). Text difficulty and the Arens-Altmann law. In P. Grzybek, E. Kelih, & J. Mačutek (eds.), Text and language: Structures · functions · interrelations quantitative perspectives. Praesens Verlag. https://www.iqla.org/includes/basic_references/qualico_2009_proceedings_Grzybek_Kelih_Macutek_2009.pdf
def re_flesch(main, text):
@@ -542,26 +542,36 @@ def re_flesch(main, text):
return re
-# Flesch Reading Ease (Simplified)
-# Reference: Farr, J. N., Jenkins, J. J., & Paterson, D. G. (1951). Simplification of Flesch reading ease formula. Journal of Applied Psychology, 35(5), 333–337. https://doi.org/10.1037/h0062427
-def re_simplified(main, text):
+# Flesch Reading Ease (Farr-Jenkins-Paterson)
+# References:
+# Farr, J. N., Jenkins, J. J., & Paterson, D. G. (1951). Simplification of Flesch reading ease formula. Journal of Applied Psychology, 35(5), 333–337. https://doi.org/10.1037/h0062427
+# Powers-Sumner-Kearl:
+# Powers, R. D., Sumner, W. A., & Kearl, B. E. (1958). A recalculation of four adult readability formulas. Journal of Educational Psychology, 49(2), 99–105. https://doi.org/10.1037/h0043254
+def re_farr_jenkins_paterson(main, text):
if text.lang in main.settings_global['syl_tokenizers']:
text = get_counts(main, text)
if text.count_words and text.count_sentences:
count_words_1_syl = get_count_words_syls(text.syls_words, len_min = 1, len_max = 1)
- flesch_re_simplified = (
- 1.599 * (count_words_1_syl / text.count_words * 100)
- - 1.015 * (text.count_words / text.count_sentences)
- - 31.517
- )
+ if main.settings_custom['measures']['readability']['re_farr_jenkins_paterson']['use_powers_sumner_kearl_variant']:
+ re = (
+ 8.4335
+ - 0.0648 * (count_words_1_syl / text.count_words * 100)
+ + 0.0923 * (text.count_words / text.count_sentences)
+ )
+ else:
+ re = (
+ 1.599 * (count_words_1_syl / text.count_words * 100)
+ - 1.015 * (text.count_words / text.count_sentences)
+ - 31.517
+ )
else:
- flesch_re_simplified = 'text_too_short'
+ re = 'text_too_short'
else:
- flesch_re_simplified = 'no_support'
+ re = 'no_support'
- return flesch_re_simplified
+ return re
# FORCAST Grade Level
# Reference: Caylor, J. S., & Sticht, T. G. (1973). Development of a simple readability index for job reading material. Human Resource Research Organization. https://ia902703.us.archive.org/31/items/ERIC_ED076707/ERIC_ED076707.pdf
@@ -660,11 +670,11 @@ def gulpease_index(main, text):
return gulpease_index
# Gunning Fog Index
-# Reference:
+# References:
# Gunning, R. (1968). The technique of clear writing (revised ed.). McGraw-Hill Book Company.
-# Navy variant:
+# Navy:
# Kincaid, J. P., Fishburne, R. P., Rogers, R. L., & Chissom, B. S. (1975). Derivation of new readability formulas (automated readability index, fog count, and Flesch reading ease formula) for Navy enlisted personnel (Report No. RBR 8-75). Naval Air Station Memphis. https://apps.dtic.mil/sti/pdfs/ADA006655.pdf
-# Polish variant:
+# Polish:
# Pisarek, W. (1969). Jak mierzyć zrozumiałość tekstu?. Zeszyty Prasoznawcze, 4(42), 35–48.
def fog_index(main, text):
if text.lang.startswith('eng_') or text.lang == 'pol':
@@ -1164,6 +1174,7 @@ def wstf(main, text):
if text.count_words and text.count_sentences:
variant = main.settings_custom['measures']['readability']['wstf']['variant']
+
ms = get_count_words_syls(text.syls_words, len_min = 3) / text.count_words
sl = text.count_words / text.count_sentences
iw = get_count_words_letters(text.words_flat, len_min = 7) / text.count_words
diff --git a/wordless/wl_profiler.py b/wordless/wl_profiler.py
index ab09ed6dc..25346945a 100644
--- a/wordless/wl_profiler.py
+++ b/wordless/wl_profiler.py
@@ -370,7 +370,7 @@ def __init__(self, parent):
_tr('wl_profiler', 'Easy Listening Formula'),
_tr('wl_profiler', 'Flesch-Kincaid Grade Level'),
_tr('wl_profiler', 'Flesch Reading Ease'),
- _tr('wl_profiler', 'Flesch Reading Ease (Simplified)'),
+ _tr('wl_profiler', 'Flesch Reading Ease (Farr-Jenkins-Paterson)'),
_tr('wl_profiler', 'FORCAST Grade Level'),
_tr('wl_profiler', 'Fórmula de Comprensibilidad de Gutiérrez de Polini'),
_tr('wl_profiler', 'Fórmula de Crawford'),
@@ -1195,7 +1195,7 @@ def run(self):
wl_measures_readability.elf(self.main, text),
wl_measures_readability.gl(self.main, text),
wl_measures_readability.re_flesch(self.main, text),
- wl_measures_readability.re_simplified(self.main, text),
+ wl_measures_readability.re_farr_jenkins_paterson(self.main, text),
wl_measures_readability.rgl(self.main, text),
wl_measures_readability.cp(self.main, text),
wl_measures_readability.formula_de_crawford(self.main, text),
diff --git a/wordless/wl_settings/wl_settings_default.py b/wordless/wl_settings/wl_settings_default.py
index 3a5ff9be3..34fddfa25 100644
--- a/wordless/wl_settings/wl_settings_default.py
+++ b/wordless/wl_settings/wl_settings_default.py
@@ -1771,6 +1771,10 @@ def init_settings_default(main):
'variant_spa': 'Fernández Huerta'
},
+ 're_farr_jenkins_paterson': {
+ 'use_powers_sumner_kearl_variant': False
+ },
+
'spache_grade_lvl': {
'use_rev_formula': True
},
diff --git a/wordless/wl_settings/wl_settings_measures.py b/wordless/wl_settings/wl_settings_measures.py
index 2a5324766..609c27e23 100644
--- a/wordless/wl_settings/wl_settings_measures.py
+++ b/wordless/wl_settings/wl_settings_measures.py
@@ -128,6 +128,14 @@ def __init__(self, main):
self.group_box_re.layout().setColumnStretch(2, 1)
+ # Flesch Reading Ease (Farr-Jenkins-Paterson)
+ self.group_box_re_farr_jenkins_paterson = QGroupBox(self.tr('Flsch Reading Ease (Farr-Jenkins-Paterson)'), self)
+
+ self.checkbox_use_powers_sumner_kearl_variant = QCheckBox(self.tr('Use Powers-Sumner-Kearl variant'), self)
+
+ self.group_box_re_farr_jenkins_paterson.setLayout(wl_layouts.Wl_Layout())
+ self.group_box_re_farr_jenkins_paterson.layout().addWidget(self.checkbox_use_powers_sumner_kearl_variant, 0, 0)
+
# Gunning Fog Index
self.group_box_fog_index = QGroupBox(self.tr('Gunning Fog Index'), self)
@@ -180,12 +188,13 @@ def __init__(self, main):
self.layout().addWidget(self.group_box_danielson_bryans_readability_formula, 4, 0)
self.layout().addWidget(self.group_box_fog_index, 5, 0)
self.layout().addWidget(self.group_box_re, 6, 0)
- self.layout().addWidget(self.group_box_spache_grade_lvl, 7, 0)
- self.layout().addWidget(self.group_box_trankle_bailers_readability_formula, 8, 0)
- self.layout().addWidget(self.group_box_wstf, 9, 0)
+ self.layout().addWidget(self.group_box_re_farr_jenkins_paterson, 7, 0)
+ self.layout().addWidget(self.group_box_spache_grade_lvl, 8, 0)
+ self.layout().addWidget(self.group_box_trankle_bailers_readability_formula, 9, 0)
+ self.layout().addWidget(self.group_box_wstf, 10, 0)
self.layout().setContentsMargins(6, 4, 6, 4)
- self.layout().setRowStretch(10, 1)
+ self.layout().setRowStretch(11, 1)
def re_changed(self):
if self.checkbox_use_powers_sumner_kearl_variant_for_all_langs.isChecked():
@@ -221,6 +230,9 @@ def load_settings(self, defaults = False):
self.combo_box_re_variant_nld.setCurrentText(settings['re']['variant_nld'])
self.combo_box_re_variant_spa.setCurrentText(settings['re']['variant_spa'])
+ # Flesch Reading Ease (Farr-Jenkins-Paterson)
+ self.checkbox_use_powers_sumner_kearl_variant.setChecked(settings['re_farr_jenkins_paterson']['use_powers_sumner_kearl_variant'])
+
# Gunning Fog Index
self.checkbox_use_navy_variant_for_eng.setChecked(settings['fog_index']['use_navy_variant_for_eng'])
@@ -254,6 +266,9 @@ def apply_settings(self):
self.settings_custom['re']['variant_nld'] = self.combo_box_re_variant_nld.currentText()
self.settings_custom['re']['variant_spa'] = self.combo_box_re_variant_spa.currentText()
+ # Flesch Reading Ease (Farr-Jenkins-Paterson)
+ self.settings_custom['re_farr_jenkins_paterson']['use_powers_sumner_kearl_variant'] = self.checkbox_use_powers_sumner_kearl_variant.isChecked()
+
# Gunning Fog Index
self.settings_custom['fog_index']['use_navy_variant_for_eng'] = self.checkbox_use_navy_variant_for_eng.isChecked()