Module: JLPT::Dokkai
- Defined in:
- lib/jlpt/analyzers/dokkai.rb
Overview
Dokkai (Reading Comprehension) Readability Evaluator.
Evaluates Japanese text complexity for reading comprehension tasks, sentence length distribution, particle density, and recommended target reading time.
Constant Summary collapse
- PARTICLES_REGEX =
/[はがをにで行とからよりへね]/.freeze
Class Method Summary collapse
-
.evaluate(text) ⇒ Hash
Evaluate reading comprehension complexity and estimated reading time.
Class Method Details
.evaluate(text) ⇒ Hash
Evaluate reading comprehension complexity and estimated reading time
17 18 19 20 21 22 |
# File 'lib/jlpt/analyzers/dokkai.rb', line 17 def evaluate(text) cleaned = Preprocessor.clean(text) return empty_evaluation if cleaned.empty? build_evaluation_metrics(cleaned) end |