TextAnalysis for LiaScript: Readability Scores and Text Complexity Metrics

TextAnalysis for LiaScript: Readability Scores and Text Complexity Metrics

Writing clear learning materials requires understanding how readable they actually are. The TextAnalysis template attaches standard readability metrics to any text block in LiaScript. Students can paste or edit text and instantly see Flesch-Kincaid grades, Gunning Fog index, syllable counts, reading time, and more — directly in the course slide.


Quick Start

<!--
import: https://raw.githubusercontent.com/liaTemplates/TextAnalysis/main/README.md
-->

Macro Overview

All macros are end-of-block macros: attach them after a plain text code block.

MacroOutput
@Textanalysis.fullAll tests, compact values only
@Textanalysis.FULLAll tests with interpretation table
@Textanalysis.timeReading and speaking time (compact)
@Textanalysis.TIMEReading and speaking time with guide
@Textanalysis.baseWord/syllable/sentence count + grade (compact)
@Textanalysis.BASESame with full interpretation
@Textanalysis.check(\[“test1”,“test2”]`)`Custom selection of tests

Rule: Uppercase first letter = shows interpretation table. Lowercase = value only.


Macro 1: @Textanalysis.FULL — Complete Analysis with Interpretation

```text
The mitochondria is the powerhouse of the cell.
Cellular respiration converts glucose and oxygen into ATP, carbon dioxide, and water.
This process occurs in three main stages: glycolysis, the citric acid cycle, and the electron transport chain.
```
@Textanalysis.FULL

Try it live — edit the text and see all readability metrics update instantly:


Macro 2: @Textanalysis.time and @Textanalysis.TIME

```text
Your text here.
```
@Textanalysis.time

Reading time is estimated at 200–250 words per minute. Speaking time at 130–150 words per minute.


Macro 3: @Textanalysis.base

```text
Your text here.
```
@Textanalysis.base

Shows word count, syllable count, sentence count, and the readability consensus grade level.


Macro 4: Custom Test Selection — @Textanalysis.check(...)

Choose exactly which tests to run using a JSON array of test names:

```text
Your text here.
```
@Textanalysis.check(`["fleschReadingEase","gunningFog","readingTime"]`)

Available Tests

Test NameMetric
wordsTotal word count
syllablesTotal syllable count
sentencesTotal sentence count
fleschReadingEaseFlesch Reading Ease (0–100; 60+ = standard)
fleschKincaidGradeFlesch-Kincaid U.S. grade level
gunningFogGunning Fog Index (years of education needed)
smogIndexSMOG index (simple measure of gobbledygook)
automatedReadabilityIndexARI — character-based readability
colemanLiauIndexColeman-Liau Index (letter-based)
daleChallReadabilityScoreDale-Chall — word familiarity based
readabilityConsensusAverage grade across all indices
readingTimeEstimated silent reading time
speakingTimeEstimated speaking/presentation time

Full Template Demo


Use Cases

Language learning — Students assess the complexity of their own writing against target proficiency levels (A1-C2).

Technical writing courses — Measure and improve readability of reports, manuals, and instructional texts.

Curriculum development — Check whether learning material complexity matches the target audience grade level.

Teacher training — Demonstrate how readability metrics differ across texts; compare a newspaper article to a scientific abstract.

OER quality review — Add readability checks to shared course materials before publication.


Technical Facts

Runs in browserYes — all metrics computed client-side
Server requiredNo
Input formatPlain text in code block
Metrics13 standard readability indices
Interpretation modeUppercase macros show explanation table
Custom selectionYes — @Textanalysis.check(...)
LicenseMIT
MaintainedVersion 0.0.1

Try It

Try in LiaScript Open in LiveEditor View on GitHub
  • Random — randomized practice sets from larger question banks
  • SpreadSheet — tabular data entry with formulas for linguistic data
  • lia-board-mode — full-screen presentation plugin for teachers

Related Posts

SpreadSheet for LiaScript: Excel-Style Interactive Tables in Your Course

Embed fully interactive spreadsheets with formulas, dropdowns, checkboxes, and multiple worksheets directly in LiaScript — powered by JSSpreadsheet, no backend required.

Read More

ExplainGit for LiaScript: Visualize Git Repositories Interactively

Teach git branching, merging, and history with interactive animations directly in LiaScript — pre-define command sequences or let students type git commands live, powered by ExplainGit.

Read More

Speech-Recognition-Quiz for LiaScript: Turn Spoken Words into Interactive Quizzes

Use the Speech-Recognition-Quiz template to create spoken-answer quizzes in LiaScript — ideal for language courses, pronunciation training, and accessible learning without any server.

Read More