关于「句法树重构:三种树操作与「长者在外」的排序定理」,《去翻译腔的中文文案计算》给出的定量结论是什么?
结论:第四章给出三种句法树操作,定语从句外置使示意句的平均依存距离降到原来的 0.721,并证明修饰语「长者在外」的排序最优,七个成分时把总长度降到随机次序的 0.725。
数据口径:书中的例句与参数均为示意;全部计算由书中程序生成;本书不构成个别化的法律、广告合规或营销建议,只讨论守规矩的说服。 第一章用手工标注的示意依存树说明,西化稿的平均依存距离是 3.429,母语改写是 1.515;与保持树结构的随机语序相比,西化稿的比值为 0.950,几乎等于随机,改写稿为 0.640。
对照数据表
下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库与结论吻合的打印值: 0.721
| sent | step | DL | MDD | words |
|---|---|---|---|---|
| A1 | draft | 69 | 3.833 | 19 |
| A1 | EXT | 47 | 2.765 | 18 |
| A1 | final MDD / draft MDD = 0.721 | |||
| B1 | draft | 41 | 3.154 | 14 |
| B1 | LV | 39 | 3.250 | 13 |
| B1 | ACT | 23 | 2.091 | 12 |
| B1 | final MDD / draft MDD = 0.663 | |||
| C1 | draft | 52 | 3.250 | 17 |
| C1 | LV | 57 | 3.800 | 16 |
| C1 | final MDD / draft MDD = 1.169 |
查看完整验算程序
# Chapter 4. p41: Three tree operations that undo common Europeanised
# patterns, applied in order to the drafts A1, B1 and C1 of Chapter 1.
# LV light verb: 进行 + verbal noun -> the verbal noun becomes the verb
# and inherits every other dependent of 进行; a 的 under one of its
# modifiers becomes adverbial 地.
# ACT passive to active: drop 被; the agent subtree moves to the front
# of the clause, the patient subtree moves after the verb.
# EXT a relative clause (label acl) of four or more words including
# its 的 is cut out of the noun phrase, loses its 的, and is placed
# as a separate clause at the front, attached to the root.
# A moved block keeps its internal word order; only its slot among its
# siblings changes. DL = total dependency length, MDD = mean dependency
# distance.
# Trees and labels are the author's illustrative annotation.
import math
DRAFTS = {
"A1": [("我们", 13, ""), ("将", 13, ""), ("为", 12, ""),
("所有", 12, ""), ("在", 7, ""), ("周五", 7, ""), ("之前", 8, ""),
("完成", 12, "acl"), ("预订", 8, ""), ("的", 8, "mark"),
("新", 12, ""), ("会员", 13, ""), ("提供", 0, ""), ("一", 15, ""),
("次", 19, ""), ("免费", 19, ""), ("的", 16, "mark"),
("升级", 19, ""), ("服务", 13, "")],
"B1": [("您", 3, ""), ("的", 1, "mark"), ("订单", 12, "patient"),
("已经", 12, ""), ("被", 12, "pass"), ("我们", 9, ""),
("的", 6, "mark"), ("物流", 9, ""), ("团队", 12, "agent"),
("成功", 12, ""), ("地", 10, ""), ("进行", 0, "lv"),
("了", 12, ""), ("处理", 12, "obj")],
"C1": [("通过", 14, ""), ("使用", 1, ""), ("我们", 6, ""),
("的", 3, "mark"), ("会员", 6, ""), ("系统", 2, ""), ("您", 14, ""),
("可以", 14, ""), ("对", 13, ""), ("您", 13, ""), ("的", 10, "mark"),
("消费", 13, ""), ("记录", 14, ""), ("进行", 0, "lv"),
("实时", 17, ""), ("的", 15, "mark"), ("查询", 14, "obj")],
}
class Tree:
def __init__(self, rows):
self.word = {i: w for i, (w, _, _) in enumerate(rows, 1)}
self.head = {i: h for i, (_, h, _) in enumerate(rows, 1)}
self.lab = {i: x for i, (_, _, x) in enumerate(rows, 1)}
self.key = {i: float(i) for i in self.word} # block place
self.own = {i: float(i) for i in self.word} # place in block
def kids(self, n):
return [d for d in self.word if self.head[d] == n]
def size(self, n):
return 1 + len([1 for c in self.kids(n) for _ in self.walk(c)])
def walk(self, n):
out = [n]
for c in self.kids(n):
out += self.walk(c)
return out
def root(self):
return [d for d in self.word if self.head[d] == 0][0]
def order(self, n=None):
n = self.root() if n is None else n
out = []
ks = dict((c, self.key[c]) for c in self.kids(n))
ks[n] = self.own[n]
for m in sorted(ks, key=lambda x: ks[x]):
out += [n] if m == n else self.order(m)
return out
def remove(self, n):
del self.word[n], self.head[n], self.lab[n], self.key[n]
del self.own[n]
def measure(self):
pos = {n: i for i, n in enumerate(self.order())}
d = [abs(pos[a] - pos[b]) for a, b in self.head.items() if b]
return math.fsum(d), math.fsum(d) / len(d)
def text(self):
return "".join(self.word[n] for n in self.order())
def op_lv(t):
for n in [x for x in t.word if t.lab[x] == "lv"]:
obj = [c for c in t.kids(n) if t.lab[c] == "obj"][0]
own_mods = t.kids(obj)
for c in t.kids(n):
if c != obj:
t.head[c] = obj
for c in own_mods:
if t.key[c] > t.own[n]:
t.key[c] = t.own[n] - 0.5
for g in t.kids(c):
if t.word[g] == "的":
t.word[g] = "地"
t.head[obj], t.key[obj] = t.head[n], t.key[n]
t.own[obj] = t.own[n]
t.remove(n)
return t
def op_act(t):
for n in [x for x in t.word if t.lab[x] == "pass"]:
v = t.head[n]
t.remove(n)
for c in t.kids(v):
if t.lab[c] == "agent":
t.key[c] = -1.0
if t.lab[c] == "patient":
t.key[c] = 999.0
return t
def op_ext(t):
r = t.root()
for n in [x for x in t.word if t.lab[x] == "acl"]:
if t.size(n) >= 4:
for c in t.kids(n):
if t.lab[c] == "mark":
t.remove(c)
t.head[n], t.key[n] = r, -2.0
return t
print("sent step DL MDD words")
for key, rows in DRAFTS.items():
t = Tree(rows)
assert t.order() == sorted(t.word), key # the draft is projective
dl0, m0 = t.measure()
print("{:<5} {:<5} {:>3.0f} {:>6.3f} {}".format(
key, "draft", dl0, m0, len(t.order())))
for name, op in (("LV", op_lv), ("ACT", op_act), ("EXT", op_ext)):
before = t.text()
op(t)
if t.text() != before:
dl, m = t.measure()
print("{:<5} {:<5} {:>3.0f} {:>6.3f} {}".format(
key, name, dl, m, len(t.order())))
print("{:<5} final MDD / draft MDD = {:.3f}".format(key, m / m0))唯一数据源与引用
范雅福(Fan, Y.). (2026). 《跨语境母语修辞韵律、去翻译腔句法树重构与马新台华语转化语料学》第 4 章「句法树重构:三种树操作与「长者在外」的排序定理」(版本 1.0.0). 5D Library. DOI 待发布
DOI 待发布 · 专著页正式发布后上线(本站暂无专著页) · 5DL-B-144 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026144,
author = {Fan, Yafu},
title = {Native Cross-Context Prosody, De-Translationese Syntax-Tree Rewriting and a Conversion Corpus of Malaysian, Singaporean and Taiwanese Chinese},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
note = {DOI pending}
}