What does Computing Native Chinese Copy conclude, in numbers, about “Rewriting the Tree: Three Operations and the Long-Outside Ordering Theorem”?
Answer: Chapter 4 gives three syntax-tree operations, relative-clause extraction bringing an example sentence down to 0.721 of its mean dependency distance, and proves that ordering modifiers long-outside is optimal, cutting total length at seven dependents to 0.725 of a random order.
Scope of the numbers: Its example sentences and parameters are illustrative; all calculations are generated by its programs; it is not individual legal, advertising-compliance or marketing advice, and it discusses only persuasion that keeps the rules. Chapter 2 proves that the dependency length of stacked modifiers grows roughly with the square of the layers, so that at four layers the illustrative probability of keeping every relation is only 0.098.
Data table
The numbers below are printed verbatim by the chapter's Python program and can be reproduced by running it. standard-library Python onlyprinted values that match the answer: 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 |
Show the full program
# 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))Single source and citation
Fan, Y. (2026). Native Cross-Context Prosody, De-Translationese Syntax-Tree Rewriting and a Conversion Corpus of Malaysian, Singaporean and Taiwanese Chinese (Version 1.0.0), Chapter 4: Rewriting the Tree: Three Operations and the Long-Outside Ordering Theorem. 5D Library. DOI pending
DOI pending · monograph page goes live after publication · 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}
}Other chapter answers in this book
- Chapter 1 · Dependency Distance: Why Europeanised Long Sentences Are Hard to Read
- Chapter 2 · Chains of De and Stacked Modifiers: an Exact Account of the Left-Branching Burden
- Chapter 3 · Fingerprints of Translationese: Ten Machine-Checkable Markers and a Poisson Likelihood-Ratio Test
- Chapter 5 · Prosody and Breath: Segment Lengths, Dynamic Programming for Commas, and the Rhythm of Fours and Sixes
- Chapter 6 · Converting Between Malaysian, Singaporean, Taiwanese and Hong Kong Chinese: a Lexicon, an Affinity Matrix and a Library of Closing Sentences
- Chapter 7 · The Classics Examined: Sentences and Pruning in the Wenxin Diaolong, and Orwell's Six Rules
- Chapter 8 · Practice and Refutation: the Persuasive-Copy Checker, a Ceiling on Private Follow-Ups, and a Pre-Registered Test