Repository navigation
Name Lists and Data Sources
Every name comes from a public list embedded in the assembly as a text resource: one entry per line, UTF-8, LF line endings. Nothing is downloaded at run time. Frequencies were stripped, so every entry on a list is equally likely.
| List | Entries | Size | Source | First entry |
|---|---|---|---|---|
| Male first names | 1,219 | 8 KB | 1990 US Census name frequency file dist.male.first
|
James |
| Female first names | 4,275 | 30 KB | 1990 US Census dist.female.first
|
Mary |
| Last names | 88,799 | 695 KB | 1990 US Census dist.all.last
|
Smith |
| Place names | 16,969 | 182 KB | Census 2000 places file places2k.txt
|
Abbeville |
| Proper star names | 640 | 5 KB | IAU Catalog of Star Names (IAU Working Group on Star Names), read from exopla.net on 2026-09-27 | Absolutno |
| Designated star names | 3,076 | 41 KB | Bayer and Flamsteed names in the Yale Bright Star Catalogue, 5th edition (VizieR V/50) | 1 Aquarii |
| Catalogue star names | 343,518 | 15 KB | Henry Draper catalogue, HD 1 to HD 225300; Hipparcos catalogue (VizieR I/239), 118,218 stars |
The 1990 Census files list each name with its frequency, cumulative frequency and rank, most common first. The embedded lists keep that order (Smith, James, Mary lead their lists) with the numbers removed and the names converted to Title case ASCII. 331 first names appear on both the male and the female list because the Census recorded them for both. With the frequencies gone, Smith and the rarest surname are equally likely, which is why generated names often look unusual.
places2k.txt has one row per place per state, with the state and a classification word after the name: Georgetown city, Newtown CDP, Bayamón zona urbana. The list keeps the name and drops the state and the classification word. The Puerto Rico wording (zona urbana, comunidad) stays. Each distinct name is listed once, so Franklin (found in many states) is exactly as likely as a name found in one. 6,394 names contain a space and 52 carry accents, such as Mayagüez zona urbana.
The list has a history. Until 2.2.0 it came from a 2014 tool that cut a name at the first occurrence of "town", "city", "CDP", "village", "municipality", "borough" or "(balance)" anywhere in it. Georgetown was listed as George, Hagerstown as Hagers and Felicity as Feli. 150 entries were not place names and 246 real names were missing. 2.1.0 fixed 49 Puerto Rico names that carried the U+FFFD replacement character and removed the duplicate rows (25,375 to 16,873), both by hand. 2.3.0 rebuilt the list from the Census file with tools/CensusTools: 16,969 names.
No package can hold every known star; Gaia alone catalogues about 1.8 billion. The star lists instead aim at every star a person would know or could look up.
- Proper names: the whole IAU-approved list, spelled as the IAU spells it, diacritics included (
Rosalíadecastro,Chasoň). - Designations: every Bayer and Flamsteed name in the Yale Bright Star Catalogue, which holds every naked-eye star, written out in full (
Gamma Piscis Austrini,Kappa¹ Sculptoris). A star with a Greek letter is listed by it rather than by its Flamsteed number, and a designation that is also an IAU name is listed once. Components use Unicode superscript digits, so the list hasAlpha¹ Centauriand no plainAlpha Centauri. - Catalogue designations: 343,518 stars without storing them. Henry Draper numbers run from 1 to 225,300 without gaps, so they are a constant in the code. Hipparcos numbers are stored as the 2,198 numbers the catalogue skips below its highest number, 120,416, which describes 118,218 stars in 15 KB.
GenerateRandomStarName draws from the proper names and the designations together (3,716 names), so a well-known name comes up about one draw in six. The catalogue has its own method because HD 107420 is a real star but not a recognisable one.
One download, the HYG database, would have covered all of this, but its licence is CC BY-SA, and share-alike data cannot sit inside an MIT package. The three primary sources were used instead.
The Census files are US government work in the public domain. The IAU star names are published under Creative Commons Attribution: keep the credit "IAU Catalog of Star Names, IAU Working Group on Star Names" if you redistribute the lists. The Bright Star and Hipparcos data came through VizieR (CDS, Strasbourg). The library itself is MIT.
tools/CensusTools, a console project in the repository and not part of the package, rebuilds the person and place lists from the Census files. tools/CensusTools/SOURCES.md lists the download address and SHA-256 of each source file; a rebuild from files with those hashes gives the embedded files byte for byte. tools/StarLists/build_star_lists.py downloads the three star sources and writes the three star resources. A changed list changes seeded output, so a rebuild is a release decision; see Development.
At 996 KB, the netstandard2.0 assembly is mostly lists: 977 KB for the seven of them, 695 KB of that the last names alone. The package downloads as 943 KB thanks to zip compression. The star data added about 61 KB to the assembly and about 45 KB to the package in 2.2.0.
This wiki describes RandomNameGeneratorLibrary 2.3.0 and was last updated on 2026-09-30. The library is MIT licensed. Report problems in the issues. On NuGet: RandomNameGeneratorLibrary.