Add si_LK (Sinhala, Sri Lanka) person provider#2430
Open
RavinduPabasara wants to merge 1 commit into
Open
Conversation
Adds a person provider for the si_LK locale with 457 Sinhala first names (246 male, 211 female) and 40 common Sri Lankan surnames, all in Sinhala script. First name data comes from the MIT-licensed dataset at https://github.com/TharindaDilshan/predicting-gender-in-sinhala-names, normalized to NFC and deduplicated. Surnames were curated and verified by a native speaker. Prefixes are intentionally omitted: Sinhala honorifics (mahatha/miya) are placed after the name, which the prefix format cannot express.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this change
Adds
faker/providers/person/si_LK/— the first provider for the Sinhala (Sri Lanka)locale — plus a
TestSiLKtest class intests/providers/test_person.py.all in Sinhala script
prefixesare intentionally omitted: Sinhala honorifics (මහතා/මිය) are placedafter the name, which the prefix format cannot express
What was wrong
Faker has no locale for Sri Lanka (~22M people). The nearest locales
(
ta_IN,hi_IN,ne_NP) don't cover Sinhala names.How this fixes it
Introduces the si_LK locale following the structure of existing locales such as
ta_INandne_NP. First-name data comes from the MIT-licensed dataset athttps://github.com/TharindaDilshan/predicting-gender-in-sinhala-names (credited in
the code), normalized to NFC and deduplicated. Surnames were curated by me; I am a
native Sinhala speaker and verified all name data, including zero-width-joiner
conjuncts (e.g. ප්රනාන්දු, වික්රමසිංහ).
I plan follow-up PRs for
ssn(Sri Lankan NIC numbers — I maintainslnic),
phone_number, andaddress.Fixes #2429
AI Assistance Disclosure (REQUIRED)
I used Claude Code (Claude Fable 5) for scaffolding, data-cleaning scripts, and test
wiring. All name data was reviewed and verified by me as a native speaker; no names
are AI-generated.
Checklist
make lint