Flesch–Kincaid readability tests とは
Flesch–Kincaid readability tests は英語の可読性尺度を計測する手法です。
以下の二種類で構成されています。
- the Flesch Reading Ease
- the Flesch–Kincaid Grade Level
スコアとレベルについては以下のような対応関係になっています
Flesch Reading Ease Score | School Level | Flesch–Kincaid Grade Level |
---|---|---|
100.00-90.00 | 5th grade | 5 |
90.0–80.0 | 6th grade | 6 |
80.0–70.0 | 7th grade | 7 |
70.0–60.0 | 8th & 9th grade | 8-9 |
60.0–50.0 | 10th to 12th grade | 10-12 |
50.0–30.0 | College | 13-16 |
30.0–0.0 | College Graduate | 17以上 |
the Flesch Reading Ease
最高ポイント100で読みやすさを評価します。
スコアが高いほど読みやすい文章とします。
計算式は次のとおりです。
206.835 – (1.015 x 文章の平均の長さ) – (84.6 x 1単語あたりの平均音節数)
the Flesch–Kincaid Grade Level
Flesch Reading Easeを米国の学年レベルに対応させたものです。
(1センテンスあたりの平均単語数) x 0.39 + (1単語あたりの平均音節数) x 11.8 - 15.59
1センテンスあたりの平均単語数 = 英文中の総単語数 / 英文中の総センテンス数 1単語あたりの平均音節数 = 英文中の総音節数 / 英文中の総単語数
Word の標準機能
これらの指標はWordの標準機能として提供されています。
Web のツール
テキストの可読性を測るWebサービスがありました。
以下でお試しもできます。
Ruby gem odyssey で計測する
Ruby の gem として Flesch–Kincaid readability tests の計測ができるツールがありました。
cameronsutter/odyssey: Text readability analyzer using Flesch-Kincaid and others
$ gem install odyssey
- 検証データ用に betterlorem をインストールします
※Lorem ipsum を計測しても意味はないことはわかりつつ、サンプルということで
$ gem install betterlorem
ソースコード
require 'odyssey' require 'betterlorem' require 'pp' score_types = ['FleschKincaidRe', 'FleschKincaidGl'] 5.times do |i| english = BetterLorem.w(rand(10-50), true) result = Odyssey.analyze_multi(english, ['FleschKincaidRe', 'FleschKincaidGl'], true) puts "count #{i}" puts "==lorem words==" puts english pp result end
- 実行結果
count 0 ==lorem words== Ipse autem Joannes habebat vestimentum de pilis camelorum, et zonam pelliceam circa. {"string_length"=>84, "letter_count"=>71, "syllable_count"=>26, "word_count"=>12, "sentence_count"=>1, "average_words_per_sentence"=>12.0, "average_syllables_per_word"=>2.1666666666666665, "scores"=>{"FleschKincaidRe"=>11.4, "FleschKincaidGl"=>14.7}} count 1 ==lorem words== Et sanans omnem languorem, et omnem infirmitatem in populo. Et abiit opinio ejus in totam Syriam, et. {"string_length"=>101, "letter_count"=>81, "syllable_count"=>34, "word_count"=>17, "sentence_count"=>2, "average_words_per_sentence"=>8.5, "average_syllables_per_word"=>2.0, "scores"=>{"FleschKincaidRe"=>29.0, "FleschKincaidGl"=>11.3}} count 2 ==lorem words== Quia his omnibus indigetis. Quærite ergo primum regnum Dei, et justitiam ejus. {"string_length"=>78, "letter_count"=>63, "syllable_count"=>25, "word_count"=>13, "sentence_count"=>2, "average_words_per_sentence"=>6.5, "average_syllables_per_word"=>1.9230769230769231, "scores"=>{"FleschKincaidRe"=>37.5, "FleschKincaidGl"=>9.6}} count 3 ==lorem words== Autem introisset Capharnaum, accessit ad eum centurio, rogans eum, et dicens Domine, puer meus jacet in domo paralyticus, et male torquetur. Et ait illi Jesus Ego veniam, et curabo eum. Et respondens centurio, ait Domine, non. {"string_length"=>226, "letter_count"=>180, "syllable_count"=>67, "word_count"=>36, "sentence_count"=>3, "average_words_per_sentence"=>12.0, "average_syllables_per_word"=>1.8611111111111112, "scores"=>{"FleschKincaidRe"=>37.2, "FleschKincaidGl"=>11.1}} count 4 ==lorem words== Tantum dic verbo, et sanabitur puer meus. Nam et ego homo sum sub potestate constitutus, habens sub me milites, et dico huic. {"string_length"=>125, "letter_count"=>99, "syllable_count"=>36, "word_count"=>22, "sentence_count"=>2, "average_words_per_sentence"=>11.0, "average_syllables_per_word"=>1.6363636363636365, "scores"=>{"FleschKincaidRe"=>57.2, "FleschKincaidGl"=>8.0}}