# Word Counter Zero-dependency text statistics + reading-time estimator. ``` python scripts/run.py article.txt python scripts/run.py article.txt --wpm 250 python scripts/run.py article.txt --json cat article.txt | python scripts/run.py - ``` Reports words, characters (with/without spaces), lines, sentences, paragraphs, averages, and reading time. --- name: word-counter display_name: Word Counter description: "Count words, characters, lines, sentences, paragraphs and estimate reading time for text. Triggers: word count, count words, reading time, character count, text stats." --- # Word Counter Get word/character/line/sentence counts and a reading-time estimate for any text. ## When to use The user pastes text (or a file) and wants its length statistics or how long it takes to read at a given words-per-minute pace. ## How to use Run `scripts/run.py` with an input: - `python scripts/run.py article.txt` — print a stats table. - `python scripts/run.py article.txt --wpm 250` — reading time at 250 wpm. - `python scripts/run.py article.txt --json` — machine-readable JSON. Read from stdin with `-`, e.g. `cat article.txt | python scripts/run.py -`. ## Pitfalls - Words are `\b[\w']+\b` tokens; counts can differ slightly from word processors on hyphenated or punctuation-heavy text. - Sentence detection splits on `.`, `!`, `?` and is a heuristic (abbreviations like "Dr." inflate the count). - Default reading speed is 200 wpm; tune with `--wpm`.
Word Counter by langbot-team
Count words, characters, lines, sentences, paragraphs and estimate reading time for text.
Loading...