Skip to main content

Egyptian Names (egy-names)

A production-grade Egyptian onomastic intelligence library for Python.

Powered by 33,117 verified Egyptian name lemmas and 134,000+ lookup keys, derived from an engineered dataset of 2.46 million Egyptian student records (11 million+ name tokens) from the Thanawiya Amma cohorts (2024–2026).

Developed by Abdullah Afify / Afify.

Features

  • Culturally Authentic Generation: Generate realistic Egyptian full names using a slot-weighted probabilistic engine grounded in actual national naming distributions.
  • Instant Translation: Translate full names between Arabic and English with high accuracy, handling over 134,000 variant spellings.
  • Intelligent Segmentation: Split concatenated, space-less Arabic text (e.g., محمدأحمدعلي) into correct individual name tokens using dynamic programming.
  • Deep Annotation: Get rich metadata for any name including gender, religion, frequency class, national rank, and etymological meaning.
  • Orthographic Correction: Correct misspelled or variant-form names to their canonical Arabic forms using a 54,000-entry correction index.
  • Creative AI Features: Infer gender and religion from full patronymic chains, analyze chain structure (person, father, grandfather, family), and compute uniqueness scores.

Installation

pip install egy-names

Quick Start

1. Generating Names

from egy_names import EgyNames

en = EgyNames()

# Generate 5 male Muslim full names (default length: 4-5 parts)
names = en.generate(count=5, gender="male", religion="muslim", family_name=True)

for name in names:
    print(name.ar)  # e.g., "محمد محمود علي أبوهشيمة"
    print(name.en)  # e.g., "Mohamed Mahmoud Ali Abuheshima"

2. Translation & Correction

en.translate("محمد أحمد علي")
# -> "Mohamed Ahmed Ali"

en.correct("احمد")
# -> "أحمد"

3. Annotation & Meaning

info = en.annotate("محمد")
print(info.gender)      # "male"
print(info.religion)    # "muslim"
print(info.meaning_ar)  # "المحمود؛ كثير الخصال المحمودة"

4. Intelligent Splitting

Handles fully concatenated Arabic text gracefully:

en.split("محمدأحمدعليحسنالشاذلي")
# -> ["محمد", "أحمد", "علي", "حسن", "الشاذلي"]

5. Advanced Analysis

# Infer gender from a full name string
en.detect_gender("مريم إبراهيم حسن")
# -> GenderDetection(gender='female', confidence=0.85)

# Infer religion based on theophoric patterns
en.detect_religion("جورج بطرس سمير")
# -> ReligionDetection(religion='christian', confidence=0.92)

# Analyze the patronymic chain
chain = en.analyze_chain("محمد أحمد علي حسن الشاذلي")
# Slot 1: محمد (person)
# Slot 2: أحمد (father)
# Slot 3: علي (grandfather)
# Slot 4: حسن (great_grandfather)
# Slot 5: الشاذلي (family_name)

Data Assets

The library embeds a highly compressed ~1.5MB JSON data bundle directly inside the package. It loads lazily and thread-safely on first use, keeping the memory footprint exceptionally low while providing instant lookups.

License & Copyright

MIT License

Copyright (c) 2026 Afify by Abdullah Afify

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

egy_names-0.1.0.tar.gz (1.6 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

egy_names-0.1.0-py3-none-any.whl (1.6 MB view details)

Uploaded Python 3

File details

Details for the file egy_names-0.1.0.tar.gz.

File metadata

  • Download URL: egy_names-0.1.0.tar.gz
  • Upload date:
  • Size: 1.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.2

File hashes

Hashes for egy_names-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e95b7168ee0dc070d57bc1ac0c8fe2ad1ad283be94a94a0af6043b960f1dd641
MD5 c824f1d05e489faf44bbc69d396bc58e
BLAKE2b-256 99eeb5c9098285407d1f1e8afb0fc04273360fdb9672c94427704207f486c99f

See more details on using hashes here.

File details

Details for the file egy_names-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: egy_names-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 1.6 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.2

File hashes

Hashes for egy_names-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 657df3454c97476267d6b6864902717a3c7e54693e42276a0870b2d989859f5f
MD5 66489affa3c103e35de664eff2bf1c10
BLAKE2b-256 0810e91020bab5d3ba13a2fffc3ebc8ba4b51ce823fb7da4461e241d986ef215

See more details on using hashes here.

Release history Release notifications | RSS feed

0.3.6

2 files

0.3.5

2 files

0.3.4

2 files

0.3.2

2 files

0.3.1

2 files

0.2.1

2 files

0.1.1

2 files

This release

0.1.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page