textstat

Library New

Readability metrics for English text: Flesch Reading Ease, Flesch-Kincaid, Gunning Fog, SMOG, ARI, Coleman-Liau, plus word/sentence/syllable counts. Zero-dependency, no_std.

Checked · Sources

Downloads
95
Dependents
2
Stars
0
Forks
0
Contributors
1
Commits
3
Latest release
0.1.1 ·

About

From the project README ·

Readability metrics for English text. Flesch Reading Ease, Flesch-Kincaid Grade, Gunning Fog, SMOG, Automated Readability Index, Coleman-Liau — plus the word / sentence / syllable counts they're built on. Inspired by Python's textstat. Zero dependencies, #![no_std].

let text = "The cat sat on the mat. The dog ran fast.";

assert_eq!(textstat::lexicon_count(text), 10);   // words
assert_eq!(textstat::sentence_count(text), 2);
assert_eq!(textstat::syllable_count(text), 10);

let ease = textstat::flesch_reading_ease(text);  // ~117 (very easy)
let grade = textstat::flesch_kincaid_grade(text); // ~ -1.8 (well below grade 1)

Why textstat?

Rust's readability crates are article extractors (arc90/Mozilla Readability) — they pull the main content out of a web page. None of them compute readability scores. textstat fills that gap: drop-in functions for the standard formulas, useful for content tooling, SEO, writing assistants, education, and accessibility (WCAG) checks.

Install

[dependencies]
textstat = "0.1"
Read the full README

Metrics

FunctionReturns
flesch_reading_ease0–100+ score (higher = easier)
flesch_kincaid_gradeU.S. school grade level
gunning_fogU.S. school grade level
smog_indexU.S. school grade level
automated_readability_indexU.S. school grade level
coleman_liau_indexU.S. school grade level
reading_time(text, wpm)estimated seconds to read
Counts

lexicon_count (words), sentence_count, syllable_count, syllables(word), polysyllabic_count, char_count (non-whitespace), letter_count.

Accuracy

Syllables are estimated with a fast English heuristic (vowel groups + a silent-e rule, including accented Latin vowels), not a pronunciation dictionary, so scores are close to — not bit-identical with — dictionary-based tools. The metric formulas are the standard published ones.

  • sentence_count skips decimal points (3.14) and initialism dots (U.S.A.); trailing abbreviation dots (Dr.) may still add one.
  • Best results are on English text. Non-Latin scripts (no Latin vowels) fall back to one syllable per word, so scores stay bounded rather than correct.
  • Empty input yields 0 everywhere — no panics, no division by zero.

no_std

textstat is #![no_std] (needs only alloc) with a dependency-free Newton's -method sqrt, so it builds for bare-metal targets such as thumbv7em-none-eabi.

Contributors ✨

This project follows the all-contributors specification. Contributions of any kind are welcome — code, docs, bug reports, ideas, reviews! See the emoji key for how each contribution is recognized, and open a PR or issue to get involved.

Thanks goes to these wonderful people:

License

Licensed under either of Apache-2.0 or MIT at your option.

Runs on
GPU support unknown
What shows it
  • no dependency or feature matches a backend row
Native code
None found
  • No native code found
Python bindings
No Python binding crate found
License
Apache-2.0 OR MIT

Compare with similar projects

Order: strongest tier first, then most downloads, then name, with unmeasured values last. A library counts downloads over 30 days. An app counts binary downloads per release. An app with none counts its crate downloads over 30 days. ML Rust runs this catalogue, so its closest project always gets a row.

textstat beside the projects that share a topic with it
ProjectDownloadsDependentsStarsLatest releaseRuns on (GPU)Native codeLicense
textstat This page New

Readability metrics for English text: Flesch Reading Ease, Flesch-Kincaid, Gunning Fog, SMOG, ARI, Coleman-Liau, plus word/sentence/syllable counts. Zero-dependency, no_std.

95 downloads over 30 days 2 0 0.1.1 GPU support unknown No native code found Apache-2.0 OR MIT
lingua-rs Featured

An accurate natural language detection library, suitable for short text and mixed-language text

Python bindings

286,625 downloads over 30 days 22 1,152 1.8.0 GPU support unknown Binds native code: cld2-sys (feature accuracy-reports) Apache-2.0
sentencex Listed

Sentence segmentation library with wide language support optimized for speed and utility.

114,914 downloads over 30 days 1 145 0.1.34 GPU support unknown No native code found MIT
splintr Listed

Tokenizer for Rust and Python: pure Rust by default, with 18 bundled vocabularies and four backends covering BPE, SentencePiece and WordPiece. Its output matches Hugging Face tokenizers id for id on 14 model families, including GPT-2, Qwen, Whisper, T5 and BERT.

Python bindings

8,204 downloads over 30 days 7 63 0.22.2 GPU support unknown Binds native code: pcre2-sys (feature pcre2) MIT
udpipe-rs Listed

