Skip to content

Analyze text & difficulty

Because OpenL2 language libraries pair lexical entries with Universal Dependencies (UD) grammar patterns, you can analyze real-world sentences, dialogues, or transcripts deterministically against any language library and course progression.

Install the optional analysis extra:

Terminal window
python -m pip install -e ".[analysis]"

openl2 analyze-text parses a passage, matches lexical Concepts and grammatical Skills against the library, and scores readiness across every level in the course:

Terminal window
# Emit an interactive HTML report across all levels of CEFR German
openl2 analyze-text courses/cefr/de "Ich hatte gestern einen Termin in Berlin..." --html report.html
# Estimate CEFR difficulty band and diagnostic features
openl2 estimate-level --help

Each report shows:

  • Readiness per level (A1, A2, B1, …) with an interactive checkpoint switcher
  • Matched words and grammatical Skills grouped by the level where they are introduced, with human-readable labels and UD bindings
  • Unseen vocabulary outside the inventory, alongside a calibrated level estimate

This lets learning apps recommend authentic reading and listening material right at a learner’s edge (i+1) without relying on inconsistent LLM guesses.

Each report below was generated directly with openl2 analyze-text --html across OpenL2’s open courses and language libraries:

Language Sample passage Highlights Report
German Past-tense work narrative (CEFR A1–B1) 100% recognized · A1 61% → A2 100% · 0 unexplained edges View German report →
Italian Evening plans story (CEFR A1–B1) 100% recognized · A1 80% → A2 100% · 0 unexplained edges View Italian report →
French Weekend journal (CEFR A1–B1) 100% recognized · A1 73% → A2 100% · 0 unexplained edges View French report →
Spanish Neighborhood & commute (CEFR A1–B1) 95% recognized · multi-level skills spanning A1, A2, and B1 View Spanish report →
Mandarin Chinese Community news passage (HSK 1–6) 96% recognized · vocabulary progression across HSK 1–6 View Mandarin report →
English Community garden (CEFR A1–B2) 98% recognized · A1 72% → A2 98% · clause-linking skills View English report →

See Training the Level Predictor for how OpenL2 trains and calibrates its framework-agnostic 0–100 difficulty estimator.