vietnamese-name-generator 0.9.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +201 -121
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +107 -1
- package/dist/index.d.ts +107 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -9,13 +9,16 @@ The most comprehensive Vietnamese name toolkit for JavaScript/TypeScript. Genera
|
|
|
9
9
|
|
|
10
10
|
Zero runtime dependencies. Ships as CJS + ESM with full TypeScript declarations.
|
|
11
11
|
|
|
12
|
+
> **Disclaimer:** This library generates fictional data for testing, development, and educational purposes only. Do not use generated data for identity fraud, impersonation, phishing, social engineering, or any activity that violates applicable laws. Generated names are synthetic and any resemblance to real individuals is coincidental. The authors bear no responsibility for misuse.
|
|
13
|
+
|
|
12
14
|
## Why this library?
|
|
13
15
|
|
|
14
16
|
- **No npm alternative** for Vietnamese name parsing, gender detection, or validation
|
|
15
|
-
- **Census-weighted** surname distribution (
|
|
16
|
-
- **Culturally correct**
|
|
17
|
-
- **i18n-ready**
|
|
18
|
-
- **
|
|
17
|
+
- **Census-weighted** surname distribution (Nguyễn ~40%, Trần ~11%, Lê ~9%...)
|
|
18
|
+
- **Culturally correct** -- regional variants (Hoang/Huynh), gender-encoded middle names, proper honorifics
|
|
19
|
+
- **i18n-ready** -- NFC normalization, accent-insensitive search, Vietnamese sort order
|
|
20
|
+
- **Cultural depth** -- Five Elements (Ngu Hanh), Han Viet characters, protective nicknames, pet names
|
|
21
|
+
- **AI/testing-friendly** -- deterministic seed, batch generation, CSV/JSON export
|
|
19
22
|
|
|
20
23
|
## Installation
|
|
21
24
|
|
|
@@ -34,13 +37,15 @@ import {
|
|
|
34
37
|
detectGender,
|
|
35
38
|
salutation,
|
|
36
39
|
romanize,
|
|
40
|
+
getHanViet,
|
|
41
|
+
getBirthYearElement,
|
|
42
|
+
generatePetName,
|
|
43
|
+
generateNickname,
|
|
37
44
|
} from 'vietnamese-name-generator';
|
|
38
45
|
|
|
39
46
|
// Generate a realistic Vietnamese name
|
|
40
47
|
const name = generate({ seed: 42 });
|
|
41
|
-
// { surname: 'Phan', middleName: 'Ngoc', givenName: 'Kim Trang',
|
|
42
|
-
// fullName: 'Phan Ngoc Kim Trang', gender: 'female', region: 'central',
|
|
43
|
-
// era: 'modern', romanized: {...}, formatted: {...} }
|
|
48
|
+
// { surname: 'Phan', middleName: 'Ngoc', givenName: 'Kim Trang', ... }
|
|
44
49
|
|
|
45
50
|
// Parse any Vietnamese name into structured parts
|
|
46
51
|
parseName('Nguyen Van An');
|
|
@@ -48,15 +53,27 @@ parseName('Nguyen Van An');
|
|
|
48
53
|
|
|
49
54
|
// Detect gender from name
|
|
50
55
|
detectGender('Nguyen Thi Mai');
|
|
51
|
-
// { gender: 'female', confidence: 'high'
|
|
56
|
+
// { gender: 'female', confidence: 'high' }
|
|
52
57
|
|
|
53
|
-
//
|
|
58
|
+
// Culturally correct salutation ("Ong Nam", not "Mr. Nguyen")
|
|
54
59
|
salutation('Nguyen Van Nam', { formality: 'formal' });
|
|
55
60
|
// { honorific: 'Ong', addressName: 'Nam', fullSalutation: 'Kinh gui Ong Nam' }
|
|
56
61
|
|
|
57
|
-
//
|
|
58
|
-
|
|
59
|
-
// '
|
|
62
|
+
// Han Viet character lookup
|
|
63
|
+
getHanViet('Minh');
|
|
64
|
+
// { character: '明', meaning: 'bright/intelligent', alternates: [{character: '銘', meaning: 'inscribe'}] }
|
|
65
|
+
|
|
66
|
+
// Five Elements from birth year
|
|
67
|
+
getBirthYearElement(1990);
|
|
68
|
+
// 'kim' (Metal)
|
|
69
|
+
|
|
70
|
+
// Vietnamese pet name
|
|
71
|
+
generatePetName({ category: 'byFood' });
|
|
72
|
+
// { name: 'Pho', meaning: 'pho noodle soup', category: 'byFood' }
|
|
73
|
+
|
|
74
|
+
// Protective baby nickname (ten xau de nuoi)
|
|
75
|
+
generateNickname({ category: 'animal' });
|
|
76
|
+
// { nickname: 'Coc', meaning: 'toad', culturalNote: '...' }
|
|
60
77
|
```
|
|
61
78
|
|
|
62
79
|
## CLI
|
|
@@ -66,7 +83,7 @@ romanize('Nguyen Van An');
|
|
|
66
83
|
npx vietnamese-name-generator --count 10 --gender female --region south
|
|
67
84
|
npx vietnamese-name-generator --seed 42 --format slug --json
|
|
68
85
|
|
|
69
|
-
# Parse, validate, detect
|
|
86
|
+
# Parse, validate, detect gender
|
|
70
87
|
npx vietnamese-name-generator --parse "Nguyen Van An"
|
|
71
88
|
npx vietnamese-name-generator --validate "Nguyen Van An"
|
|
72
89
|
npx vietnamese-name-generator --detect "Nguyen Thi Mai"
|
|
@@ -88,66 +105,24 @@ npx vietnamese-name-generator --export json --count 50
|
|
|
88
105
|
| `generateManyFullNames(count, options?)` | `string[]` | Batch full name strings |
|
|
89
106
|
| `generateEmail(options?)` | `IEmailResult` | Email from generated name |
|
|
90
107
|
| `generateUsername(options?)` | `IUsernameResult` | Username from generated name |
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
```typescript
|
|
95
|
-
type TGenerateOptions = {
|
|
96
|
-
gender?: EGender; // 'male' | 'female' | 'unisex'
|
|
97
|
-
region?: ERegion; // 'north' | 'central' | 'south'
|
|
98
|
-
era?: EEra; // 'traditional' | 'modern'
|
|
99
|
-
compoundName?: boolean; // two-syllable given name
|
|
100
|
-
meaningCategory?: EMeaningCategory; // 9 semantic categories
|
|
101
|
-
withMiddleName?: boolean; // default: true
|
|
102
|
-
seed?: number; // deterministic output
|
|
103
|
-
format?: ENameFormat | ENameFormat[]; // output formats
|
|
104
|
-
};
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
#### Result
|
|
108
|
-
|
|
109
|
-
```typescript
|
|
110
|
-
interface INameResult {
|
|
111
|
-
surname: string;
|
|
112
|
-
middleName: string;
|
|
113
|
-
givenName: string;
|
|
114
|
-
fullName: string;
|
|
115
|
-
gender: EGender;
|
|
116
|
-
region: ERegion;
|
|
117
|
-
era: EEra;
|
|
118
|
-
romanized: IRomanizedName; // ASCII versions of all parts
|
|
119
|
-
formatted: Partial<Record<ENameFormat, string>>; // requested formats
|
|
120
|
-
}
|
|
121
|
-
```
|
|
108
|
+
| `generateNickname(options?)` | `INicknameResult` | Traditional protective nickname |
|
|
109
|
+
| `generatePetName(options?)` | `IPetNameResult` | Vietnamese pet name |
|
|
110
|
+
| `generateManyPetNames(count, options?)` | `IPetNameResult[]` | Batch pet names |
|
|
122
111
|
|
|
123
112
|
### Parsing & Validation
|
|
124
113
|
|
|
125
114
|
| Function | Returns | Description |
|
|
126
115
|
|----------|---------|-------------|
|
|
127
116
|
| `parseName(input)` | `IParsedName` | Split full name into surname/middle/given |
|
|
128
|
-
| `validateName(input)` | `IValidationResult` |
|
|
117
|
+
| `validateName(input)` | `IValidationResult` | Validate Vietnamese name with specific failure reasons |
|
|
129
118
|
| `detectGender(input)` | `IGenderResult` | Infer gender from middle + given name signals |
|
|
130
119
|
|
|
131
|
-
```typescript
|
|
132
|
-
// Parse — handles compound surnames (Ton That), romanized input (Nguyen)
|
|
133
|
-
parseName('Ton That Minh An');
|
|
134
|
-
// { surname: 'Ton That', middleName: 'Minh', givenName: 'An' }
|
|
135
|
-
|
|
136
|
-
// Validate — returns specific failure reasons
|
|
137
|
-
validateName('xyz van an');
|
|
138
|
-
// { valid: false, reasons: ['Each part must start with uppercase', 'Unknown surname: xyz'] }
|
|
139
|
-
|
|
140
|
-
// Detect gender — confidence levels based on signal strength
|
|
141
|
-
detectGender('Tran Van An');
|
|
142
|
-
// { gender: 'male', confidence: 'high', signals: { middleName: { gender: 'male', value: 'Van' } } }
|
|
143
|
-
```
|
|
144
|
-
|
|
145
120
|
### Formatting & i18n
|
|
146
121
|
|
|
147
122
|
| Function | Returns | Description |
|
|
148
123
|
|----------|---------|-------------|
|
|
149
124
|
| `romanize(input)` | `string` | Remove Vietnamese diacritics |
|
|
150
|
-
| `formatName(parts, format)` | `string` | Format
|
|
125
|
+
| `formatName(parts, format)` | `string` | Format as full/abbreviated/reversed/slug |
|
|
151
126
|
| `salutation(name, options?)` | `ISalutationResult` | Culturally correct Vietnamese honorific |
|
|
152
127
|
| `normalize(input)` | `string` | NFC Unicode normalization |
|
|
153
128
|
| `accentInsensitiveMatch(text, query)` | `boolean` | Search ignoring diacritics |
|
|
@@ -156,66 +131,34 @@ detectGender('Tran Van An');
|
|
|
156
131
|
| `vietnameseNameComparator(options?)` | `Function` | Comparator for `Array.sort()` |
|
|
157
132
|
| `VIETNAMESE_NAME_REGEX` | `RegExp` | Validates Vietnamese characters |
|
|
158
133
|
|
|
159
|
-
|
|
160
|
-
// Format — 4 built-in formats, request multiple at once
|
|
161
|
-
generate({ format: ['full', 'slug', 'abbreviated'] });
|
|
162
|
-
// result.formatted = { full: 'Nguyen Van An', slug: 'nguyen-van-an', abbreviated: 'N.V. An' }
|
|
163
|
-
|
|
164
|
-
// Salutation — "Ong Nam" not "Mr. Nguyen"
|
|
165
|
-
salutation('Nguyen Van Nam', { formality: 'formal' });
|
|
166
|
-
// { honorific: 'Ong', addressName: 'Nam', fullSalutation: 'Kinh gui Ong Nam' }
|
|
167
|
-
|
|
168
|
-
// Accent-insensitive search
|
|
169
|
-
accentInsensitiveMatch('Nguyen Van An', 'nguyen'); // true
|
|
170
|
-
|
|
171
|
-
// Sort by given name (Vietnamese convention)
|
|
172
|
-
sortVietnamese(['Tran Thi Binh', 'Nguyen Van An']);
|
|
173
|
-
// ['Nguyen Van An', 'Tran Thi Binh'] (An < Binh)
|
|
174
|
-
```
|
|
175
|
-
|
|
176
|
-
### Data & Lookup
|
|
134
|
+
### Cultural Data
|
|
177
135
|
|
|
178
136
|
| Function | Returns | Description |
|
|
179
137
|
|----------|---------|-------------|
|
|
138
|
+
| `getHanViet(name)` | `THanVietEntry \| null` | Chinese character origin + meaning |
|
|
139
|
+
| `getElementInfo(element)` | `IElementInfo` | Five Elements relationships |
|
|
140
|
+
| `getNameElement(name)` | `EElement \| null` | Which element a name belongs to |
|
|
141
|
+
| `getNamesByElement(element, options?)` | `string[]` | Names belonging to an element |
|
|
142
|
+
| `getBirthYearElement(year)` | `EElement` | Element from Heavenly Stems cycle |
|
|
180
143
|
| `getMeaning(name)` | `INameMeaning` | Meaning category, gender/region/era distribution |
|
|
181
144
|
| `getSurnameInfo(surname)` | `ISurnameInfo` | Frequency, rank, regional variants |
|
|
182
145
|
| `getRegionalVariant(surname, region)` | `string` | Convert Hoang<->Huynh, Vu<->Vo |
|
|
183
|
-
| `nameSimilarity(name1, name2)` | `ISimilarityResult` | Compare names
|
|
146
|
+
| `nameSimilarity(name1, name2)` | `ISimilarityResult` | Compare names with diacritics/variant tolerance |
|
|
184
147
|
| `getStatistics()` | `IStatisticsResult` | Dataset overview counts |
|
|
185
148
|
| `getTopSurnames(options?)` | `IRankedName[]` | Top N surnames by frequency |
|
|
186
|
-
| `getGivenNameCount(options?)` | `number` | Count given names by gender/region/era |
|
|
187
|
-
| `getUniqueGivenNames(options?)` | `string[]` | List unique given names |
|
|
188
|
-
|
|
189
|
-
```typescript
|
|
190
|
-
// Name meaning
|
|
191
|
-
getMeaning('Hung');
|
|
192
|
-
// { found: true, category: 'strength', genders: ['male'], regions: ['north','central','south'], ... }
|
|
193
|
-
|
|
194
|
-
// Surname info
|
|
195
|
-
getSurnameInfo('Nguyen');
|
|
196
|
-
// { found: true, frequency: { north: 31.5, central: 30.2, south: 28.5 }, rank: { north: 1, ... } }
|
|
197
|
-
|
|
198
|
-
// Regional variant
|
|
199
|
-
getRegionalVariant('Hoang', 'south'); // 'Huynh'
|
|
200
|
-
getRegionalVariant('Vo', 'north'); // 'Vu'
|
|
201
|
-
|
|
202
|
-
// Name similarity (handles diacritics, variants)
|
|
203
|
-
nameSimilarity('Nguyen Van An', 'Nguyen Van An');
|
|
204
|
-
// { score: 0.9, romanizedMatch: true, ... }
|
|
205
|
-
```
|
|
206
149
|
|
|
207
150
|
### Faker.js Compatible
|
|
208
151
|
|
|
209
152
|
```typescript
|
|
210
153
|
import { fakerVi } from 'vietnamese-name-generator';
|
|
211
154
|
|
|
212
|
-
fakerVi.person.firstName();
|
|
213
|
-
fakerVi.person.lastName();
|
|
214
|
-
fakerVi.person.fullName();
|
|
215
|
-
fakerVi.person.sex();
|
|
216
|
-
fakerVi.person.prefix('female');
|
|
217
|
-
fakerVi.internet.email();
|
|
218
|
-
fakerVi.internet.username();
|
|
155
|
+
fakerVi.person.firstName(); // 'An'
|
|
156
|
+
fakerVi.person.lastName(); // 'Nguyen'
|
|
157
|
+
fakerVi.person.fullName(); // 'Nguyen Van An'
|
|
158
|
+
fakerVi.person.sex(); // 'male'
|
|
159
|
+
fakerVi.person.prefix('female'); // 'Ba'
|
|
160
|
+
fakerVi.internet.email(); // 'an.nguyen@gmail.com'
|
|
161
|
+
fakerVi.internet.username(); // 'annguyen'
|
|
219
162
|
```
|
|
220
163
|
|
|
221
164
|
### Enums
|
|
@@ -227,31 +170,168 @@ fakerVi.internet.username(); // 'annguyen'
|
|
|
227
170
|
| `EEra` | `traditional`, `modern` |
|
|
228
171
|
| `EMeaningCategory` | `strength`, `virtue`, `nature`, `precious`, `beauty`, `celestial`, `season`, `intellect`, `prosperity` |
|
|
229
172
|
| `ENameFormat` | `full`, `abbreviated`, `reversed`, `slug` |
|
|
173
|
+
| `EElement` | `kim` (Metal), `moc` (Wood), `thuy` (Water), `hoa` (Fire), `tho` (Earth) |
|
|
230
174
|
|
|
231
|
-
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
## Vietnamese Naming Culture
|
|
232
178
|
|
|
233
|
-
|
|
179
|
+
### Name Structure
|
|
234
180
|
|
|
235
|
-
-
|
|
236
|
-
- faker-vi (Vietnamese faker library)
|
|
237
|
-
- Wiktionary Vietnamese entries
|
|
238
|
-
- Wikipedia Vietnamese surname pages
|
|
239
|
-
- [surnam.es](https://surnam.es) genealogy database
|
|
240
|
-
- DrPapie Vietnamese name database
|
|
181
|
+
Vietnamese names follow **surname - middle name - given name** order, the reverse of Western convention. In daily life, people are addressed by their **given name** (the last word), not their surname.
|
|
241
182
|
|
|
242
|
-
|
|
183
|
+
| Part | Vietnamese | Example | Role |
|
|
184
|
+
|------|-----------|---------|------|
|
|
185
|
+
| Surname (Họ) | Họ | Nguyễn | Family lineage |
|
|
186
|
+
| Middle name (Tên đệm) | Tên đệm / Tên lót | Văn, Thị | Gender marker, generational marker |
|
|
187
|
+
| Given name (Tên) | Tên gọi | An, Mai | Personal identity -- this is "the name" |
|
|
243
188
|
|
|
244
|
-
|
|
189
|
+
### Why ~40% of Vietnam is Named Nguyễn
|
|
245
190
|
|
|
246
|
-
Vietnamese
|
|
191
|
+
Vietnamese surname concentration is extreme by world standards. Approximately 38-40% of the population carries the surname Nguyễn ([Atlas Obscura](https://www.atlasobscura.com/articles/pronounce-nguyen-common-vietnam), [Wikipedia](https://en.wikipedia.org/wiki/Nguyen)), a direct consequence of **forced surname changes during dynasty transitions** ([Nguyễn, V.K., 2024, *Genealogy*](https://www.mdpi.com/2313-5778/8/1/16)):
|
|
247
192
|
|
|
248
|
-
**
|
|
193
|
+
- **1232 (Lý -> Trần):** The Trần dynasty forced Lý families to change their surname to avoid the former emperor's name (kỵ húy), pushing many to adopt Nguyễn
|
|
194
|
+
- **1400-1407 (Trần -> Hồ):** Hồ Quý Ly seized power from the Trần dynasty in 1400; when the Hồ dynasty fell in 1407, Hồ descendants changed to Nguyễn for safety
|
|
195
|
+
- **1592 (Mạc -> Lê restoration):** Mạc families adopted Nguyễn to avoid persecution
|
|
196
|
+
- **1802 (Nguyễn dynasty):** The Nguyễn lords unified Vietnam; many adopted the ruling surname for favor or protection
|
|
249
197
|
|
|
250
|
-
|
|
198
|
+
The top 14 Vietnamese surnames cover **90%+** of the population ([Wikipedia: Vietnamese name](https://en.wikipedia.org/wiki/Vietnamese_name)): Nguyễn (~38-40%), Trần (~11%), Lê (~9.5%), Phạm (~7.1%), Hoàng/Huỳnh (~5.1%), Vũ/Võ (~3.9%)...
|
|
251
199
|
|
|
252
|
-
|
|
200
|
+
### The Middle Name Encodes Gender
|
|
253
201
|
|
|
254
|
-
|
|
202
|
+
The middle name (ten dem/ten lot) has traditionally served as a **gender marker** ([Vietcetera: Why "Van" and "Thi" are popular](https://vietcetera.com/en/why-are-middle-names-van-and-thi-popular-in-vietnam)):
|
|
203
|
+
|
|
204
|
+
- **Văn** (文, literature) -- marks male names. Usage declining in modern naming
|
|
205
|
+
- **Thị** (氏, clan) -- marks female names. Usage declining in modern naming
|
|
206
|
+
- **Modern alternatives:** Minh, Gia, Bảo, Đức (male); Ngọc, Khánh, Bảo (female); An, Minh (unisex)
|
|
207
|
+
|
|
208
|
+
Middle names also function as **generation markers** ([Wikipedia: Generation name](https://en.wikipedia.org/wiki/Generation_name)) -- siblings and cousins of the same generation share the same middle name, enabling family tree identification.
|
|
209
|
+
|
|
210
|
+
### Regional Surname Variants
|
|
211
|
+
|
|
212
|
+
The same Chinese character is read differently by regional dialect ([Cultural Atlas: Vietnamese Naming](https://culturalatlas.sbs.com.au/vietnamese-culture/vietnamese-culture-naming)):
|
|
213
|
+
|
|
214
|
+
| North | South | Chinese Origin |
|
|
215
|
+
|-------|-------|---------------|
|
|
216
|
+
| Hoàng | Huỳnh | 黄 (yellow) |
|
|
217
|
+
| Vũ | Võ | 武 (martial) |
|
|
218
|
+
|
|
219
|
+
These splits originate from the kỵ húy (naming taboo) laws of the Nguyễn Lords ([Wikipedia: Vietnamese name](https://en.wikipedia.org/wiki/Vietnamese_name)), where the imperial name could not be spoken and regional pronunciations diverged permanently.
|
|
220
|
+
|
|
221
|
+
### Sino-Vietnamese (Han Viet) Origins
|
|
222
|
+
|
|
223
|
+
Nearly all Vietnamese given names derive from Chinese characters (Han tu), read in Sino-Vietnamese pronunciation. A single romanized name can map to multiple characters with different meanings:
|
|
224
|
+
|
|
225
|
+
| Name | Character | Meaning | Alternate | Meaning |
|
|
226
|
+
|------|-----------|---------|-----------|---------|
|
|
227
|
+
| Minh | 明 | Bright/intelligent | 銘 | Inscribe/remember |
|
|
228
|
+
| An | 安 | Peace | 晏 | Calm |
|
|
229
|
+
| Thanh | 清 | Pure | 青 | Blue/green |
|
|
230
|
+
| Long | 龍 | Dragon | 隆 | Prosperous |
|
|
231
|
+
|
|
232
|
+
This library includes Han Viet character data for 80+ common names via `getHanViet()`.
|
|
233
|
+
|
|
234
|
+
### Five Elements (Ngũ Hành) Naming
|
|
235
|
+
|
|
236
|
+
Vietnamese parents traditionally choose names based on the **Five Elements** ([Feng Shui Master Academy: Baby Names Using Bazi](https://fengshuimasteryacademy.com/how-to-choose-chinese-baby-names-using-bazi-analysis/)) to balance a child's destiny:
|
|
237
|
+
|
|
238
|
+
| Element | Vietnamese | Chinese | Associated Names |
|
|
239
|
+
|---------|-----------|---------|-----------------|
|
|
240
|
+
| Metal | Kim | 金 | Kim, Ngân, Bảo, Châu |
|
|
241
|
+
| Wood | Mộc | 木 | Lâm, Phong, Xuân, Trúc, Mai |
|
|
242
|
+
| Water | Thủy | 水 | Thủy, Hà, Hải, Giang, Linh |
|
|
243
|
+
| Fire | Hỏa | 火 | Quang, Huy, Minh, Hồng |
|
|
244
|
+
| Earth | Thổ | 土 | Sơn, Bình, An, Thành, Long |
|
|
245
|
+
|
|
246
|
+
The birth year determines the child's element via the **Heavenly Stems (Thiên Can)** cycle. Parents select names from the **generating element** (tương sinh) to support the child's destiny.
|
|
247
|
+
|
|
248
|
+
### Name Taboos (Kỵ Húy)
|
|
249
|
+
|
|
250
|
+
Under feudal dynasties, using the emperor's personal name or a near-homophone was forbidden ([Wikipedia: Naming taboo](https://en.wikipedia.org/wiki/Naming_taboo#Vietnam)). This practice permanently altered the Vietnamese name pool:
|
|
251
|
+
|
|
252
|
+
- Emperor's name banned -> families respelled similar names
|
|
253
|
+
- Children were never named after living parents or grandparents
|
|
254
|
+
- Some families gave babies **"ugly names" (tên xấu để nuôi)** -- Cóc (toad), Tý (mouse), Chí (louse) -- to deceive evil spirits who might harm a beautiful child
|
|
255
|
+
|
|
256
|
+
This library includes a protective nickname generator (`generateNickname()`) honoring this tradition.
|
|
257
|
+
|
|
258
|
+
### Compound Names (Tên Kép)
|
|
259
|
+
|
|
260
|
+
Two-syllable given names like Bảo Châu, Minh Khôi, or Thanh Hà became popular from the late 20th century. With so few surnames in circulation, compound names reduce ambiguity while adding poetic meaning. Modern compound names often combine two auspicious characters.
|
|
261
|
+
|
|
262
|
+
### Pet Naming Culture
|
|
263
|
+
|
|
264
|
+
Vietnamese pet naming is a rich cultural practice ([PetMart.vn](https://www.petmart.vn/dat-ten-cho-cho-bang-tieng-viet)):
|
|
265
|
+
|
|
266
|
+
- **By appearance**: Vàng (gold), Mực (ink), Bông (cotton), Đốm (spotted) ([PetChoice.vn](https://petchoice.vn/blogs/news/dat-ten-meo-theo-mau-long))
|
|
267
|
+
- **By food**: Phở, Bún, Bánh Mì, Xôi -- a uniquely Vietnamese trend
|
|
268
|
+
- **By luck**: Tài (wealth), Lộc (fortune), Phúc (blessing) -- feng shui influence
|
|
269
|
+
- **By humor**: Đại Ca (big boss for tiny dogs), Cậu Vàng (Mr. Gold, from Nam Cao's literary classic "Lão Hạc", 1943)
|
|
270
|
+
- **Modern trends**: anime names (Luna, Totoro), K-drama influence, English names
|
|
271
|
+
|
|
272
|
+
This library includes 150+ pet names across 7 categories via `generatePetName()`.
|
|
273
|
+
|
|
274
|
+
---
|
|
275
|
+
|
|
276
|
+
## Data Sources
|
|
277
|
+
|
|
278
|
+
### Name Data (Crawl Pipeline)
|
|
279
|
+
|
|
280
|
+
Names are collected from 6 web sources via an automated crawl pipeline, then merged, deduplicated, tagged, and validated:
|
|
281
|
+
|
|
282
|
+
| Source | Type | URL |
|
|
283
|
+
|--------|------|-----|
|
|
284
|
+
| Vietnamese Name DB | 6,284 given names by gender | [github.com/duyet/vietnamese-namedb](https://github.com/duyet/vietnamese-namedb) |
|
|
285
|
+
| faker-vi | Vietnamese faker library data | Internal extraction |
|
|
286
|
+
| Wiktionary | Vietnamese name entries with etymology | [en.wiktionary.org](https://en.wiktionary.org) |
|
|
287
|
+
| Wikipedia | Vietnamese surname pages | [en.wikipedia.org/wiki/Vietnamese_name](https://en.wikipedia.org/wiki/Vietnamese_name) |
|
|
288
|
+
| surnam.es | Genealogy surname database | [surnam.es](https://surnam.es) |
|
|
289
|
+
| DrPapie | Vietnamese baby names with meanings | [drpapie.com](https://drpapie.com) |
|
|
290
|
+
|
|
291
|
+
### Cultural Data
|
|
292
|
+
|
|
293
|
+
| Data | Source |
|
|
294
|
+
|------|--------|
|
|
295
|
+
| Han Viet characters | Sino-Vietnamese dictionaries, [hvdic.thivien.net](https://hvdic.thivien.net) |
|
|
296
|
+
| Five Elements | Traditional Vietnamese metaphysics, feng shui references |
|
|
297
|
+
| Surname frequency | Vietnamese census data, demographic studies |
|
|
298
|
+
| Regional variants | [MDPI: Onomastic Account of Vietnamese Surnames](https://www.mdpi.com/2313-5778/8/1/16) |
|
|
299
|
+
| Gender detection | [ArXiv: Gender Prediction Based on Vietnamese Names](https://arxiv.org/abs/2010.10852) |
|
|
300
|
+
| Naming taboos | [Wikipedia: Vietnamese name](https://en.wikipedia.org/wiki/Vietnamese_name), historical dynasty records |
|
|
301
|
+
|
|
302
|
+
### Pet Name Data
|
|
303
|
+
|
|
304
|
+
| Source | Coverage |
|
|
305
|
+
|--------|----------|
|
|
306
|
+
| [PetMart.vn](https://www.petmart.vn) | 8 naming categories, feng shui names |
|
|
307
|
+
| [PetChoice.vn](https://petchoice.vn) | Names by fur color |
|
|
308
|
+
| [CatHouse.vn](https://cathouse.vn) | 500+ cat names |
|
|
309
|
+
| [PetPress.net](https://petpress.net/vietnamese-dog-names/) | 60 Vietnamese dog names with English meanings |
|
|
310
|
+
| [WeReAllAboutPets.com](https://wereallaboutpets.com/pet-names/dog/vietnamese) | 90 names with meanings |
|
|
311
|
+
|
|
312
|
+
### Academic References
|
|
313
|
+
|
|
314
|
+
- Nguyen, V.K. (2024). "Toward an Onomastic Account of Vietnamese Surnames." *Genealogy*, 8(1), 16. [doi:10.3390/genealogy8010016](https://www.mdpi.com/2313-5778/8/1/16)
|
|
315
|
+
- To, H.Q., Nguyen, K.V., Nguyen, N.L.T., Nguyen, A.G.T. (2020). "Gender Prediction Based on Vietnamese Names with Machine Learning Techniques." *ArXiv*. [arxiv.org/abs/2010.10852](https://arxiv.org/abs/2010.10852)
|
|
316
|
+
- Cultural Atlas. "Vietnamese Culture - Naming." [culturalatlas.sbs.com.au](https://culturalatlas.sbs.com.au/vietnamese-culture/vietnamese-culture-naming)
|
|
317
|
+
|
|
318
|
+
---
|
|
319
|
+
|
|
320
|
+
## Disclaimer
|
|
321
|
+
|
|
322
|
+
This library is intended for:
|
|
323
|
+
- Software testing and development (mock data, seed databases, unit tests)
|
|
324
|
+
- Educational purposes (learning about Vietnamese naming culture)
|
|
325
|
+
- Creative applications (fiction writing, game character generation)
|
|
326
|
+
- i18n development (building applications that correctly handle Vietnamese names)
|
|
327
|
+
|
|
328
|
+
**This library must NOT be used for:**
|
|
329
|
+
- Identity fraud or impersonation
|
|
330
|
+
- Phishing, social engineering, or scam operations
|
|
331
|
+
- Creating fake accounts on platforms that prohibit synthetic identities
|
|
332
|
+
- Any activity that violates applicable laws in your jurisdiction
|
|
333
|
+
|
|
334
|
+
All generated data is synthetic. The authors provide this tool in good faith and bear no responsibility for misuse.
|
|
255
335
|
|
|
256
336
|
## License
|
|
257
337
|
|