Rust bindings for UDPipe - a trainable pipeline for tokenization, tagging, lemmatization and dependency parsing of CoNLL-U files

3,069 downloads over 30 days 2 5 0.2.0 GPU support unknown Build uses a native toolchain: cc Apache-2.0 OR MIT
keyword-extraction-rs Listed Dormant

Collection of algorithms for keyword extraction from text

2,311 downloads over 30 days 2 34 1.5.0 GPU support unknown No native code found LGPL-3.0-or-later
semchunk-rs Listed Dormant

A fast and lightweight Rust library for splitting text into semantically meaningful chunks.

864 downloads over 30 days 3 4 0.1.1 GPU support unknown Binds native code: torch-sys (feature rust-bert) MIT
Why NewIts first release on 21 Jun 2026 is under 180 days old.

The check tests the Featured gates once the first release passes this age limit.

What else the check found

  • The last activity is on 22 Jun 2026, 140 days ago. The rules expect an update within 365 days. Dormancy rule

Exact rules: New. The check on applied thresholds version 9.

Every rule outcome, as the check records it
  • expected-interval: version 0.1.1 base 300, capped at 2 releases = 100, raised to the 365-day floor: E = 365 days
  • dormancy: last activity 2026-06-22, 140 days ago, E = 365: active
  • new: new: first release 2026-06-21 is under 180 days old

Measurements and sources

Each signal row shows the raw value, its source and the fetch date. The Sources list gathers every distinct source on this page. Movement needs more history.

Sources6 sources
Adoption2 active dependents, 2 new dependents in 365 days1 not measured
Adoption measurements
SignalValueSourceFetchedCounts
Active dependents2crates.io database dumpYes
New dependents (365 days)2crates.io database dumpYes
Peak active dependents2crates.io database dumpYes
Active dependents as a share of the peak1crates.io database dumpYes
Binary downloads per releaseNot measuredYes
MaintenanceLatest human commit: 4 months ago3 not measured
Maintenance measurements
SignalValueSourceFetchedCounts
Latest human commit2026-06-22GitHub repositoryYes
Latest release2026-06-22crates.io database dumpYes
First release2026-06-21crates.io database dumpYes
Latest version0.1.1crates.io database dumpYes
Days the oldest outside issue waits for a reply0GitHub repositoryYes
Maintainer replies over 365 days0GitHub repositoryYes
Repository archivedfalseGitHub repositoryYes
Repository gonefalseGitHub repositoryYes
Release commit or manifest in the repotruecrates.io packageYes
Published docstruecrates.io database dumpYes
Latest release fails cargo checkNot measuredYes
Build check dateNot measuredYes
Build check toolchainNot measuredYes
SecurityUnpatched vulnerabilities: none
Security measurements
SignalValueSourceFetchedCounts
Unpatched vulnerabilities past the grace windownoneRustSec advisory databaseYes
RustSec unmaintained advisorynoneRustSec advisory databaseYes
Deprecation noticenonecrates.io database dumpYes
Deprecated requirementnonecrates.io database dumpYes
Distribution2 releases, 95 downloads over 30 days5 not measured
Distribution measurements
SignalValueSourceFetchedCounts
Releases2crates.io database dumpYes
Downloads over 30 days95crates.io database dumpYes
Binary downloads over the last 3 releasesNot measuredYes
Homebrew installs on request over 365 daysNot measuredYes
Repology repository familiesNot measuredYes
Docker pull growth over 90 daysNot measuredYes
Docker pulls at the growth baselineNot measuredYes
Every version a prereleasefalsecrates.io database dumpYes
Every version 0.0.xfalsecrates.io database dumpYes
Every version yankedfalsecrates.io database dumpYes
Crate deleted from crates.iofalsecrates.io database dumpYes
Repository0 stars, 0 forks, 1 contributors, 3 commits. Stars alone never qualify a project.
Repository measurements
SignalValueSourceFetchedCounts
GitHub stars0GitHub repositoryYes — one part of the repository route
GitHub forks0GitHub repositoryYes — one part of the repository route
Contributors with a GitHub account1GitHub contributorsYes — one part of the repository route
Commits on the default branch3GitHub repositoryNo
Repository's main crate left out of the entrynonecrates.io database dumpYes
Facts that never count
Facts that never count measurements
SignalValueSourceFetchedCounts
LicenseApache-2.0 OR MITcrates.io database dumpNo
Runs on, from listed crates and their direct dependenciesGPU support unknowncrates.io database dumpNo
What shows each backendno dependency or feature matches a backend rowcrates.io database dumpNo
Native code, from listed crates and their dependenciesNo native code foundcrates.io database dumpNo
Python bindings, from direct dependencies of listed cratesNo Python binding crate foundcrates.io database dumpNo
Crates that depend on a listed crate directly2crates.io database dumpNo

Corrections and review history

Report a correction

No correction applies to this entry.

Judgments

A judgment enters only through an approved issue and a merged pull request.

No judgment applies to this entry.