关于「不是偷懒:转换点守着两套语法」,《嵌词阈值与单语等效》给出的定量结论是什么?
结论:这组数字给出偷懒假说的一个直接推论。假如说话人在随机位置换语言,每一次转换违反等价约束的概率就是 0.5714。一份收录 200 次转换的语料,随机模型预期约 114.3 次违规。波普拉克报告的情形恰好相反:她的语料里,违反约束的转换极少。程序最后一行把这件事写成似然比:假设观察到 2 次违规,守约模型容许百分之一的偶发失误(eps 0.01),两种模型的似然比取以十为底的对数是 68.5。这不是一个接近的比赛。
数据口径:嵌词收益只在读者共享双语词库时成立:把单语表达、嵌入与嵌入加注释写成覆盖率的三条成本线,示意参数下 kiasu 在书面渠道的覆盖率阈值为 0.844;读者不发问时,失败会变成沉默的误读;各地区分页面值得嵌的词,合成混合页面后可能全部跌破阈值。 书中参数为示意,全部计算由书中程序生成,不对应任何真实客户、对话或成交;马来语、闽南语、粤语、英语、华语一律平等对待。
对照数据表
下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库与结论吻合的打印值: 0.01, 0.5714, 114.3, 200, 68.5
| frame | cuts | licit |
|---|---|---|
| bought-book-yesterday | 4 | 1 |
| eat-at-hawker-centre | 4 | 1 |
| very-cheap-price | 2 | 2 |
| shop-that-sells-durian | 2 | 0 |
| where-do-you-want-to-go | 3 | 0 |
| my-friend-s-car | 2 | 2 |
| i-like-this-design | 3 | 3 |
| deliver-tomorrow | 1 | 0 |
| all frames: 21 cuts, 9 licit, licit share 0.4286 | ||
| random switching breaks the constraint with p = 0.5714 | ||
| corpus of 200 switches: random model expects 114.3 breaks | ||
| observed 2 breaks, eps 0.01: log10 LR = 68.5 |
查看完整验算程序
# Chapter 1. p11: where may a Chinese-English sentence switch language?
# Model: the equivalence constraint (Poplack 1980). A switch between
# position i and i+1 is licit when the words before the cut form the same
# set in both word orders, so neither grammar is broken at the juncture.
# Eight synthetic frames, Chinese order first, English order second; the
# glosses are illustrative and stand for whole constituents.
import math
FRAMES = [
("bought-book-yesterday", "S T V D N", "S V D N T"),
("eat-at-hawker-centre", "S P L1 L2 V", "S V P L1 L2"),
("very-cheap-price", "Adv Adj N", "Adv Adj N"),
("shop-that-sells-durian", "V O N", "N V O"),
("where-do-you-want-to-go", "S W G Q", "Q S W G"),
("my-friend-s-car", "P F N", "P F N"),
("i-like-this-design", "S V D N", "S V D N"),
("deliver-tomorrow", "T V", "V T"),
]
def licit_cuts(zh, en):
a, b = zh.split(), en.split()
ok = 0
for i in range(1, len(a)):
if set(a[:i]) == set(b[:i]):
ok += 1
return ok, len(a) - 1
def log10_lr(n, k, p_rand, eps):
# log10 of P(data | constrained) / P(data | random switching)
good = k * math.log10(eps) + (n - k) * math.log10(1 - eps)
bad = k * math.log10(p_rand) + (n - k) * math.log10(1 - p_rand)
return good - bad
if __name__ == "__main__":
tot_ok = tot_all = 0
print("frame cuts licit")
for name, zh, en in FRAMES:
ok, allc = licit_cuts(zh, en)
tot_ok += ok
tot_all += allc
print("{:<26} {:>4} {:>6}".format(name, allc, ok))
share = tot_ok / tot_all
print("all frames: {} cuts, {} licit, licit share {:.4f}".format(
tot_all, tot_ok, share))
p_rand = 1 - share
print("random switching breaks the constraint with p = {:.4f}"
.format(p_rand))
n, k, eps = 200, 2, 0.01
print("corpus of {} switches: random model expects {:.1f} breaks"
.format(n, n * p_rand))
print("observed {} breaks, eps {}: log10 LR = {:.1f}".format(
k, eps, log10_lr(n, k, p_rand, eps)))唯一数据源与引用
范雅福(Fan, Y.). (2026). 《多语参杂语码转换信息论、词汇空缺补偿与单语种等效精准表达母典》第 1 章「不是偷懒:转换点守着两套语法」(版本 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}
}