What does Three-Way Brand Collision Pre-Screening conclude, in numbers, about “Component Distance: a Table of Look-Alike Characters and Unicode Normalisation”?
Answer: The three pairs that are near in sound only deserve a namer's attention. N1 and N3, and N2 and N3, are 1.000 apart in shape, with not a single shared component, yet only 0.075 apart in sound. N4 and N8 are 0.667 apart in shape and 0.300 in sound. A shape-only check would wave all three through.
Scope of the numbers: In an illustrative model, with the sound channel at eight tenths, the AUC of the sound code is 0.851 against 0.817 for letter edit distance. Parameters are illustrative; all calculations are generated by the book's programs; the book is general analysis, not individualised legal advice, and judgements of trademark similarity rest with official searches in each jurisdiction and professional agents.
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.075, 0.300, 0.667, 1.000
| pair | graphic | sound | cell |
|---|---|---|---|
| N1-N3 | 1.000 | 0.075 | near in sound only |
| N1-N8 | 0.333 | 0.500 | near in shape only |
| N2-N3 | 1.000 | 0.075 | near in sound only |
| N4-N8 | 0.667 | 0.300 | near in sound only |
| N5-N6 | 0.333 | 0.425 | near in shape only |
| N7-N8 | 0.333 | 0.500 | near in shape only |
| all pairs 28; cut 0.35 on both axes | |||
| near in both 1 | shape only 3 | sound only 3 | neither 21 |
Show the full program
# Chapter 4. p42: shape and sound disagree for many name pairs.
# Model: a name is a sequence of character ids from the p41 table.
# Graphic name distance = edit distance with the p41 Jaccard cost as
# substitution; sound name distance = the same with the p31 syllable
# cost; both divided by the longer length. Every pair of eight
# invented two-character names is placed in a 2 x 2 table with a cut
# of 0.35 on each axis. Names, table and cut are illustrative.
import math
from itertools import combinations
CHARS = {
"qing1_W": ("water", "qing"), "qing2_S": ("sun", "qing"),
"qing3_Y": ("speech", "qing"), "qing4_G": ("shelter", "big"),
"yue4_H": ("heart", "dui"), "yue4_M": ("moon",),
"shuo1_Y": ("speech", "dui"), "tuo1_M": ("moon", "dui"),
"yang2_W": ("water", "yang"), "xiang2_Y": ("speech", "yang"),
"xing1_S": ("sun", "sheng"), "ming2_S": ("sun", "moon"),
}
INITIALS = ("zh", "ch", "sh", "b", "p", "m", "f", "d", "t", "n", "l",
"g", "k", "h", "j", "q", "x", "r", "z", "c", "s", "y", "w")
NEAR_I = {frozenset(p) for p in (("zh", "z"), ("ch", "c"), ("sh", "s"),
("n", "l"), ("f", "h"))}
NEAR_F = {frozenset(p) for p in (("en", "eng"), ("in", "ing"),
("an", "ang"))}
NAMES = {
"N1": ("qing1_W", "yue4_H"), "N2": ("qing2_S", "yue4_H"),
"N3": ("qing4_G", "yue4_M"), "N4": ("qing3_Y", "shuo1_Y"),
"N5": ("yang2_W", "xing1_S"), "N6": ("xiang2_Y", "xing1_S"),
"N7": ("yang2_W", "tuo1_M"), "N8": ("qing1_W", "tuo1_M"),
}
CUT = 0.35
def parse(syl):
tone, body = syl[-1], syl[:-1]
for ini in INITIALS:
if body.startswith(ini) and len(body) > len(ini):
return ini, body[len(ini):], tone
return "", body, tone
def part(a, b, near):
if a == b:
return 0.0
return 0.5 if frozenset((a, b)) in near else 1.0
def sdist(a, b):
ia, fa, ta = parse(a.split("_")[0])
ib, fb, tb = parse(b.split("_")[0])
return math.fsum([0.45 * part(ia, ib, NEAR_I),
0.40 * part(fa, fb, NEAR_F),
0.15 * (0.0 if ta == tb else 1.0)])
def gdist(a, b):
if a == b:
return 0.0
sa, sb = set(CHARS[a]), set(CHARS[b])
return 1.0 - len(sa & sb) / len(sa | sb)
def seq(a, b, cost):
prev = [float(j) for j in range(len(b) + 1)]
for i, x in enumerate(a, 1):
cur = [float(i)]
for j, y in enumerate(b, 1):
cur.append(min(prev[j] + 1.0, cur[j - 1] + 1.0,
prev[j - 1] + cost(x, y)))
prev = cur
return prev[-1] / max(len(a), len(b))
if __name__ == "__main__":
cells = {(g, s): 0 for g in (0, 1) for s in (0, 1)}
print("pair graphic sound cell")
for a, b in combinations(sorted(NAMES), 2):
g = seq(NAMES[a], NAMES[b], gdist)
s = seq(NAMES[a], NAMES[b], sdist)
key = (int(g <= CUT), int(s <= CUT))
cells[key] += 1
if key[0] != key[1]:
print("{}-{} {:7.3f} {:6.3f} {}".format(
a, b, g, s, "near in shape only" if key[0]
else "near in sound only"))
print("all pairs {}; cut {} on both axes".format(
len(list(combinations(NAMES, 2))), CUT))
print("near in both {} shape only {} sound only {} neither {}"
.format(cells[(1, 1)], cells[(1, 0)], cells[(0, 1)],
cells[(0, 0)]))Single source and citation
Fan, Y. (2026). Phonetic, Graphic and Semantic Distance between Trademarks: Pre-Screening Brand-Name Collisions from Fanqie Spellings to Sound Codes (Version 1.0.0), Chapter 4: Component Distance: a Table of Look-Alike Characters and Unicode Normalisation. 5D Library. DOI pending
DOI pending · monograph page goes live after publication · 5DL-B-317 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026317,
author = {Fan, Yafu},
title = {Phonetic, Graphic and Semantic Distance between Trademarks: Pre-Screening Brand-Name Collisions from Fanqie Spellings to Sound Codes},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
note = {DOI pending}
}Other chapter answers in this book
- Chapter 1 · Far in Spelling, Near in Sound: Edit Distance, Sound Skeletons and the Channels of Confusion
- Chapter 2 · Soundex: a Century-Old Sound Code, Too Wide and Too Narrow
- Chapter 3 · Initial, Final and Tone: a Distance for Chinese Syllables and Homophones across Languages
- Chapter 5 · Meaning and a Three-Way Score: How a Weighted Mean Dilutes a One-Dimension Collision
- Chapter 6 · ROC Curves and Thresholds: Making the Pre-Screen a Calibrated Classifier
- Chapter 7 · East and West in the Sources: the Preface to the Qieyun and Russell's Patent of 1918
- Chapter 8 · A Pre-Screening Loop for New Brand Names, and a Plan to Refute the Book