关于「实战工具与检查器规格:嵌词台账、四件套检查器与预注册检验」,《嵌词阈值与单语等效》给出的定量结论是什么?
结论:第八章给出嵌词台账、四件套检查器规格、蒸馏小工具「多语嵌词净收益与单语构式等效试算器」与预注册检验。书中参数为示意,全部计算由书中程序生成,不对应任何真实客户、对话或成交;马来语、闽南语、粤语、英语、华语一律平等对待。本书不是语言学定论,也不构成针对个人或企业的经营建议。书中以标注框区分已发表的证据、可运行的 Python 计算(23 段程序)、原典与作者的假说。
数据口径:嵌词收益只在读者共享双语词库时成立:把单语表达、嵌入与嵌入加注释写成覆盖率的三条成本线,示意参数下 kiasu 在书面渠道的覆盖率阈值为 0.844;读者不发问时,失败会变成沉默的误读;各地区分页面值得嵌的词,合成混合页面后可能全部跌破阈值。 书中参数为示意,全部计算由书中程序生成,不对应任何真实客户、对话或成交;马来语、闽南语、粤语、英语、华语一律平等对待。
对照数据表
下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库
| id | word | p | p* | d | d_max | cov | trans | verdict |
|---|---|---|---|---|---|---|---|---|
| L1 | kiasu | 0.82 | 0.844 | 0.8 | 2.62 | 0.8 | 9.5 | AMBER PSTAR |
| D2 | lepak | ? | 0.967 | 1.6 | - | 0.8 | 7.0 | RED UNK |
| C3 | paiseh | 0.95 | 0.933 | 0.4 | 5.10 | 1.0 | 6.0 | GREEN |
| B4 | sajiao | 0.10 | 0.858 | 0.3 | 0.00 | 0.8 | 4.0 | AMBER PSTAR,DENS |
| L5 | shiok | 0.90 | - | 2.5 | 4.02 | 0.6 | 8.0 | RED COV,NEG |
| C6 | followup 0.97 | 0.935 | 3.5 | 5.56 | 1.0 | 21.0 | RED TRS | |
| D7 | kiasu | 0.95 | 0.844 | 0.5 | 5.10 | 0.8 | 5.0 | RED LINE |
| tally: RED 4, AMBER 2, GREEN 1 |
查看完整验算程序
# Chapter 8. p81: the insertion ledger, seven synthetic rows, one verdict.
# Per row: coverage p (None when unknown), insertions per 100 chars d,
# bits saved for knowers G (p31), failure cost F = Le + K (p41),
# coverage of the monolingual rewrite, translationese per 1,000 chars,
# and whether the copy trips a red line. Rules (sources in brackets):
# red p unknown and d > 1.0 [ch5]; rewrite coverage < 0.8 [ch6];
# translationese > 18.44 [ch6]; copy red line [ch8]
# amber p < p* = F / (G + F) [ch4]; G <= 0 [ch3]; d > d_max(p) [ch5]
# Rows are synthetic and describe no real customer or message.
import math
A, B, C = 3.0, 0.15, 6.0
ROWS = [
("L1", "kiasu", 0.82, 0.8, 7.22, 38.97, 0.8, 9.5, False),
("D2", "lepak", None, 1.6, 1.33, 38.55, 0.8, 7.0, False),
("C3", "paiseh", 0.95, 0.4, 2.70, 37.55, 1.0, 6.0, False),
("B4", "sajiao", 0.10, 0.3, 6.82, 41.29, 0.8, 4.0, False),
("L5", "shiok", 0.90, 2.5, -3.80, 39.14, 0.6, 8.0, False),
("C6", "followup", 0.97, 3.5, 2.10, 30.00, 1.0, 21.0, False),
("D7", "kiasu", 0.95, 0.5, 7.22, 38.97, 0.8, 5.0, True),
]
def d_max(p):
u = lambda d: A * math.log1p(d) - B * d * d - C * (1 - p) * d
if A - C * (1 - p) <= 0:
return 0.0
lo, hi = 1e-9, 40.0
for _ in range(200):
mid = (lo + hi) / 2
if u(mid) > 0:
lo = mid
else:
hi = mid
return lo
def verdict(row):
_, _, p, d, g, f, cov, tr, line = row
red, amber = [], []
if p is None and d > 1.0:
red.append("UNK")
if cov < 0.8:
red.append("COV")
if tr > 18.44:
red.append("TRS")
if line:
red.append("LINE")
pstar = f / (g + f) if g > 0 else None
if g <= 0:
amber.append("NEG")
elif p is not None and p < pstar:
amber.append("PSTAR")
if p is not None and d > d_max(p):
amber.append("DENS")
level = "RED" if red else ("AMBER" if amber else "GREEN")
return level, pstar, red + amber
if __name__ == "__main__":
print("id word p p* d d_max cov trans verdict")
tally = {}
for r in ROWS:
level, pstar, why = verdict(r)
tally[level] = tally.get(level, 0) + 1
ps = " - " if pstar is None else "{:.3f}".format(pstar)
pp = " ? " if r[2] is None else "{:.2f} ".format(r[2])
dm = " - " if r[2] is None else "{:5.2f}".format(d_max(r[2]))
tag = (level + " " + ",".join(why)).strip()
print("{:<3} {:<8} {} {} {:>4.1f} {} {:>4.1f} {:>5.1f} {}"
.format(r[0], r[1], pp, ps, r[3], dm, r[6], r[7], tag))
print("tally: " + ", ".join("{} {}".format(k, tally[k])
for k in ("RED", "AMBER", "GREEN")
if k in tally))唯一数据源与引用
范雅福(Fan, Y.). (2026). 《多语参杂语码转换信息论、词汇空缺补偿与单语种等效精准表达母典》第 8 章「实战工具与检查器规格:嵌词台账、四件套检查器与预注册检验」(版本 1.0.0). 5D Library. DOI 待发布
DOI 待发布 · 专著页正式发布后上线(本站暂无专著页) · 5DL-B-381 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026381,
author = {Fan, Yafu},
title = {Information Theory of Code-Switching, Lexical-Gap Compensation and Monolingual Precision Equivalence in Multilingual Markets},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
note = {DOI pending}
}