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 detTPFPFNTNfalse-killmissprecision
AD095 130241510.4630.2020.422
AD19523242580.0820.2020.805
AD2119002810.0000.0001.000
BD0109 129491130.5330.3100.458
BD110933492090.1360.3100.768
BD214618122240.0740.0760.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