fullname-parser 1.0.3 → 1.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -12,9 +12,8 @@ module Fullname
12
12
  #
13
13
  # Also almost nobody will reach to 'v'(except a king), so all suffixes later than 'v' we won't use.
14
14
  GENERATION_LIST = [
15
- #'i',
16
- 'ii', 'iii', 'iv', 'v',
17
- # 'vi', 'vii', 'viii', 'ix', 'x', 'xi', 'xii', 'xiii', 'xiv', 'xv', 'xvi', 'xvii', 'xviii', 'xix', 'xx',
15
+ 'ii', 'iii', 'iv', 'v', 'vi'
16
+ # 'vii', 'viii', 'ix', 'x', 'xi', 'xii', 'xiii', 'xiv', 'xv', 'xvi', 'xvii', 'xviii', 'xix', 'xx',
18
17
  ] unless const_defined?(:GENERATION_LIST)
19
18
 
20
19
  GLOBAL_SUFFIX_LIST = GENERATION_LIST + [
@@ -33,10 +32,15 @@ module Fullname
33
32
  ] unless const_defined?(:SUFFIX_LIST)
34
33
 
35
34
  IGNORABLE_SUFFIXES = [
36
- 'do', 'd.o.', 'd.o', 'dds', 'd.d.s.',
35
+ 'do', 'd.o.', 'd.o', 'dds', 'd.d.s.', 'dr', 'dr.',
37
36
  'esq', 'esq.',
37
+ # Doctor suffixes
38
+ # http://books.google.com/books?id=J6kLNKw5baYC&pg=PA336&lpg=PA336&dq=faafp+faan+facaai&source=bl&ots=BJ4AvvSF9e&sig=Xj950-otl-X-tX_2I5DvGY4_uuE&hl=en&sa=X&ei=_9DHUdT2MOn6iwKR1oGAAw&ved=0CCoQ6AEwAA#v=onepage&q=faafp%20faan%20facaai&f=false
39
+ 'faafp', 'faan', 'facaai', 'facc', 'facd', 'facg', 'faap', 'facog', 'facp', 'facpm', 'facs', 'facsm', 'fama', 'faota', 'fapa', 'fapha', 'fcap', 'fccp', 'fcps', 'fds', 'faao', 'fics',
38
40
  'md', 'm.d.', 'm.d',
39
41
  'mr.', 'ms.', 'mrs.',
42
+ 'od', 'o.d.',
43
+ 'pa', 'p.a.', 'ps', 'p.s.',
40
44
  'jd', 'jd.', 'j.d.',
41
45
  'retd', 'ret.', 'retd.',
42
46
  'usmc',
@@ -45,26 +49,29 @@ module Fullname
45
49
  SUFFIX_CAN_BE_LASTNAME = [
46
50
  'do',
47
51
  ] unless const_defined?(:SUFFIX_CAN_BE_LASTNAME)
48
-
52
+
49
53
  PREFIX_LIST = [
50
54
  'asst.',
55
+ 'assoc.', 'associate', # va law
56
+ 'asst. dean', 'associate dean', 'interim dean', # va law
51
57
  'attorney', 'atty.',
52
- 'bg', 'brig', 'gen',
53
- 'colonel', 'cardinal', 'capt', 'capt.', 'captain', 'cdr', 'col' , 'col.', 'congressman', 'cpt',
54
- 'dir.', 'dr', 'dr.',
58
+ 'bg', 'bg.', 'brig', 'brig.', 'gen',
59
+ 'colonel', 'cardinal', 'capt', 'capt.', 'captain', 'cdr', 'col' , 'col.', 'congressman', 'cpt', 'cpt.', 'comm.',
60
+ 'dean.', 'dentist', 'dir.', 'doctor', 'dr', 'dr.',
55
61
  'exec.',
56
62
  'general', 'gen', 'gen.',
57
- 'honorable', 'hon', 'hon.',
63
+ 'honorable', 'hon', 'hon.', 'honret.',
64
+ 'interim', 'instructor', # va law
58
65
  'judge', 'justice', 'chiefjustice',
59
- 'lieutenant', 'lcdr', 'lt', 'lt.', 'ltc', 'ltcol.', 'ltcol', 'ltjg',
60
- 'mr', 'mr.', 'ms', 'ms.', 'mrs', 'mrs.', 'maj', 'maj.', 'major', 'miss',
66
+ 'lawyer', 'lieutenant', 'lcdr', 'lt', 'lt.', 'ltc', 'ltc.', 'ltcol.', 'ltcol', 'ltjg',
67
+ 'm/g', 'mr', 'mr.', 'mr..', 'ms', 'ms.', 'mrs', 'mrs.', 'maj', 'maj.', 'major', 'miss', 'miss.',
61
68
  'president', 'prof', 'prof.', 'professor',
69
+ 'rabbi',
62
70
  'reverend', 'rev', 'rev.',
63
71
  'sheriff',
64
- 'sr', 'sr.'
65
-
72
+ 'sis.', 'sr', 'sr.'
66
73
  ] unless const_defined?(:PREFIX_LIST)
67
-
74
+
68
75
  IGNORABLE_PREFIXS = [
69
76
  'the',
70
77
  ] unless const_defined?(:IGNORABLE_PREFIXS)
@@ -1,6 +1,6 @@
1
1
 
2
2
  module Fullname
3
3
  module Parser
4
- VERSION = '1.0.3'
4
+ VERSION = '1.0.5'
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fullname-parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-05-15 00:00:00.000000000 Z
12
+ date: 2013-06-24 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: For parsing people's fullname into pieces(prefix/first/middle/last/suffix)
15
15
  email: