Skip to content

Commit

Permalink
Update persian_names.py
Browse files Browse the repository at this point in the history
  • Loading branch information
armanyazdi committed Sep 30, 2023
1 parent 630f4f6 commit 68fdffa
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions persian_names/persian_names.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ def lastname_en():
# English Prefixes and Suffixes
some_prefixes = [
'Mir',
'Pir',
'Yar',
'Agha',
'Abou',
'Pour',
Expand All @@ -39,6 +41,7 @@ def lastname_en():
'Amir',
'Aziz',
'Sayad',
'Zahed',
'Shah',
'Nik',
'Haj',
Expand Down Expand Up @@ -82,7 +85,8 @@ def lastname_en():
'rashed', '',
'dana', '',
'zadegan', '',
'manesh', ''
'manesh', '',
'yar', ''
]
more_suffixes = [
'pour', 'i',
Expand All @@ -98,7 +102,8 @@ def lastname_en():
'beigi', 'i',
'zare', 'i',
'tabar', 'i',
'manesh', 'i'
'manesh', 'i',
'pourian', 'i'
]
arabic_names = []
illegal_names = []
Expand All @@ -111,7 +116,7 @@ def lastname_en():
for i in names[:26]:
arabic_names.append(i)

for i in names[26:59]:
for i in names[26:60]:
illegal_names.append(i)

while last_name in illegal_names:
Expand Down Expand Up @@ -184,6 +189,8 @@ def lastname_fa():
# Farsi Prefixes and Suffixes
some_prefixes = [
'میر',
'پیر',
'یار',
'آقا',
'ابو',
'پور',
Expand All @@ -194,6 +201,7 @@ def lastname_fa():
'امیر',
'عزیز',
'صیاد',
'زاهد',
'شاه ',
'نیک ',
'حاج ',
Expand Down Expand Up @@ -237,7 +245,8 @@ def lastname_fa():
' راشد', '',
' دانا', '',
' زادگان', '',
' منش', ''
' منش', '',
' یار', ''
]
more_suffixes = [
' پور', 'ی',
Expand All @@ -253,7 +262,8 @@ def lastname_fa():
' بیگی', 'ی',
' زارع', 'ی',
' تبار', 'ی',
' منش', 'ی'
' منش', 'ی',
' پوریان', 'ی'
]
arabic_names = []
illegal_names = []
Expand All @@ -266,7 +276,7 @@ def lastname_fa():
for i in names[:26]:
arabic_names.append(i)

for i in names[26:59]:
for i in names[26:60]:
illegal_names.append(i)

while last_name in illegal_names:
Expand Down

0 comments on commit 68fdffa

Please sign in to comment.