-
Notifications
You must be signed in to change notification settings - Fork 112
Expand file tree
/
Copy pathconjunctions.py
More file actions
37 lines (34 loc) · 1.16 KB
/
Copy pathconjunctions.py
File metadata and controls
37 lines (34 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
from nameparser.config._invariants import assert_normalized
CONJUNCTIONS = {
'&',
'and',
'et',
'e',
'of',
'the',
'und',
'y',
# #269: Cyrillic (ru/uk/bg) "and": и, і, та. Ukrainian writes і and
# й for the same conjunction, alternating on the surrounding
# vowel/consonant for euphony ("Олесь і Олена", "Марія й Петро"),
# so real data carries both spellings and neither alone suffices.
'и',
'і',
'й',
'та',
# #269: Greek "and": και.
'και',
# #269 follow-up: Arabic "and". Formal script attaches و to the
# following word (وفاطمة), so a standalone و token appears only in
# informal spacing -- common in real data. Single-character like
# 'y'/'и': the single-letter carve-out (Google Code issue 11,
# the "john e smith" bug) protects short names (joins
# only with enough rootname pieces).
'و',
}
"""
Pieces that should join to their neighboring pieces, e.g. "and", "y" and "&".
"of" and "the" are also include to facilitate joining multiple titles,
e.g. "President of the United States".
"""
assert_normalized("CONJUNCTIONS", CONJUNCTIONS)