Skip to content

Commit 43bc225

Browse files
committed
add some respectful forms of address to titles #57
1 parent 04101ac commit 43bc225

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

nameparser/config/titles.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,10 +178,13 @@
178178
'ekegbian',
179179
'elder',
180180
'elerunwon',
181+
'eminence',
181182
'emperor',
182183
'empress',
183184
'ens',
184185
'envoy',
186+
'excellency',
187+
'excellent',
185188
'exec',
186189
'executive',
187190
'fadm',
@@ -213,7 +216,9 @@
213216
'her',
214217
'hereditary',
215218
'high',
219+
'highness',
216220
'his',
221+
'holiness',
217222
'hon', # sorry Hon Solo, but judges seem more common.
218223
'honorable',
219224
'honourable',
@@ -275,6 +280,7 @@
275280
'misses',
276281
'mister',
277282
'monsignor',
283+
'most',
278284
'mpco-cg',
279285
'mr',
280286
'mrs',

tests.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1231,6 +1231,18 @@ def test_le_as_last_name_with_middle_initial(self):
12311231
self.m(hn.first, "Yin", hn)
12321232
self.m(hn.middle, "a", hn)
12331233
self.m(hn.last, "Le", hn)
1234+
1235+
def test_conjunction_in_an_address_with_a_title(self):
1236+
hn = HumanName("His Excellency Lord Duncan")
1237+
self.m(hn.title, "His Excellency Lord", hn)
1238+
self.m(hn.last, "Duncan", hn)
1239+
1240+
@unittest.expectedFailure
1241+
def test_conjunction_in_an_address_with_a_first_name_title(self):
1242+
hn = HumanName("Her Majesty Queen Elizabeth")
1243+
self.m(hn.title, "Her Majesty Queen", hn)
1244+
# if you want to be technical, Queen is in FIRST_NAME_TITLES
1245+
self.m(hn.first, "Elizabeth", hn)
12341246

12351247
class ConstantsCustomization(HumanNameTestBase):
12361248

0 commit comments

Comments
 (0)