{"id":22105059,"url":"https://github.com/tilotech/go-names","last_synced_at":"2025-03-24T02:44:20.907Z","repository":{"id":192576038,"uuid":"684531590","full_name":"tilotech/go-names","owner":"tilotech","description":null,"archived":false,"fork":false,"pushed_at":"2023-09-07T09:51:51.000Z","size":77,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-29T08:44:37.307Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tilotech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-08-29T10:25:02.000Z","updated_at":"2023-09-06T13:29:51.000Z","dependencies_parsed_at":"2023-09-05T03:08:32.318Z","dependency_job_id":"ccdf6569-84b0-4628-9baa-900fd9df51cf","html_url":"https://github.com/tilotech/go-names","commit_stats":null,"previous_names":["tilotech/go-names"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tilotech%2Fgo-names","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tilotech%2Fgo-names/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tilotech%2Fgo-names/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tilotech%2Fgo-names/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tilotech","download_url":"https://codeload.github.com/tilotech/go-names/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245200675,"owners_count":20576673,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-01T06:37:56.893Z","updated_at":"2025-03-24T02:44:20.888Z","avatar_url":"https://github.com/tilotech.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-names\n\ngo-names provides name lists for working with frequent names and nicknames.\n\nNames are not necessarily limited to personal names, like first and last names.\n\n## Common (Frequent Names)\n\nCommon provides lists for the most common names.\n\nTo get a list of the 10 most frequent first names, use it like this:\n\n```\nimport (\n  \"fmt\"\n  \"github.com/tilotech/go-names\"\n)\n\nfunc main() {\n  common, err := names.NewCommonPreset(\"US_FIRST_NAME\")\n  if err != nil {\n    panic(err)\n  }\n\n  top10 := common.Top(10)\n  fmt.Println(top10)\n}\n```\n\nThe common names comes with ready-to-use presets, but you can also provide your\nown using the `NewCommon` constructor.\n\n### US_FIRST_NAME and US_LAST_NAME Presets\n\nThose two presets are based on the publicly available\n[voters registry of North Carolina](https://www.ncsbe.gov/results-data/voter-registration-data)\nand represent the 5,000 most common first/middle and last names, as well as\ntheir relative frequency. E.g. the name `Michael` is the most popular name in\nthat source, with 1.33% of the entries having this as either their first or\nmiddle name.\n\n### US_CITY Preset\n\nThis preset provides the most common cities in the US (common as in population\nsize). Hence, the frequency is based on the population size of each city and the\ntotal US population size. The list is based on publicly available data.\n\n## Canonical (Base Name)\n\nUsing the canonical name it is possible to get a single representation of a name,\nindependent from different spellings or other effects such as aliases. Such a\ncanonical name can then be used e.g. in data matching. Depending on the used\ndata such a canonical name may not seem very intuitive.\n\n```\nimport (\n  \"fmt\"\n  \"github.com/tilotech/go-names\"\n)\n\nfunc main() {\n  canonical, err := names.NewCanonicalPreset(\"NICKNAMES\")\n  if err != nil {\n    panic(err)\n  }\n\n  name := canonical.Of(\"mickey\")\n  fmt.Println(name) // prints: \"michael\"\n}\n```\n\n### NICKNAMES Preset\n\nThe nicknames preset is based on various open source nickname lists, hand curated\nto represent the idea of a canonical name as good as possible. However, since\nnicknames can be assigned to various names, the canonical name may not make much\nsense in a few cases. E.g. the four entries `clement`, `clem`, `clementine` and\n`clemmie` are in the same canonical name group and all resolve to `clement`.\nOther examples are even more extreme, e.g. `lucy` resolves to `louisa`. Hence,\nthe preset follows a best guess approach and is far from perfect.\n\nNickname sources:\n* https://github.com/carltonnorthern/nicknames (Apache-2.0)\n* https://github.com/onyxrev/common_nickname_csv (data under Public Domain)\n* https://github.com/HaJongler/diminutives.db (data under Public Domain)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftilotech%2Fgo-names","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftilotech%2Fgo-names","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftilotech%2Fgo-names/lists"}