name_tamer 0.6.0 → 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: f4cec196a889452445f937bcebe32026091d7e39
4
- data.tar.gz: 458fb4f8fad553bb4633302ad640772a0182b2f3
2
+ SHA256:
3
+ metadata.gz: cc005aab6cf23f19cf21ee423d7e3c0b61e820e1dd115eaee6e058c93bfb29ca
4
+ data.tar.gz: e1a792e62234a8a2fc49f3bde8596627d895a3dc035763b42f4c31c174adab2c
5
5
  SHA512:
6
- metadata.gz: 15cf43c55b31ca59761a17c1779d0fa556f16e0e52c2c7fcefebd531883a12bf5395b63aa0f551a9c0a50392942f75d463a0ef694c7220457e03d6fc2e90b5ab
7
- data.tar.gz: afe13378d864b4e7c06eccf6aae5969f5626d2d629987b218f33a4db0f0f781df5be047980c5fff49994ca40da9fb220dc9ccee729b8c24d5c79d541071ad6d3
6
+ metadata.gz: eeb9dba6eb6b560a1d58b54211db386d79d1dee64f761a78230f64847f53dea2786052daf7ec2ea33d5792f7148dbaadd97d074ca7e9a479e8bd8239a842e8eb
7
+ data.tar.gz: a2776328194cc8ff76d9d201b0ca8f0d9e8b902a718223bf449afd5e298ef8006a2b8a1f9ed0ac32aefa8e27db38e2eae4e46689b11fa54e9f2cf993325621b9
data/.gitignore CHANGED
@@ -21,6 +21,7 @@ config/secrets.yml
21
21
  .ruby-version
22
22
  .ruby-gemset
23
23
  Gemfile.lock
24
+ .byebug_history
24
25
 
25
26
  # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
26
27
  .rvmrc
data/.rubocop.yml CHANGED
@@ -1,63 +1,61 @@
1
1
  ---
2
2
  AllCops:
3
- TargetRubyVersion: 2.0
4
3
  DisplayCopNames: true
4
+ DisplayStyleGuide: true
5
5
  Exclude:
6
- - 'tmp/**/*'
6
+ - bin/**/*
7
+ - tmp/**/*
7
8
  - '**/*.rake'
8
9
 
10
+ Layout/DotPosition:
11
+ EnforcedStyle: leading
12
+ Enabled: true
13
+
14
+ Layout/ExtraSpacing:
15
+ Enabled: true
16
+
9
17
  Metrics/BlockLength:
10
18
  CountComments: false # count full line comments?
11
19
  Exclude:
12
20
  - '**/*_spec.rb'
13
21
 
14
- LineLength:
15
- Description: 'Limit lines to 120 characters.'
22
+ Metrics/ClassLength:
23
+ CountComments: false # count full line comments?
24
+ Exclude:
25
+ - lib/name_tamer/name.rb
26
+ - lib/name_tamer/string.rb
27
+
28
+ Metrics/CyclomaticComplexity:
29
+ Max: 8
30
+
31
+ Metrics/LineLength:
16
32
  Max: 120
17
33
  Enabled: true
18
34
 
19
- MethodLength:
20
- Description: 'Avoid methods longer than 10 lines of code.'
35
+ Metrics/MethodLength:
21
36
  Max: 23
22
37
  Enabled: true
23
38
 
24
- Documentation:
25
- Description: 'Document classes and non-namespace modules.'
39
+ Metrics/ModuleLength:
40
+ CountComments: false # count full line comments?
41
+ Exclude:
42
+ - lib/name_tamer/constants.rb
43
+
44
+ Naming/FileName:
26
45
  Enabled: false
27
46
 
28
- FileName:
29
- Description: 'Use snake_case for source file names.'
47
+ Style/Documentation:
30
48
  Enabled: false
31
49
 
32
- DotPosition:
33
- Description: 'Checks the position of the dot in multi-line method calls.'
34
- EnforcedStyle: leading
35
- # EnforcedStyle: trailing
50
+ Style/MutableConstant:
36
51
  Enabled: true
37
52
 
38
- StringLiterals:
53
+ Style/StringLiterals:
39
54
  EnforcedStyle: single_quotes
40
55
  Enabled: true
41
56
 
