关于「嵌词密度上界与语域信号」,《嵌词阈值与单语等效》给出的定量结论是什么?
结论:嵌词密度不是开关,而是连续量。语域收益边际递减,可读性损失加速上升,解码失败成本与密度和不认得的比例成正比;在示意参数下,覆盖率 0.95 时最优密度为每百字 2.16 个、上界 5.10 个,覆盖率不高于 0.50 时完全不该嵌。嵌词携带的语域信号可以用互信息量,在合成表里它只消除了语域不确定性的一小部分。按单条消息的可靠性要求,允许的密度比平均最优低得多,一对一私讯应取两者中较小的一个。
数据口径:嵌词收益只在读者共享双语词库时成立:把单语表达、嵌入与嵌入加注释写成覆盖率的三条成本线,示意参数下 kiasu 在书面渠道的覆盖率阈值为 0.844;读者不发问时,失败会变成沉默的误读;各地区分页面值得嵌的词,合成混合页面后可能全部跌破阈值。 书中参数为示意,全部计算由书中程序生成,不对应任何真实客户、对话或成交;马来语、闽南语、粤语、英语、华语一律平等对待。
对照数据表
下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库与结论吻合的打印值: 0.50, 0.95, 2.16, 5.10
| p | d* | U(d*) | d_max | per 300 chars at d* |
| 0.95 | 2.16 | 2.104 | 5.10 | 6.5 |
| 0.85 | 1.32 | 1.075 | 3.10 | 3.9 |
| 0.70 | 0.53 | 0.280 | 1.19 | 1.6 |
| 0.50 | 0.00 | 0.000 | 0.00 | none |
| insertion pays at all only if p > 1 - A/C = 0.50 |
查看完整验算程序
# Chapter 5. p51: an optimum and an upper bound for insertion density.
# Utility per 100 characters with d insertions:
# U(d) = A ln(1 + d) - B d^2 - C (1 - p) d
# A: register signal with diminishing returns; B: readability penalty;
# C: expected cost of each word a fraction 1 - p of readers cannot decode.
# A = 3.0, B = 0.15, C = 6.0 are illustrative (author's hypothesis).
# d* solves U'(d) = 0; d_max is the positive root of U(d) = 0, the density
# beyond which inserting is worse than writing in one language.
import math
A, B, C = 3.0, 0.15, 6.0
def u(d, p):
return A * math.log1p(d) - B * d * d - C * (1 - p) * d
def du(d, p):
return A / (1 + d) - 2 * B * d - C * (1 - p)
def bisect(f, lo, hi):
for _ in range(200):
mid = (lo + hi) / 2
if f(lo) * f(mid) <= 0:
hi = mid
else:
lo = mid
return (lo + hi) / 2
if __name__ == "__main__":
print(" p d* U(d*) d_max per 300 chars at d*")
for p in (0.95, 0.85, 0.70, 0.50):
if du(0.0, p) <= 0:
print("{:>5.2f} 0.00 0.000 0.00 none".format(p))
continue
ds = bisect(lambda d: du(d, p), 0.0, 20.0)
dm = bisect(lambda d: u(d, p), ds, 40.0)
print("{:>5.2f} {:>6.2f} {:>8.3f} {:>7.2f} {:.1f}".format(
p, ds, u(ds, p), dm, 3 * ds))
pc = 1 - A / C
print("insertion pays at all only if p > 1 - A/C = {:.2f}".format(pc))唯一数据源与引用
范雅福(Fan, Y.). (2026). 《多语参杂语码转换信息论、词汇空缺补偿与单语种等效精准表达母典》第 5 章「嵌词密度上界与语域信号」(版本 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}
}