关于「数字对账与重复句:中英一致、程序对账与近似重复检测」,《多窗口写书防漂移》给出的定量结论是什么?

结论:数字对账看的是两件事:中英两份稿的可检数字集合相等,正文的每个可检数字都能在程序输出或源码里找到。它的盲区来自它的定义:紧贴汉字的数字看不见,年份带里的整数不检查,386.5 与 386.50 被当作两个数,带逗号的 1,032 在不带逗号的输出里找不到。补法是格式约定:数字两侧留空格,非年份的大整数一律写千分位,程序按正文要抄的格式打印。重复句检测分两层:20 字以上的逐字重复用字典或 64 位指纹,规范化只做 NFKC、删空白与去句末标点;改写过的近似重复用 2 到 3 字的字符片段、MinHash 签名与分带候选,再用精确 Jaccard 收口。切法与阈值不靠抄,要按漏报与误报的代价比来定;在本章的假设下,64×2 加 0.35 的阈值每本书期望成本最低。

数据口径:书中未标出处的错误率都是假设参数或合成数据上的测量值;本书不是法律意见,也不推荐任何写作工具或模型。 第八章让四个窗口并发写一本九章合成书,注入五类共 119 个错误:四道闸门拦住 0.723,漏网的 33 个里有 28 个属于机器在结构上看不见的手法,扣除后检出率为 0.945;干净书上术语检测首轮误报 1672 处,人审 48 个词后归零;一份严肃的注入审计每类至少要 75 个错误。

English version

对照数据表

下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库与结论吻合的打印值: 1032, 386.5, 386.50

output tokens0.027 0.418 2384 386.50 dropped as year band: 1032
zh tokens2384 386.5 2.7% 0.418
zh year band, not checked2019 1999
reconcile2384 -> exact
reconcile386.5 -> MISSING
reconcile2.7% -> as 0.027
reconcile0.418 -> exact
en tokens2348 386.5 2.7% 0.418 1032
en year band, not checked2019 1998
reconcile2348 -> MISSING
reconcile386.5 -> MISSING
reconcile2.7% -> as 0.027
reconcile0.418 -> exact
reconcile1032 -> MISSING
parity only zh: ['2384'] only en: ['1032', '2348']
year band only zh: ['1999'] only en: ['1998'] (invisible to the rule)
zh numbers glued to a CJK character: ['1,032']
written as1999: checked = False
written as1,999: checked = True
written as 386.50: checked = True
written as 0.4180: checked = True
查看完整验算程序
# Chapter 4. p40: Checkable numbers in a fictional zh/en paragraph pair: parity and output reconciliation.
# The token rule is the publishing house's: a number counts when it has a decimal point, or when it is an
# integer >= 1000 that is not a bare year (1000..2100 written without a thousands comma). A percentage
# "2.7%" may also be matched by the printed fraction 0.027. The regex refuses a number glued to a word
# character on either side; in Python 3 every CJK character is a word character.
# All names and figures below are fictional.
import re

NUM = re.compile(r"(?<![\w.])[+\-]?(\d{1,3}(?:,\d{3})+(?:\.\d+)?|\d+\.\d+|\d+)(?![\w])(\s?%)?")

ZH = ("青梧工作室去年接单 2,384 件,客单价 386.5 元,退款率 2.7%,毛利率 0.418;2019 年开业,"
      "旗舰套餐定价 1999 元,回款周期 45 天,复购客户共1,032位。")
EN = ("Qingwu Studio took 2,348 orders last year at an average ticket of 386.5, a refund rate of 2.7% "
      "and a gross margin of 0.418; it opened in 2019, prices its flagship bundle at 1998, collects in "
      "45 days and has 1,032 repeat clients.")
OUTPUT = "orders 2384\nmean_ticket 386.50\nrefund_rate 0.027\ngross_margin 0.418\nrepeat_clients 1032"


def scan(text):
    """Return (checked tokens with percent flag, year-band integers that the rule skips)."""
    checked, band = [], []
    for m in NUM.finditer(text):
        raw = m.group(1)
        plain = raw.replace(",", "")
        if "." not in plain:
            v = int(plain)
            if v < 1000:
                continue
            if "," not in raw and v <= 2100:
                band.append(plain)
                continue
        checked.append((plain, bool(m.group(2))))
    return checked, band


def frac(tok):
    d = len(tok.split(".")[1]) if "." in tok else 0
    return "{:.{}f}".format(float(tok) / 100.0, d + 2)


def main():
    out_tokens = {t for t, _ in scan(OUTPUT)[0]}
    print("output tokens: {}  dropped as year band: {}".format(" ".join(sorted(out_tokens)),
                                                              " ".join(scan(OUTPUT)[1])))
    sets, bands = {}, {}
    for lang, text in (("zh", ZH), ("en", EN)):
        checked, band = scan(text)
        sets[lang] = {t for t, _ in checked}
        bands[lang] = set(band)
        print("{} tokens: {}".format(lang, " ".join(t + ("%" if p else "") for t, p in checked)))
        print("{} year band, not checked: {}".format(lang, " ".join(band)))
        for t, p in checked:
            hit = t in out_tokens or (p and frac(t) in out_tokens)
            how = "as " + frac(t) if p and frac(t) in out_tokens else ("exact" if hit else "MISSING")
            print("   reconcile {:>7} -> {}".format(t + ("%" if p else ""), how))
    print("parity only zh: {}  only en: {}".format(sorted(sets["zh"] - sets["en"]),
                                                   sorted(sets["en"] - sets["zh"])))
    print("year band only zh: {}  only en: {}  (invisible to the rule)".format(
        sorted(bands["zh"] - bands["en"]), sorted(bands["en"] - bands["zh"])))
    glued = re.findall(r"[一-鿿](\d[\d,.]*)|(\d[\d,.]*)[一-鿿]", ZH)
    print("zh numbers glued to a CJK character: {}".format([a or b for a, b in glued]))
    for s in ("1999", "1,999", "386.50", "0.4180"):
        print("   written as {:>6}: checked = {}".format(s, bool(scan(s)[0])))


if __name__ == "__main__":
    main()

唯一数据源与引用

范雅福(Fan, Y.). (2026). 《多窗口并行写书防漂移控制、术语跨卷一致性图审计与零幻觉文献核验器》第 4 章「数字对账与重复句:中英一致、程序对账与近似重复检测」(版本 0.1.0). 5D Library. DOI 待发布

DOI 待发布 · 专著页正式发布后上线(本站暂无专著页) · 5DL-B-152 · v0.1.0 · CC-BY-NC-ND-4.0

BibTeX
@book{fan2026152,
  author    = {Fan, Yafu},
  title     = {Drift Control for Parallel Multi-Window Book Writing, Cross-Volume Terminology Graph Audits and Zero-Hallucination Citation Verifiers},
  year      = {2026},
  publisher = {5D Library},
  edition   = {0.1.0},
  note      = {DOI pending}
}

本书其他章节结论