42
- CyclomaticComplexity:
43
- Description: 'Avoid complex methods.'
44
- Max: 8
45
-
46
- ClassLength:
47
- Description: 'Avoid classes longer than 100 lines of code.'
48
- CountComments: false # count full line comments?
49
- Max: 334
50
-
51
- ExtraSpacing:
52
- Enabled: true
57
+ Style/TrailingCommaInArrayLiteral:
58
+ EnforcedStyleForMultiline: comma
53
59
 
54
- Style/PercentLiteralDelimiters:
55
- # Hound and CodeClimate are currently using an old version of Rubocop with
56
- # different defaults, so we set them explicitly here.
57
- PreferredDelimiters:
58
- default: ()
59
- '%i': '[]'
60
- '%I': '[]'
61
- '%r': '{}'
62
- '%w': '[]'
63
- '%W': '[]'
60
+ Style/TrailingCommaInHashLiteral:
61
+ EnforcedStyleForMultiline: comma
data/.travis.yml CHANGED
@@ -2,11 +2,9 @@
2
2
  language: ruby
3
3
  dist: trusty
4
4
  rvm:
5
- - 2.4.0
5
+ - 2.5
6
+ - 2.4
6
7
  - 2.3
7
- - 2.2
8
- - 2.1
9
- - 2.0
10
8
  before_install:
11
9
  - gem update bundler
12
10
  script: bundle exec rspec
data/Gemfile CHANGED
@@ -1,15 +1,21 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source 'https://rubygems.org'
2
4
  gemspec
3
5
  ruby RUBY_VERSION
4
6
 
5
- group :development do
6
- gem 'bundler'
7
- gem 'gem-release'
7
+ group :development, :test do
8
+ gem 'byebug'
8
9
  gem 'guard'
9
10
  gem 'guard-rspec'
10
11
  gem 'guard-rubocop'
11
12
  end
12
13
 
14
+ group :development do
15
+ gem 'bundler'
16
+ gem 'gem-release'
17
+ end
18
+
13
19
  group :test do
14
20
  gem 'codeclimate-test-reporter'
15
21
  gem 'coveralls'
data/Guardfile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  guard :rubocop do
2
4
  watch(/.+\.rb$/)
3
5
  watch(%r{(?:.+/)?\.rubocop\.yml$}) { |m| File.dirname(m[0]) }
