Text Metrics (counts, readability, frequency, warnings) avatar

Text Metrics (counts, readability, frequency, warnings)

Pricing

from $10.00 / 1,000 text analysis completeds

Go to Apify Store
Text Metrics (counts, readability, frequency, warnings)

Text Metrics (counts, readability, frequency, warnings)

Deterministic text quality metrics: word/sentence counts, Flesch readability, top-N word frequency, and style warnings. Pure local computation, no external APIs, no secrets.

Pricing

from $10.00 / 1,000 text analysis completeds

Rating

0.0

(0)

Developer

Andy Mitchell

Andy Mitchell

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

2 months ago

Last modified

Categories

Security

Limited permissions

Share

Text Metrics

Deterministic text quality metrics — counts, readability, word frequency, and style warnings. Pure local computation: no external APIs, no scraping, no secrets, no proxy usage.

Run any text through and get reproducible, machine-readable quality signals — useful for content QA pipelines, LLM output validation, and editorial tooling.

Why this Actor

Most text-quality tools are either opaque (LLM-scored, non-reproducible) or scattered across a dozen npm packages. This Actor wraps one deterministic metrics engine: the same input always produces the same output, byte for byte. Zero network calls inside the run, so results are fast (~1s), cheap, and auditable.

Input

FieldTypeDefaultDescription
toolstringanalyze-textOne of: analyze-text (everything), count-text, word-frequency, readability, text-warnings
textstring—Required. The text to analyze
top_nnumber20How many top tokens to return in frequency analysis
include_stopwordsbooleanfalseWhether frequency analysis includes common stopwords

Output

Each run pushes one dataset record (and stores the same object under the OUTPUT key-value record):

  • counts — characters, words, unique words, sentences, paragraphs, lines, bullet items, headings, average words per sentence/paragraph.
  • frequency — total/unique tokens and a top-N list of {token, count, share}.
  • readability — Flesch Reading Ease and Flesch–Kincaid grade level, average sentence length, syllable stats. (Heuristic English syllable counting: directional, not authoritative.)
  • warnings — style/quality flags with code, severity (caution/warning) and a human-readable message (e.g. short_text, passive_voice, repetition).

Example

Input:

{ "tool": "analyze-text", "text": "The quick brown fox jumps over the lazy dog. It was a very nice day." }

Output (abridged):

{
"metric": "aggregate",
"counts": { "words": 21, "sentences": 2, "average_words_per_sentence": 10.5 },
"readability": { "flesch_reading_ease": 67.26, "flesch_kincaid_grade": 6.49 },
"warnings": [{ "code": "short_text", "severity": "caution", "message": "Readability and frequency metrics are unstable below about 100 words." }]
}

Pricing (pay-per-event)

  • $0.005 per run start + $0.01 per completed analysis. A typical single-text analysis costs ~$0.015.
  • Free-plan users can run it within their free usage allowance.

Notes & limits

  • English-optimised (Flesch formulas, stopword list, syllable heuristic).
  • Deterministic by design: no randomness, no network, no model inference.
  • Memory capped at 256 MB; typical run ≈1 second.

Integration

Works with the Apify API, apify run-actor, and MCP-based agent toolchains — the Actor exposes an output schema so agents can discover and chain results programmatically.