<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: NameSoul</title>
    <description>The latest articles on DEV Community by NameSoul (@namesoul).</description>
    <link>https://dev.to/namesoul</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4267432%2F4bee2470-d1b7-43bd-85f9-36b808ef55c4.png</url>
      <title>DEV Community: NameSoul</title>
      <link>https://dev.to/namesoul</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/namesoul"/>
    <language>en</language>
    <item>
      <title>The hard part of naming someone in Chinese isn't the database. It's the pronunciation.</title>
      <dc:creator>NameSoul</dc:creator>
      <pubDate>Tue, 01 Dec 2026 12:33:39 +0000</pubDate>
      <link>https://dev.to/namesoul/the-hard-part-of-naming-someone-in-chinese-isnt-the-database-its-the-pronunciation-25dm</link>
      <guid>https://dev.to/namesoul/the-hard-part-of-naming-someone-in-chinese-isnt-the-database-its-the-pronunciation-25dm</guid>
      <description>&lt;p&gt;If you have ever built anything that handles Chinese names — transliteration, a search index, a nickname generator, a name picker — you will hit a wall that looks like a data problem and turns out to be a language problem.&lt;/p&gt;

&lt;p&gt;The data is the easy part. There are tens of thousands of characters. You have them. The trouble is that a character is a container with several independent variables inside it, and you have to resolve all of them at once or you will ship something that embarrasses you.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Variable one: tone.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The same character carries different meanings at different tones, and the tone is not decoration — it can change a syllable into a completely different word. 长 is cháng (long) and zhǎng (to grow, to be eldest). 重 is zhòng (heavy) and chóng (again). 乐 is lè (happy) and yuè (music). If your system stores only a character and a pinyin string without tones, you cannot even represent the ambiguity. You have to store the tone class as data, and you have to store it as a &lt;em&gt;choice&lt;/em&gt;, not a default.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Variable two: polyphones that depend on the name.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Some characters switch reading depending on the whole name they sit in. When you generate a name, the reading is not a property of the character you picked — it is a property of the character in context. 长 and 重 behave differently when they are the second syllable than when they are the first. This means the reading step cannot happen before the name is assembled, and it cannot be cached per character.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Variable three: the collision between the name and an existing word.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is the one that actually gets you. Two individually excellent characters can collide with a real word when spoken at normal speed. 范统 — 范 (model, exemplar) and 统 (unify, command) are both complimentary characters — is pronounced exactly like 饭桶, "rice bucket", which is an insult. Nothing about the characters is wrong. The name is wrong, and only in the mouth. The check has to be phonological, at normal speed, not visual and not dictionary-based.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Variable four: what foreigners cannot pronounce.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Now you are generating names for people who do not speak Chinese. Two sub-problems hide here. First, syllable structure: a Chinese syllable can end in a consonant cluster that English does not have, or begin with a sound English does not have. Second, and much harder, the reading is ambiguous to the speaker, so "here is how to pronounce it" is not one instruction — it is a small set of possible pronunciations, and the user will pick the wrong one. Every system that hands a non-native speaker a pinyin string with no tone marks hands them a coin flip.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Variable five: the character is not the meaning.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A single character carries a semantic field, not a definition. 力 is strength, but 力 in a name can mean determination, effort, or a role. If you generate a name by picking "characters that mean strength" you get 力强 — two words for one idea, spoken identically to liqiang, which is how you accidentally produce a name that is both meaningless and, in some contexts, unfortunate.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What this adds up to.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Any real system has to do at least four passes: candidate generation, context-dependent reading, phonological collision testing against an existing lexicon, and a practical-pronunciation pass that assumes the reader is a non-native speaker. The first pass is a search problem. The second is a grammar problem. The third is a phonetics problem. The fourth is a UX problem. Only the first one looks like programming.&lt;/p&gt;

&lt;p&gt;And the thing that surprised me most: the tests that catch the worst failures are cheap. A collision test against a frequency list of spoken bigrams finds more embarrassing names than any amount of character-count analysis. People do not mispronounce characters. They mispronounce names. The unit of failure is the name, not the character — and your tests should be built around the name.&lt;/p&gt;

</description>
      <category>programming</category>
      <category>unicode</category>
    </item>
  </channel>
</rss>