data/README.md CHANGED
@@ -5,7 +5,6 @@
5
5
  [![Build Status](https://travis-ci.org/dominicsayers/name_tamer.svg?branch=master)](https://travis-ci.org/dominicsayers/name_tamer)
6
6
  [![Code Climate](https://codeclimate.com/github/dominicsayers/name_tamer/badges/gpa.svg)](https://codeclimate.com/github/dominicsayers/name_tamer)
7
7
  [![Test Coverage](https://codeclimate.com/github/dominicsayers/name_tamer/badges/coverage.svg)](https://codeclimate.com/github/dominicsayers/name_tamer/coverage)
8
- [![Dependency Status](https://gemnasium.com/badges/github.com/dominicsayers/name_tamer.svg)](https://gemnasium.com/github.com/dominicsayers/name_tamer)
9
8
  [![Security](https://hakiri.io/github/dominicsayers/name_tamer/master.svg)](https://hakiri.io/github/dominicsayers/name_tamer/master)
10
9
 
11
10
  NameTamer: making sense of names
data/Rakefile CHANGED
@@ -1,4 +1,6 @@
1
1
  #!/usr/bin/env rake
2
+ # frozen_string_literal: true
3
+
2
4
  require 'bundler/gem_tasks'
3
5
 
4
6
  begin
data/lib/name-tamer.rb CHANGED
@@ -1 +1,3 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'name_tamer'
data/lib/name_tamer.rb CHANGED
@@ -1,4 +1,4 @@
1
- # encoding: utf-8
1
+ # frozen_string_literal: true
2
2
 
3
3
  require 'cgi'
4
4
  require 'name_tamer/string'
@@ -1,4 +1,4 @@
1
- # encoding: utf-8
1
+ # frozen_string_literal: true
2
2
 
3
3
  class Array
4
4
  def neighbours
@@ -1,8 +1,10 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module NameTamer
2
- NONBREAKING_SPACE = "\u00a0".freeze
3
- ASCII_SPACE = ' '.freeze
4
- ADFIX_JOINERS = "[#{ASCII_SPACE}-]".freeze
5
- SLUG_DELIMITER = '-'.freeze
4
+ NONBREAKING_SPACE = "\u00a0"
5
+ ASCII_SPACE = ' '
6
+ ADFIX_JOINERS = "[#{ASCII_SPACE}-]"
7
+ SLUG_DELIMITER = '-'
6
8
  ZERO_WIDTH_FILTER = /[\u180E\u200B\u200C\u200D\u2063\uFEFF]/
7
9
 
8
10
  # Constants for parameterizing Unicode strings for IRIs
@@ -34,12 +36,12 @@ module NameTamer
34
36
  # We're using the most restrictive segment definition (isegment-nz-nc)
35
37
  # to avoid any possible problems with the IRI that it one day might
36
38
  # get placed in.
37
- ALPHA = 'A-Za-z'.freeze
38
- DIGIT = '0-9'.freeze
39
- UCSCHAR = '\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF'.freeze
40
- IUNRESERVED = "#{ALPHA}#{DIGIT}\\-\\._~#{UCSCHAR}".freeze
41
- SUBDELIMS = '!$&\'\(\)\*+,;='.freeze
42
- ISEGMENT_NZ_NC = "#{IUNRESERVED}#{SUBDELIMS}@".freeze # pct-encoded not needed
39
+ ALPHA = 'A-Za-z'
40
+ DIGIT = '0-9'
41
+ UCSCHAR = '\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF'
42
+ IUNRESERVED = "#{ALPHA}#{DIGIT}\\-\\._~#{UCSCHAR}"
43
+ SUBDELIMS = '!$&\'\(\)\*+,;='
44
+ ISEGMENT_NZ_NC = "#{IUNRESERVED}#{SUBDELIMS}@" # pct-encoded not needed
43
45
  FILTER_RFC3987 = /[^#{ISEGMENT_NZ_NC}]/
44
46
  FILTER_COMPAT = /[^#{ALPHA}#{DIGIT}\-_#{UCSCHAR}]/
45
47
 
@@ -50,60 +52,411 @@ module NameTamer
50
52
  ADFIXES = {
51
53
  prefix: {
52
54
  person: [
53
- 'Baroness', 'Capt.', 'Captain', 'Col.', 'Colonel', 'Dame', 'Doctor',
54
- 'Dr.', 'Judge', 'Justice', 'Lady', 'Lieut.', 'Lieutenant', 'Lord',
55
- 'Madame', 'Major', 'Master', 'Matron', 'Messrs.', 'Mgr.', 'Miss',
56
- 'Mister', 'Mlle.', 'Mme.', 'Mons.', 'Mr.', 'Mr. & Mrs.', 'Mr. and Mrs.',
57
- 'Mrs.', 'Ms.', 'Msgr.', 'Prof.', 'Professor', 'Rev.', 'Reverend', 'Sir',
58
- 'Sister', 'The Hon.', 'The Lady.', 'The Lord', 'The Rt. Hon.', 'Doktor',
59
- 'Herr', 'Frau'
55
+ 'Baroness',
56
+ 'Capt.',
57
+ 'Captain',
58
+ 'Col.',
59
+ 'Colonel',
60
+ 'Dame',
61
+ 'Doctor',
62
+ 'Doktor',
63
+ 'Dr.',
64
+ 'Frau',
65
+ 'Herr',
66
+ 'Judge',
67
+ 'Justice',
68
+ 'Lady',
69
+ 'Lieut.',
70
+ 'Lieutenant',
71
+ 'Lord',
72
+ 'Madame',
73
+ 'Major',
74
+ 'Master',
75
+ 'Matron',
76
+ 'Messrs.',
77
+ 'Mgr.',
78
+ 'Miss',
79
+ 'Mister',
80
+ 'Mlle.',
81
+ 'Mme.',
82
+ 'Mons.',
83
+ 'Mr. & Mrs.',
84
+ 'Mr. and Mrs.',
85
+ 'Mr.',
86
+ 'Mrs.',
87
+ 'Ms.',
88
+ 'Msgr.',
89
+ 'Prof.',
90
+ 'Professor',
91
+ 'Rev.',
92
+ 'Reverend',
93
+ 'Sir',
94
+ 'Sister',
95
+ 'The Hon.',
96
+ 'The Lady.',
97
+ 'The Lord',
98
+ 'The Rt. Hon.',
60
99
  ],
61
100
  organization: [
62
- 'Fa.', 'P.T.', 'P.T. Tbk.', 'U.D.'
101
+ 'Fa.',
102
+ 'P.T. Tbk.',
103
+ 'P.T.',
104
+ 'U.D.',
63
105
  ],
64
106
  before: '\\A', after: ADFIX_JOINERS
65
107
  },
66
108
  suffix: {
67
109
  person: [
68
- 'Chartered F.C.S.I.', 'Chartered M.C.S.I.', 'I.F.R.S. Certified', 'F.Inst.L.M.', 'C.I.S.S.P.', 'F.C.I.P.S.',
69
- 'M.R.I.C.S.', 'T.M.I.E.T.', 'Dip. D.M.', 'A.A.M.S.', 'A.C.C.A.', 'A.C.M.A.', 'A.I.F.A.', 'A.W.M.A.', 'C.A.I.A.',
70
- 'C.A.P.M.', 'C.C.I.M.', 'C.D.F.A.', 'C.E.P.P.', 'C.F.B.S.', 'C.G.M.A.', 'C.I.T.P.', 'C.L.T.C.', 'C.P.C.C.',
71
- 'C.R.P.C.', 'C.R.P.S.', 'C.S.O.X.', 'C.S.S.D.', 'F.B.C.S.', 'F.C.C.A.', 'F.C.M.I.', 'F.C.S.I.', 'F.I.E.T.',
72
- 'F.I.R.P.', 'M.I.E.T.', 'M.S.F.S.', 'M.Sc. D.', 'O.R.S.C.', 'R.I.C.P.', 'B.Tech.', 'Cantab.', 'Ch.F.C.',
73
- 'D.Phil.', 'I.T.I.L. v3', 'M.Io.D.', 'S.C.M.P', 'A.C.A.', 'A.C.C.', 'A.E.P.', 'A.I.F.', 'A.S.A.', 'B.Eng.',
74
- 'C.B.V.', 'C.E.M.', 'C.Eng.', 'C.F.A.', 'C.F.F.', 'C.F.P.', 'C.F.S.', 'C.G.A.', 'C.G.B.', 'C.G.P.', 'C.I.M.',
75
- 'C.L.P.', 'C.L.U.', 'C.M.A.', 'C.M.T.', 'C.P.A.', 'C.T.A.', 'C.W.S.', 'D.B.E.', 'D.D.S.', 'D.V.M.', 'E.R.P.',
76
- 'Eng.D.', 'F.C.A.', 'F.P.C.', 'F.R.M.', 'F.R.M.', 'G.S.P.', 'L.P.S.', 'M.B.A.', 'M.B.E.', 'M.E.P.', 'M.Eng.',
77
- 'M.Jur.', 'M.P.A.', 'M.S.F.', 'M.S.P.', 'O.B.E.', 'P.C.C.', 'P.F.S.', 'P.H.R.', 'P.M.C.', 'P.M.P.', 'P.M.P.',
78
- 'P.S.P.', 'R.F.C.', 'V.M.D.', 'B.Ed.', 'B.Sc.', 'Ed.D.', 'Ed.M.', 'Hons.', 'LL.B.', 'LL.D.', 'LL.M.', 'M.Ed.',
79
- 'M.Sc.', 'Oxon.', 'Ph.D.', 'B.A.', 'C.A.', 'E.A.', 'Esq.', 'J.D.', 'K.C.', 'M.A.', 'M.D.', 'M.P.', 'M.S.',
80
- 'O.K.', 'P.A.', 'Q.C.', 'R.D.', 'III', 'Jr.', 'Sr.', 'II', 'IV', 'V'
110
+ 'A.A.M.S.',
111
+ 'A.C.A.',
112
+ 'A.C.C.',
113
+ 'A.C.C.A.',
114
+ 'A.C.M.A.',
115
+ 'A.E.P.',
116
+ 'A.I.F.',
117
+ 'A.I.F.A.',
118
+ 'A.S.A.',
119
+ 'A.W.M.A.',
120
+ 'B.A.',
121
+ 'B.Ed.',
122
+ 'B.Eng.',
123
+ 'B.Sc.',
124
+ 'B.Tech.',
125
+ 'C.A.',
126
+ 'C.A.I.A.',
127
+ 'C.A.P.M.',
128
+ 'C.B.V.',
129
+ 'C.C.I.M.',
130
+ 'C.D.F.A.',
131
+ 'C.E.M.',
132
+ 'C.E.P.P.',
133
+ 'C.Eng.',
134
+ 'C.F.A.',
135
+ 'C.F.B.S.',
136
+ 'C.F.F.',
137
+ 'C.F.P.',
138
+ 'C.F.S.',
139
+ 'C.G.A.',
140
+ 'C.G.B.',
141
+ 'C.G.M.A.',
142
+ 'C.G.P.',
143
+ 'C.I.M.',
144
+ 'C.I.S.S.P.',
145
+ 'C.I.T.P.',
146
+ 'C.L.P.',
147
+ 'C.L.T.C.',
148
+ 'C.L.U.',
149
+ 'C.M.A.',
150
+ 'C.M.T.',
151
+ 'C.P.A.',
152
+ 'C.P.C.C.',
153
+ 'C.R.P.C.',
154
+ 'C.R.P.S.',
155
+ 'C.S.O.X.',
156
+ 'C.S.S.D.',
157
+ 'C.T.A.',
158
+ 'C.W.S.',
159
+ 'Cantab.',
160
+ 'Ch.F.C.',
161
+ 'Chartered F.C.S.I.',
162
+ 'Chartered M.C.S.I.',
163
+ 'D.B.E.',
164
+ 'D.D.S.',
165
+ 'D.Phil.',
166
+ 'D.V.M.',
167
+ 'Dip. D.M.',
168
+ 'E.A.',
169
+ 'E.R.P.',
170
+ 'Ed.D.',
171
+ 'Ed.M.',
172
+ 'Eng.D.',
173
+ 'Esq.',
174
+ 'F.B.C.S.',
175
+ 'F.C.A.',
176
+ 'F.C.C.A.',
177
+ 'F.C.I.P.S.',
178
+ 'F.C.M.I.',
179
+ 'F.C.S.I.',
180
+ 'F.I.E.T.',
181
+ 'F.I.R.P.',
182
+ 'F.Inst.L.M.',
183
+ 'F.P.C.',
184
+ 'F.R.M.',
185
+ 'F.R.M.',
186
+ 'G.S.P.',
187
+ 'Hons.',
188
+ 'I.F.R.S. Certified',
189
+ 'I.T.I.L. v3',
190
+ 'II',
191
+ 'III',
192
+ 'IV',
193
+ 'J.D.',
194
+ 'Jr.',
195
+ 'K.C.',
196
+ 'L.P.S.',
197
+ 'LL.B.',
198
+ 'LL.D.',
199
+ 'LL.M.',
200
+ 'M.A.',
201
+ 'M.B.A.',
202
+ 'M.B.E.',
203
+ 'M.D.',
204
+ 'M.E.P.',
205
+ 'M.Ed.',
206
+ 'M.Eng.',
207
+ 'M.I.E.T.',
208
+ 'M.Io.D.',
209
+ 'M.Jur.',
210
+ 'M.P.',
211
+ 'M.P.A.',
212
+ 'M.R.I.C.S.',
213
+ 'M.S.',
214
+ 'M.S.F.',
215
+ 'M.S.F.S.',
216
+ 'M.S.P.',
217
+ 'M.Sc. D.',
218
+ 'M.Sc.',
219
+ 'O.B.E.',
220
+ 'O.K.',
221
+ 'O.R.S.C.',
222
+ 'Oxon.',
223
+ 'P.A.',
224
+ 'P.C.C.',
225
+ 'P.F.S.',
226
+ 'P.H.R.',
227
+ 'P.M.C.',
228
+ 'P.M.P.',
229
+ 'P.M.P.',
230
+ 'P.S.P.',
231
+ 'Ph.D.',
232
+ 'Q.C.',
233
+ 'R.D.',
234
+ 'R.F.C.',
235
+ 'R.I.C.P.',
236
+ 'S.C.M.P',
237
+ 'Sr.',
238
+ 'T.M.I.E.T.',
239
+ 'V',
240
+ 'V.M.D.',
81
241
  ],
82
242
  organization: [
83
- 'S. de R.L. de C.V.', 'S.A.P.I. de C.V.', 'y. Cía. S. en C.', 'Private Limited', 'S.M. Pte. Ltd.',
84
- 'Cía. S. C. A.', 'y. Cía. S. C.', 'S.A. de C.V.', 'spol. s.r.o.', '(Pty.) Ltd.', '(Pvt.) Ltd.', 'A.D.S.I.Tz.',
85
- 'S.p. z.o.o.', '(Pvt.)Ltd.', 'akc. spol.', 'Cía. Ltda.', 'E.B.V.B.A.', 'P. Limited', 'S. de R.L.', 'S.I.C.A.V.',
86
- 'S.P.R.L.U.', 'А.Д.С.И.Ц.', '(P.) Ltd.', 'C. por A.', 'Comm.V.A.', 'Ltd. Şti.', 'Plc. Ltd.', 'Pte. Ltd.',
87
- 'Pty. Ltd.', 'Pvt. Ltd.', 'Soc. Col.', 'A.M.B.A.', 'A.S.B.L.', 'A.V.E.E.', 'B.V.B.A.', 'B.V.I.O.', 'C.V.B.A.',
88
- 'C.V.O.A.', 'E.E.I.G.', 'E.I.R.L.', 'E.O.O.D.', 'E.U.R.L.', 'F.M.B.A.', 'G.m.b.H.', 'Ges.b.R.', 'K.G.a.A.',
89
- 'L.L.L.P.', 'Ltd. Co.', 'Ltd. Co.', 'M.E.P.E.', 'n.y.r.t.', 'O.V.E.E.', 'P.E.E.C.', 'P.L.L.C.', 'P.L.L.C.',
90
- 'S. en C.', 'S.a.p.a.', 'S.A.R.L.', 'S.à.R.L.', 'S.A.S.U.', 'S.C.e.I.', 'S.C.O.P.', 'S.C.p.A.', 'S.C.R.I.',
91
- 'S.C.R.L.', 'S.M.B.A.', 'S.P.R.L.', 'Е.О.О.Д.', '&. Cie.', 'and Co.', 'Comm.V.', 'Limited', 'P. Ltd.',
92
- 'Part.G.', 'Sh.p.k.', '&. Co.', 'C.X.A.', 'd.n.o.', 'd.o.o.', 'E.A.D.', 'e.h.f.', 'E.P.E.', 'E.S.V.', 'F.C.P.',
93
- 'F.I.E.', 'G.b.R.', 'G.I.E.', 'G.M.K.', 'G.S.K.', 'H.U.F.', 'K.D.A.', 'k.f.t.', 'k.h.t.', 'k.k.t.', 'L.L.C.',
94
- 'L.L.P.', 'o.h.f.', 'O.H.G.', 'O.O.D.', 'O.y.j.', 'p.l.c.', 'P.S.U.', 'S.A.E.', 'S.A.S.', 'S.C.A.', 'S.C.E.',
95
- 'S.C.S.', 'S.E.M.', 'S.E.P.', 's.e.s.', 'S.G.R.', 'S.N.C.', 'S.p.A.', 'S.P.E.', 'S.R.L.', 's.r.o.', 'Unltd.',
96
- 'V.O.F.', 'V.o.G.', 'v.o.s.', 'V.Z.W.', 'z.r.t.', 'А.А.Т.', 'Е.А.Д.', 'З.А.Т.', 'К.Д.А.', 'О.О.Д.', 'Т.А.А.',
97
- '股份有限公司', 'Ap.S.', 'Corp.', 'ltda.', 'Sh.A.', 'st.G.', 'Ultd.', 'a.b.', 'A.D.', 'A.E.', 'A.G.', 'A.S.',
98
- 'A.Ş.', 'A.y.', 'B.M.', 'b.t.', 'B.V.', 'C.A.', 'C.V.', 'd.d.', 'e.c.', 'E.E.', 'e.G.', 'E.I.', 'E.P.', 'E.T.',
99
- 'E.U.', 'e.v.', 'G.K.', 'G.P.', 'h.f.', 'Inc.', 'K.D.', 'K.G.', 'K.K.', 'k.s.', 'k.v.', 'K.y.', 'L.C.', 'L.P.',
100
- 'Ltd.', 'N.K.', 'N.L.', 'N.V.', 'O.E.', 'O.G.', 'O.Ü.', 'O.y.', 'P.C.', 'p.l.', 'Pty.', 'PUP.', 'Pvt.', 'r.t.',
101
- 'S.A.', 'S.D.', 'S.E.', 's.f.', 'S.L.', 'S.P.', 'S.s.', 'T.K.', 'T.Ü.', 'U.Ü.', 'Y.K.', 'А.Д.', 'І.П.', 'К.Д.',
102
- 'ПУП.', 'С.Д.', 'בע"מ', '任意組合', '匿名組合', '合同会社', '合名会社', '合資会社', '有限会社', '有限公司', '株式会社',
103
- 'A/S', 'G/S', 'I/S', 'K/S', 'P/S', 'S/A'
243
+ # These are sorted in length order: don't alphabetize them.
244
+ 'S. de R.L. de C.V.',
245
+ 'S.A.P.I. de C.V.',
246
+ 'y. Cía. S. en C.',
247
+ 'Private Limited',
248
+ 'S.M. Pte. Ltd.',
249
+ 'Cía. S. C. A.',
250
+ 'y. Cía. S. C.',
251
+ 'S.A. de C.V.',
252
+ 'spol. s.r.o.',
253
+ '(Pty.) Ltd.',
254
+ '(Pvt.) Ltd.',
255
+ 'A.D.S.I.Tz.',
256
+ 'S.p. z.o.o.',
257
+ '(Pvt.)Ltd.',
258
+ 'akc. spol.',
259
+ 'Cía. Ltda.',
260
+ 'E.B.V.B.A.',
261
+ 'P. Limited',
262
+ 'S. de R.L.',
263
+ 'S.I.C.A.V.',
264
+ 'S.P.R.L.U.',
265
+ 'А.Д.С.И.Ц.',
266
+ '(P.) Ltd.',
267
+ 'C. por A.',
268
+ 'Comm.V.A.',
269
+ 'Ltd. Şti.',
270
+ 'Plc. Ltd.',
271
+ 'Pte. Ltd.',
272
+ 'Pty. Ltd.',
273
+ 'Pvt. Ltd.',
274
+ 'Soc. Col.',
275
+ 'A.M.B.A.',
276
+ 'A.S.B.L.',
277
+ 'A.V.E.E.',
278
+ 'B.V.B.A.',
279
+ 'B.V.I.O.',
280
+ 'C.V.B.A.',
281
+ 'C.V.O.A.',
282
+ 'E.E.I.G.',
283
+ 'E.I.R.L.',
284
+ 'E.O.O.D.',
285
+ 'E.U.R.L.',
286
+ 'F.M.B.A.',
287
+ 'G.m.b.H.',
288
+ 'Ges.b.R.',
289
+ 'K.G.a.A.',
290
+ 'L.L.L.P.',
291
+ 'Ltd. Co.',
292
+ 'Ltd. Co.',
293
+ 'M.E.P.E.',
294
+ 'n.y.r.t.',
295
+ 'O.V.E.E.',
296
+ 'P.E.E.C.',
297
+ 'P.L.L.C.',
298
+ 'P.L.L.C.',
299
+ 'S. en C.',
300
+ 'S.a.p.a.',
301
+ 'S.A.R.L.',
302
+ 'S.à.R.L.',
303
+ 'S.A.S.U.',
304
+ 'S.C.e.I.',
305
+ 'S.C.O.P.',
306
+ 'S.C.p.A.',
307
+ 'S.C.R.I.',
308
+ 'S.C.R.L.',
309
+ 'S.M.B.A.',
310
+ 'S.P.R.L.',
311
+ 'Е.О.О.Д.',
312
+ '&. Cie.',
313
+ 'and Co.',
314
+ 'Comm.V.',
315
+ 'Limited',
316
+ 'P. Ltd.',
317
+ 'Part.G.',
318
+ 'Sh.p.k.',
319
+ '&. Co.',
320
+ 'C.X.A.',
321
+ 'd.n.o.',
322
+ 'd.o.o.',
323
+ 'E.A.D.',
324
+ 'e.h.f.',
325
+ 'E.P.E.',
326
+ 'E.S.V.',
327
+ 'F.C.P.',
328
+ 'F.I.E.',
329
+ 'G.b.R.',
330
+ 'G.I.E.',
331
+ 'G.M.K.',
332
+ 'G.S.K.',
333
+ 'H.U.F.',
334
+ 'K.D.A.',
335
+ 'k.f.t.',
336
+ 'k.h.t.',
337
+ 'k.k.t.',
338
+ 'L.L.C.',
339
+ 'L.L.P.',
340
+ 'o.h.f.',
341
+ 'O.H.G.',
342
+ 'O.O.D.',
343
+ 'O.y.j.',
344
+ 'p.l.c.',
345
+ 'P.S.U.',
346
+ 'S.A.E.',
347
+ 'S.A.S.',
348
+ 'S.C.A.',
349
+ 'S.C.E.',
350
+ 'S.C.S.',
351
+ 'S.E.M.',
352
+ 'S.E.P.',
353
+ 's.e.s.',
354
+ 'S.G.R.',
355
+ 'S.N.C.',
356
+ 'S.p.A.',
357
+ 'S.P.E.',
358
+ 'S.R.L.',
359
+ 's.r.o.',
360
+ 'Unltd.',
361
+ 'V.O.F.',
362
+ 'V.o.G.',
363
+ 'v.o.s.',
364
+ 'V.Z.W.',
365
+ 'z.r.t.',
366
+ 'А.А.Т.',
367
+ 'Е.А.Д.',
368
+ 'З.А.Т.',
369
+ 'К.Д.А.',
370
+ 'О.О.Д.',
371
+ 'Т.А.А.',
372
+ '股份有限公司',
373
+ 'Ap.S.',
374
+ 'Corp.',
375
+ 'ltda.',
376
+ 'Sh.A.',
377
+ 'st.G.',
378
+ 'Ultd.',
379
+ 'a.b.',
380
+ 'A.D.',
381
+ 'A.E.',
382
+ 'A.G.',
383
+ 'A.S.',
384
+ 'A.Ş.',
385
+ 'A.y.',
386
+ 'B.M.',
387
+ 'b.t.',
388
+ 'B.V.',
389
+ 'C.A.',
390
+ 'C.V.',
391
+ 'd.d.',
392
+ 'e.c.',
393
+ 'E.E.',
394
+ 'e.G.',
395
+ 'E.I.',
396
+ 'E.P.',
397
+ 'E.T.',
398
+ 'E.U.',
399
+ 'e.v.',
400
+ 'G.K.',
401
+ 'G.P.',
402
+ 'h.f.',
403
+ 'Inc.',
404
+ 'K.D.',
405
+ 'K.G.',
406
+ 'K.K.',
407
+ 'k.s.',
408
+ 'k.v.',
409
+ 'K.y.',
410
+ 'L.C.',
411
+ 'L.P.',
412
+ 'Ltd.',
413
+ 'N.K.',
414
+ 'N.L.',
415
+ 'N.V.',
416
+ 'O.E.',
417
+ 'O.G.',
418
+ 'O.Ü.',
419
+ 'O.y.',
420
+ 'P.C.',
421
+ 'p.l.',
422
+ 'Pty.',
423
+ 'PUP.',
424
+ 'Pvt.',
425
+ 'r.t.',
426
+ 'S.A.',
427
+ 'S.D.',
428
+ 'S.E.',
429
+ 's.f.',
430
+ 'S.L.',
431
+ 'S.P.',
432
+ 'S.s.',
433
+ 'T.K.',
434
+ 'T.Ü.',
435
+ 'U.Ü.',
436
+ 'Y.K.',
437
+ 'А.Д.',
438
+ 'І.П.',
439
+ 'К.Д.',
440
+ 'ПУП.',
441
+ 'С.Д.',
442
+ 'בע"מ',
443
+ '任意組合',
444
+ '匿名組合',
445
+ '合同会社',
446
+ '合名会社',
447
+ '合資会社',
448
+ '有限会社',
449
+ '有限公司',
450
+ '株式会社',
451
+ 'A/S',
452
+ 'G/S',
453
+ 'I/S',
454
+ 'K/S',
455
+ 'P/S',
456
+ 'S/A',
104
457
  ],
105
458
  before: ADFIX_JOINERS, after: '\\z'
106
- }
459
+ },
107
460
  }.freeze
108
461
 
109
462
  ADFIX_PATTERNS = Hash[%i[prefix suffix].map do |adfix_type|