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.1.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.1-py3-none-any.whl (1.6 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: egy_names-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 31372ffb204b71ea39bdb430b6c0b522a46f380f65d5a7add30e4b61132fae5b
MD5 98956f1861fd8c8da5a6a455ea1dbeec
BLAKE2b-256 470c55cd953d5679ec32d0f7b2d82a3ae4c82cd450b62ca25300e022c00e81f8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: egy_names-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 14e3ddbe7181e9349cf6ca1897dfc8358652f6185c1f596f0ae917ed356a7757
MD5 cca6edaa2b71b657154eea2ce819fe56
BLAKE2b-256 2129fd0384cdab19371892d64742e68a56722aecd0064f6ba5abf611ffcc7acb

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

This release

0.1.1 This release

2 files

0.1.0

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