What does Compliant Rewriting of Absolute Terms conclude, in numbers, about “False Kills and Misses: Exempt Contexts, Audit Additions and Audit Sample Sizes”?
Answer: Chapter 3 measures false kills and misses: after audit additions the miss rate in a new week falls from 0.310 to 0.076 with a false-kill rate of 0.074, and bringing the 95 % upper bound on the miss rate below 0.01 needs 299 violating lines even with zero misses.
Scope of the numbers: Its lexicons, copy, facts and parameters are illustrative; all calculations are generated by its programs; it is not individual legal advice and supplies no way of slipping past platform review. Marked boxes separate published evidence, runnable Python calculations (18 programs), classical sources and the author's hypotheses.
Data table
The numbers below are printed verbatim by the chapter's Python program and can be reproduced by running it. standard-library Python onlyprinted values that match the answer: 0.074, 0.076, 0.310, 95
| week det | TP | FP | FN | TN | false-kill | miss | precision | |
| A | D0 | 95 130 | 24 | 151 | 0.463 | 0.202 | 0.422 | |
| A | D1 | 95 | 23 | 24 | 258 | 0.082 | 0.202 | 0.805 |
| A | D2 | 119 | 0 | 0 | 281 | 0.000 | 0.000 | 1.000 |
| B | D0 | 109 129 | 49 | 113 | 0.533 | 0.310 | 0.458 | |
| B | D1 | 109 | 33 | 49 | 209 | 0.136 | 0.310 | 0.768 |
| B | D2 | 146 | 18 | 12 | 224 | 0.074 | 0.076 | 0.890 |
Show the full program
# Chapter 3. p31: false kills and misses of three lexicon versions.
# Model: two synthetic weekly samples of listing lines, built from
# labelled templates (fixed seeds). Label V = the line makes an
# absolute or unverified claim about the product; C = it does not.
# Week B adds one new absolute phrasing and one new exempt context
# that the audit of week A never saw. Detector D0 = bare lexicon;
# D1 = D0 + exempt contexts; D2 = D1 + the additions found by
# auditing week A. False-kill rate = FP / (FP + TN); miss rate =
# FN / (FN + TP). Templates, weights and sizes are illustrative.
import random
from collections import deque
BASE = [("zui jia", "ABS"), ("di yi", "ABS"), ("ding ji", "ABS"),
("quan wang zui di", "ABS"), ("guo jia ji", "ABS"),
("wei yi", "ABS"), ("ling cha ping", "UNV"),
("zui jia shang wei qi", "OK"), ("di yi ci", "OK"),
("di yi bu", "OK"), ("wei yi ma", "OK")]
AUDIT = [("wu ren neng bi", "ABS"), ("shi shang zui", "ABS"),
("zui jia shi yong", "OK")]
DET = {"D0": [e for e in BASE if e[1] != "OK"], "D1": BASE,
"D2": BASE + AUDIT}
PROD = ["zhen pi bao", "lv cha", "mian ma chen shan", "tao ci bei"]
# (label, template, weight in week A, weight in week B)
TPL = [("V", "{p} quan wang zui di jia", 3, 3),
("V", "{p} zui jia xuan ze", 3, 3),
("V", "ding ji {p}", 3, 3),
("V", "guo jia ji gong yi {p}", 2, 2),
("V", "{p} pin lei di yi", 3, 3),
("V", "{p} ling cha ping", 2, 2),
("V", "{p} wu ren neng bi", 2, 2),
("V", "{p} shi shang zui hao", 2, 2),
("V", "{p} wu yu lun bi", 0, 2),
("C", "{p} zui jia shang wei qi liu ge yue", 4, 4),
("C", "di yi ci gou mai {p} mian yun fei", 4, 4),
("C", "di yi bu qing xi {p}", 3, 3),
("C", "{p} wei yi ma ke cha", 3, 3),
("C", "{p} zui jia shi yong wen du", 3, 3),
("C", "{p} di yi pi dao huo", 0, 3),
("C", "{p} jin san shi tian xiao shou", 10, 10),
("C", "{p} ben pin pai xin kuan", 10, 10)]
def build(lex):
goto, fail, out = [{}], [0], [[]]
for pid, (w, _) in enumerate(lex):
s = 0
for tok in w.split():
if tok not in goto[s]:
goto.append({})
fail.append(0)
out.append([])
goto[s][tok] = len(goto) - 1
s = goto[s][tok]
out[s].append(pid)
queue = deque(goto[0].values())
while queue:
r = queue.popleft()
for tok, s in goto[r].items():
queue.append(s)
f = fail[r]
while f and tok not in goto[f]:
f = fail[f]
fail[s] = goto[f].get(tok, 0)
out[s] = out[s] + out[fail[s]]
return goto, fail, out
def flagged(toks, lex, ac):
goto, fail, out = ac
s, spans = 0, []
for i, tok in enumerate(toks):
while s and tok not in goto[s]:
s = fail[s]
s = goto[s].get(tok, 0)
for pid in out[s]:
n = len(lex[pid][0].split())
spans.append((i + 1 - n, i + 1, lex[pid][1]))
ok = [(a, b) for a, b, c in spans if c == "OK"]
for a, b, c in spans:
if c != "OK" and not any(x <= a and b <= y for x, y in ok):
return True
return False
def sample(col, n):
rng = random.Random(20261113 if col == 2 else 20261120)
w = [t[col] for t in TPL]
lines = []
for _ in range(n):
lab, tpl = rng.choices(TPL, weights=w)[0][:2]
lines.append((lab, tpl.format(p=rng.choice(PROD)).split()))
return lines
WEEKS = {"A": sample(2, 400), "B": sample(3, 400)}
print("week det TP FP FN TN false-kill miss precision")
for wk, lines in WEEKS.items():
for name, lex in DET.items():
ac = build(lex)
tp = fp = fn = tn = 0
for lab, toks in lines:
f = flagged(toks, lex, ac)
if lab == "V" and f:
tp += 1
elif lab == "V":
fn += 1
elif f:
fp += 1
else:
tn += 1
print(" %s %s %4d %3d %3d %4d %.3f %.3f %.3f"
% (wk, name, tp, fp, fn, tn, fp / (fp + tn),
fn / (fn + tp), tp / (tp + fp)))Single source and citation
Fan, Y. (2026). Compliant Rewriting for Platform-Sensitive Terms: Absolute-Term Automata under the Advertising Law, Meaning-Preserving Rewrites and Conversion Elasticity (Version 1.0.0), Chapter 3: False Kills and Misses: Exempt Contexts, Audit Additions and Audit Sample Sizes. 5D Library. DOI pending
DOI pending · monograph page goes live after publication · 5DL-B-274 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026274,
author = {Fan, Yafu},
title = {Compliant Rewriting for Platform-Sensitive Terms: Absolute-Term Automata under the Advertising Law, Meaning-Preserving Rewrites and Conversion Elasticity},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
note = {DOI pending}
}Other chapter answers in this book
- Chapter 1 · The Risk Ledger of an Absolute Term: How Much Conversion Must One "Best" Buy?
- Chapter 2 · One Pass for Every Term: the Aho-Corasick Multi-Pattern Automaton
- Chapter 4 · Choosing Rewrites under Constraints: Evidence, Re-scanning and Title Length
- Chapter 5 · Keeping the Meaning: Why Surface Similarity Rewards the Violation
- Chapter 6 · Conversion Elasticity: How Much Does a Rewrite Move Conversion, and Can a Test Tell?
- Chapter 7 · Eastern and Western Sources: "If Names Are Not Correct" and Orwell's Rules for Writing
- Chapter 8 · Closing the Loop: a Compliant-Rewrite Library for the Persuasive-Copy Checker, and a Non-Inferiority Test