Skip to content

Add si_LK (Sinhala, Sri Lanka) person provider#2430

Open
RavinduPabasara wants to merge 1 commit into
joke2k:masterfrom
RavinduPabasara:feature/master/si_LK_person
Open

Add si_LK (Sinhala, Sri Lanka) person provider#2430
RavinduPabasara wants to merge 1 commit into
joke2k:masterfrom
RavinduPabasara:feature/master/si_LK_person

Conversation

@RavinduPabasara

Copy link
Copy Markdown

What does this change

Adds faker/providers/person/si_LK/ — the first provider for the Sinhala (Sri Lanka)
locale — plus a TestSiLK test class in tests/providers/test_person.py.

  • 457 Sinhala first names (246 male, 211 female) and 40 common Sri Lankan surnames,
    all in Sinhala script
  • Name format: given name + surname (standard Sinhala order)
  • prefixes are intentionally omitted: Sinhala honorifics (මහතා/මිය) are placed
    after 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_IN and ne_NP. First-name data comes from the MIT-licensed dataset at
https://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 maintain
slnic), phone_number, and address.

Fixes #2429

AI Assistance Disclosure (REQUIRED)

  • No AI tools were used in preparing this PR.
  • If AI tools were used, I have disclosed which ones, and fully reviewed and verified their output.

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

  • I have read the documentation about CONTRIBUTING
  • I have read the documentation about Coding style
  • I have run make lint

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.

@fcurella fcurella left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add si_LK (Sinhala, Sri Lanka) locale

2 participants