feat: initial text-readability-score v0.1.0 (text.readability_score@0.1.0)
Composite readability/complexity score: Flesch-DE + Verweistiefe
+ verb-distance. Reuse-lens: any project that needs to flag
"this text is hard to read" — government letters, AGB, scientific
abstracts.
Flesch-DE follows the Amstad adaptation:
FRE_de = 180 − ASL − (58.5 × ASW)
ASL = avg sentence length (words); ASW = avg syllables per word.
A FRE_de around 30 reads as "schwer"; below 10 is technical-jargon
territory.
Verweistiefe uses an optional graph input (output of
graph.citation_extract). i.V.m.-edges count double because they
force the reader to chase a second norm.
composite_frust scales both to 0..10 and averages, so the output
is a single number the heatmap can plot against the §6 Studie
"Frust"-Achse.
Pure in-WASM, zero filesystem, zero network.
Reserved for next versions:
- 0.2: noun-density and Schachtelsatz penalty
- 0.3: per-paragraph breakdown so the UI can highlight the
most-frustrating Absatz
Signed-off-by: flemming-it <sf@flemming.it>
This commit is contained in:
commit
2c3a6be513
6 changed files with 693 additions and 0 deletions
39
module.yaml
Normal file
39
module.yaml
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
schema_version: 3
|
||||
provider: chain
|
||||
name: text-readability-score
|
||||
version: 0.1.0
|
||||
|
||||
# Composite readability score for any text — Flesch (DE-adapted)
|
||||
# + Verweistiefe + verb-distance.
|
||||
#
|
||||
# Reuse-lens: any project that wants to flag "this text is hard
|
||||
# to read" — government letters, AGB, scientific abstracts.
|
||||
provides:
|
||||
- capability: text.readability_score
|
||||
version: 0.1.0
|
||||
|
||||
inputs:
|
||||
norm:
|
||||
type: json
|
||||
description:
|
||||
en: NormalizedNorm (output of text.akoma_normalize).
|
||||
de: NormalizedNorm (Output von text.akoma_normalize).
|
||||
graph:
|
||||
type: json
|
||||
optional: true
|
||||
description:
|
||||
en: Optional citation graph from graph.citation_extract — used to compute Verweistiefe.
|
||||
de: Optionaler Zitationsgraph aus graph.citation_extract — für Verweistiefe.
|
||||
|
||||
outputs:
|
||||
score:
|
||||
type: json
|
||||
description:
|
||||
en: |
|
||||
{ flesch_de: 0..100, depth_index: 0..10,
|
||||
composite_frust: 0..10 }.
|
||||
de: |
|
||||
{ flesch_de: 0..100, depth_index: 0..10,
|
||||
composite_frust: 0..10 }.
|
||||
|
||||
permissions: []
|
||||
Loading…
Add table
Add a link
Reference in a new issue