egy-names 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Afify by Abdullah Afify
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,126 @@
1
+ Metadata-Version: 2.5
2
+ Name: egy-names
3
+ Version: 0.1.0
4
+ Summary: A production-grade Egyptian onomastic intelligence library — generate, translate, annotate, split, and analyze Egyptian names.
5
+ Project-URL: Homepage, https://github.com/afify/egy-names
6
+ Project-URL: Documentation, https://github.com/afify/egy-names#readme
7
+ Project-URL: Issues, https://github.com/afify/egy-names/issues
8
+ Author-email: Abdullah Afify <abdullah@afify.dev>
9
+ Maintainer: Afify
10
+ License: MIT
11
+ License-File: LICENSE
12
+ Keywords: arabic,egypt,egyptian,name-generator,name-translation,names,nlp,onomastics
13
+ Classifier: Development Status :: 4 - Beta
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Intended Audience :: Science/Research
16
+ Classifier: License :: OSI Approved :: MIT License
17
+ Classifier: Operating System :: OS Independent
18
+ Classifier: Programming Language :: Python :: 3
19
+ Classifier: Programming Language :: Python :: 3.9
20
+ Classifier: Programming Language :: Python :: 3.10
21
+ Classifier: Programming Language :: Python :: 3.11
22
+ Classifier: Programming Language :: Python :: 3.12
23
+ Classifier: Programming Language :: Python :: 3.13
24
+ Classifier: Topic :: Scientific/Engineering :: Information Analysis
25
+ Classifier: Topic :: Text Processing :: Linguistic
26
+ Classifier: Typing :: Typed
27
+ Requires-Python: >=3.9
28
+ Description-Content-Type: text/markdown
29
+
30
+ # Egyptian Names (`egy-names`)
31
+
32
+ A production-grade Egyptian onomastic intelligence library for Python.
33
+
34
+ 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).
35
+
36
+ Developed by **Abdullah Afify** / **Afify**.
37
+
38
+ ## Features
39
+
40
+ - **Culturally Authentic Generation**: Generate realistic Egyptian full names using a slot-weighted probabilistic engine grounded in actual national naming distributions.
41
+ - **Instant Translation**: Translate full names between Arabic and English with high accuracy, handling over 134,000 variant spellings.
42
+ - **Intelligent Segmentation**: Split concatenated, space-less Arabic text (e.g., `محمدأحمدعلي`) into correct individual name tokens using dynamic programming.
43
+ - **Deep Annotation**: Get rich metadata for any name including gender, religion, frequency class, national rank, and etymological meaning.
44
+ - **Orthographic Correction**: Correct misspelled or variant-form names to their canonical Arabic forms using a 54,000-entry correction index.
45
+ - **Creative AI Features**: Infer gender and religion from full patronymic chains, analyze chain structure (person, father, grandfather, family), and compute uniqueness scores.
46
+
47
+ ## Installation
48
+
49
+ ```bash
50
+ pip install egy-names
51
+ ```
52
+
53
+ ## Quick Start
54
+
55
+ ### 1. Generating Names
56
+
57
+ ```python
58
+ from egy_names import EgyNames
59
+
60
+ en = EgyNames()
61
+
62
+ # Generate 5 male Muslim full names (default length: 4-5 parts)
63
+ names = en.generate(count=5, gender="male", religion="muslim", family_name=True)
64
+
65
+ for name in names:
66
+ print(name.ar) # e.g., "محمد محمود علي أبوهشيمة"
67
+ print(name.en) # e.g., "Mohamed Mahmoud Ali Abuheshima"
68
+ ```
69
+
70
+ ### 2. Translation & Correction
71
+
72
+ ```python
73
+ en.translate("محمد أحمد علي")
74
+ # -> "Mohamed Ahmed Ali"
75
+
76
+ en.correct("احمد")
77
+ # -> "أحمد"
78
+ ```
79
+
80
+ ### 3. Annotation & Meaning
81
+
82
+ ```python
83
+ info = en.annotate("محمد")
84
+ print(info.gender) # "male"
85
+ print(info.religion) # "muslim"
86
+ print(info.meaning_ar) # "المحمود؛ كثير الخصال المحمودة"
87
+ ```
88
+
89
+ ### 4. Intelligent Splitting
90
+
91
+ Handles fully concatenated Arabic text gracefully:
92
+
93
+ ```python
94
+ en.split("محمدأحمدعليحسنالشاذلي")
95
+ # -> ["محمد", "أحمد", "علي", "حسن", "الشاذلي"]
96
+ ```
97
+
98
+ ### 5. Advanced Analysis
99
+
100
+ ```python
101
+ # Infer gender from a full name string
102
+ en.detect_gender("مريم إبراهيم حسن")
103
+ # -> GenderDetection(gender='female', confidence=0.85)
104
+
105
+ # Infer religion based on theophoric patterns
106
+ en.detect_religion("جورج بطرس سمير")
107
+ # -> ReligionDetection(religion='christian', confidence=0.92)
108
+
109
+ # Analyze the patronymic chain
110
+ chain = en.analyze_chain("محمد أحمد علي حسن الشاذلي")
111
+ # Slot 1: محمد (person)
112
+ # Slot 2: أحمد (father)
113
+ # Slot 3: علي (grandfather)
114
+ # Slot 4: حسن (great_grandfather)
115
+ # Slot 5: الشاذلي (family_name)
116
+ ```
117
+
118
+ ## Data Assets
119
+
120
+ 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.
121
+
122
+ ## License & Copyright
123
+
124
+ **MIT License**
125
+
126
+ Copyright (c) 2026 **Afify by Abdullah Afify**
@@ -0,0 +1,97 @@
1
+ # Egyptian Names (`egy-names`)
2
+
3
+ A production-grade Egyptian onomastic intelligence library for Python.
4
+
5
+ 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).
6
+
7
+ Developed by **Abdullah Afify** / **Afify**.
8
+
9
+ ## Features
10
+
11
+ - **Culturally Authentic Generation**: Generate realistic Egyptian full names using a slot-weighted probabilistic engine grounded in actual national naming distributions.
12
+ - **Instant Translation**: Translate full names between Arabic and English with high accuracy, handling over 134,000 variant spellings.
13
+ - **Intelligent Segmentation**: Split concatenated, space-less Arabic text (e.g., `محمدأحمدعلي`) into correct individual name tokens using dynamic programming.
14
+ - **Deep Annotation**: Get rich metadata for any name including gender, religion, frequency class, national rank, and etymological meaning.
15
+ - **Orthographic Correction**: Correct misspelled or variant-form names to their canonical Arabic forms using a 54,000-entry correction index.
16
+ - **Creative AI Features**: Infer gender and religion from full patronymic chains, analyze chain structure (person, father, grandfather, family), and compute uniqueness scores.
17
+
18
+ ## Installation
19
+
20
+ ```bash
21
+ pip install egy-names
22
+ ```
23
+
24
+ ## Quick Start
25
+
26
+ ### 1. Generating Names
27
+
28
+ ```python
29
+ from egy_names import EgyNames
30
+
31
+ en = EgyNames()
32
+
33
+ # Generate 5 male Muslim full names (default length: 4-5 parts)
34
+ names = en.generate(count=5, gender="male", religion="muslim", family_name=True)
35
+
36
+ for name in names:
37
+ print(name.ar) # e.g., "محمد محمود علي أبوهشيمة"
38
+ print(name.en) # e.g., "Mohamed Mahmoud Ali Abuheshima"
39
+ ```
40
+
41
+ ### 2. Translation & Correction
42
+
43
+ ```python
44
+ en.translate("محمد أحمد علي")
45
+ # -> "Mohamed Ahmed Ali"
46
+
47
+ en.correct("احمد")
48
+ # -> "أحمد"
49
+ ```
50
+
51
+ ### 3. Annotation & Meaning
52
+
53
+ ```python
54
+ info = en.annotate("محمد")
55
+ print(info.gender) # "male"
56
+ print(info.religion) # "muslim"
57
+ print(info.meaning_ar) # "المحمود؛ كثير الخصال المحمودة"
58
+ ```
59
+
60
+ ### 4. Intelligent Splitting
61
+
62
+ Handles fully concatenated Arabic text gracefully:
63
+
64
+ ```python
65
+ en.split("محمدأحمدعليحسنالشاذلي")
66
+ # -> ["محمد", "أحمد", "علي", "حسن", "الشاذلي"]
67
+ ```
68
+
69
+ ### 5. Advanced Analysis
70
+
71
+ ```python
72
+ # Infer gender from a full name string
73
+ en.detect_gender("مريم إبراهيم حسن")
74
+ # -> GenderDetection(gender='female', confidence=0.85)
75
+
76
+ # Infer religion based on theophoric patterns
77
+ en.detect_religion("جورج بطرس سمير")
78
+ # -> ReligionDetection(religion='christian', confidence=0.92)
79
+
80
+ # Analyze the patronymic chain
81
+ chain = en.analyze_chain("محمد أحمد علي حسن الشاذلي")
82
+ # Slot 1: محمد (person)
83
+ # Slot 2: أحمد (father)
84
+ # Slot 3: علي (grandfather)
85
+ # Slot 4: حسن (great_grandfather)
86
+ # Slot 5: الشاذلي (family_name)
87
+ ```
88
+
89
+ ## Data Assets
90
+
91
+ 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.
92
+
93
+ ## License & Copyright
94
+
95
+ **MIT License**
96
+
97
+ Copyright (c) 2026 **Afify by Abdullah Afify**
@@ -0,0 +1,59 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "egy-names"
7
+ version = "0.1.0"
8
+ description = "A production-grade Egyptian onomastic intelligence library — generate, translate, annotate, split, and analyze Egyptian names."
9
+ readme = "README.md"
10
+ license = { text = "MIT" }
11
+ authors = [
12
+ { name = "Abdullah Afify", email = "abdullah@afify.dev" },
13
+ ]
14
+ maintainers = [
15
+ { name = "Afify" }
16
+ ]
17
+ requires-python = ">=3.9"
18
+ keywords = [
19
+ "egyptian",
20
+ "names",
21
+ "arabic",
22
+ "onomastics",
23
+ "nlp",
24
+ "name-generator",
25
+ "name-translation",
26
+ "egypt",
27
+ ]
28
+ classifiers = [
29
+ "Development Status :: 4 - Beta",
30
+ "Intended Audience :: Developers",
31
+ "Intended Audience :: Science/Research",
32
+ "License :: OSI Approved :: MIT License",
33
+ "Operating System :: OS Independent",
34
+ "Programming Language :: Python :: 3",
35
+ "Programming Language :: Python :: 3.9",
36
+ "Programming Language :: Python :: 3.10",
37
+ "Programming Language :: Python :: 3.11",
38
+ "Programming Language :: Python :: 3.12",
39
+ "Programming Language :: Python :: 3.13",
40
+ "Topic :: Scientific/Engineering :: Information Analysis",
41
+ "Topic :: Text Processing :: Linguistic",
42
+ "Typing :: Typed",
43
+ ]
44
+ dependencies = [] # zero dependencies
45
+
46
+ [project.urls]
47
+ Homepage = "https://github.com/afify/egy-names"
48
+ Documentation = "https://github.com/afify/egy-names#readme"
49
+ Issues = "https://github.com/afify/egy-names/issues"
50
+
51
+ [tool.hatch.build.targets.wheel]
52
+ packages = ["src/egy_names"]
53
+
54
+ [tool.pytest.ini_options]
55
+ testpaths = ["tests"]
56
+
57
+ [tool.ruff]
58
+ line-length = 100
59
+ target-version = "py39"