---
title: "Measure How Quotable Your Writing Is, With a Script You Can Run on Any Post"
url: https://hostmy.blog/measure-quotable-writing/
date: 2026-09-22
modified: 2026-09-22
lang: en
author: "Aditya Sharma"
description: "Cited sentences cluster hard around 6 to 10 words. Here is a script that scores any page or draft against that distribution."
categories:
  - "AI Search"
image: https://hostmy.blog/wp-content/uploads/2026/09/hmb-card-1888-1024x538.jpg
word_count: 593
---

# Measure How Quotable Your Writing Is, With a Script You Can Run on Any Post

There is a measurable shape to sentences that get quoted, and most writing advice ignores it entirely.

An analysis of 11,346 cited sentences a study could extract found the mean cited sentence ran 9.27 words. The median was 10. The 6 to 10 word band alone carried 45.2 percent of all citations. Nothing longer than 18 words was cited even once in that dataset.

That last number is the useful one. Not a preference, not a style guideline, a ceiling. Write past 18 words and the sentence stopped being extractable in that sample. [The citation data that produced that number](/18-word-ceiling/) is worth reading before you trust the script.

This post gives you a script that measures any page or draft against that distribution. It runs on stock Python 3.

What the script prints, against the citation record
What the script prints, against the citation record
Your post
The benchmark

Mean sentence length
printed
9.27 words

Longest sentence
printed
18 words, nothing above

Share in the 6 to 10 word band
printed
45.2%

Words before the claim appears
printed
41.9% of citations start in the first 30%
153,425 citations, six AI platforms.

The script gives you four numbers. The right column is what those numbers are being compared against, so a result means something before you edit anything.

## What the script measures, and what it deliberately does not

Four things, all mechanical.

Sentence count and word count per sentence. The share sitting in the 6 to 10 word band. The share running past 18 words. And the same two figures for the first 30 percent of the page, because 41.9 percent of citations in that dataset came from the first 30 percent of a page.

What it does not do is judge your writing. A low band share on a technical reference page is fine. The script gives you a distribution, not a grade. Read it as a description of the shape of your prose, then decide whether that shape suits the page. Point it at the pages that actually get cited, which is [why the homepage is the wrong page to measure](/homepage-wrong-page-for-ai/).

One more measured detail worth knowing before you start optimising for readability scores. Readability in that dataset was bimodal: 22.9 percent of cited pages were very easy, 20.5 percent were very confusing, and only 2.6 percent sat in the Flesch 50 to 59 middle. Aiming for the exact middle is aiming at the emptiest part of the distribution.

## The script

Save this as `quotable.py`.

`#!/usr/bin/env python3
"""Score how quotable a page is, by sentence length.

usage: python3 quotable.py https://example.com/post/
python3 quotable.py draft.txt
curl -sSL -H "Accept: text/markdown" URL | python3 quotable.py -
"""
import re, sys, urllib.request
from html.parser import HTMLParser

SHORT_LO, SHORT_HI, CEILING = 6, 10, 18
SKIP_TAGS = {"script", "style", "nav", "header", "footer", "aside", "noscript", "form"}
ABBREV = {"mr", "mrs", "ms", "dr", "prof", "sr", "jr", "st", "vs", "etc",
"e.g", "i.e", "fig", "no", "inc", "ltd", "co", "approx"}

class TextGrab(HTMLParser):
def __init__(self):
super().__init__()
self.parts, self.depth = [], 0
def handle_starttag(self, tag, attrs):
if tag.lower() in SKIP_TAGS:
self.depth += 1
def handle_endtag(self, tag):
if tag.lower() in SKIP_TAGS and self.depth:
self.depth -= 1
def handle_data(self, data):
if self.depth == 0 and data.strip():
self.parts.append(data)
def text(self):
return re.sub(r"\s+", " ", " ".join(self.parts)).strip()

def load(src):
if src == "-":
html = sys.stdin.read()
elif src.startswith(("http://", "https://")):
req = urllib.request.Request(src, headers={
"User-Agent": "Mozilla/5.0 (compatible; quotable/1.0)"})
with urllib.request.urlopen(req, timeout=30) as r:
raw = r.read()
cs = r.headers.get_content_charset() or "utf-8"
html = raw.decode(cs, "replace")
else:
with open(src, encoding="utf-8", errors="replace") as fh:
html = fh.read()
low = html.lower()
if "