-
Notifications
You must be signed in to change notification settings - Fork 105
Expand file tree
/
Copy pathprefixes.py
More file actions
48 lines (47 loc) · 1.11 KB
/
prefixes.py
File metadata and controls
48 lines (47 loc) · 1.11 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
38
39
40
41
42
43
44
45
46
47
48
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
#: Name pieces that appear before a last name. Prefixes join to the piece
#: that follows them to make one new piece. They can be chained together, e.g
#: "von der" and "de la". Because they only appear in middle or last names,
#: they also signifiy that all following name pieces should be in the same name
#: part, for example, "von" will be joined to all following pieces that are not
#: prefixes or suffixes, allowing recognition of double last names when they
#: appear after a prefixes. So in "pennie von bergen wessels MD", "von" will
#: join with all following name pieces until the suffix "MD", resulting in the
#: correct parsing of the last name "von bergen wessels".
PREFIXES = set([
'abu',
'bin',
'bon',
'da',
'dal',
'de',
'degli',
'dei',
'del',
'dela',
'della',
'delle',
'delli',
'dello',
'der',
'di',
'dí',
'do',
'dos',
'du',
'el',
'ibn',
'la',
'le',
'mc',
'mac',
'san',
'santa',
'st',
'ste',
'van',
'vel',
'van',
'von',
])