dwc_agent 1.4.4 → 1.4.5

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
2
  SHA256:
3
- metadata.gz: fa4fb87ea91fd1f0e67278590192a55bfc7f1e8d6f4b8dc92c1f9f5eb508e44c
4
- data.tar.gz: a89b51ea705885713ef8615c67e1ea10798abfe593b5646b4de9fb8e1b478762
3
+ metadata.gz: 7b8890828a04d30f7989f3545df032be216d1bab086f1ec6576cbe93569231bd
4
+ data.tar.gz: d94e120615540e65f29a13132d46b34639e3380e2265439fd05cf5febc580ff6
5
5
  SHA512:
6
- metadata.gz: d676b64441d0097bd6272e2cd694c5754c4bdaed8fd0f523ecbe28748c8ccedffd9dd1c0430f5ad25cf48c02705b8131a9ce1021c07965da0791ae5f62e36c8a
7
- data.tar.gz: 00effae1b438e6d97ef8da8383aa407985876d148b5b30a51ca98d2befa0dc8ac4a8c69bb389f75dd08c147853522490a406470dd8c4aa20d976238cf2cb4d82
6
+ metadata.gz: f2e30d42a8c2d743791c2322a51d3fe022e5ef458f68ebd30763cfc74e5ec9a1914faca1ff90cfb3364bead66cde22bccbc0ab47aef6a7d17a78c6954c8cbeff
7
+ data.tar.gz: d2de0c26c64f77fd273db67465d8772aef5480eb0c4dd1b48446dbb6a6495164bc9e2fbd133280c18ef7e975f82bf9f46dcd65e87727531fa7c514ebc09e0be7
@@ -15,7 +15,6 @@ module DwcAgent
15
15
  \b[,;]?\s*(?i:ann?onymous)\b|
16
16
  \b[,;]?\s*\(?(?i:undetermined|indeterminable|dummy|interim|accession|ill(eg|is)ible|scripsit)\)?\b|
17
17
  \b[,;]?\s*(?i:importer|gift)\:?\b|
18
- \b[,;]?\s*(?i:frère|frere|père|pere|soeur|sister|bro)\.?(\b|\z)|
19
18
  \b[,;]?\s*(?i:string)\b|
20
19
  \b[,;]?\s*(?i:person\s*string)\b|
21
20
  \b[,;]?\s*(?i:colls)\.(\b|\z)|
@@ -154,10 +153,12 @@ module DwcAgent
154
153
  }
155
154
 
156
155
  PHRASE_SUBS = {
157
- 'Dr\.' => 'Dr. ',
158
- 'Mr\.' => 'Mr. ',
159
- 'Mrs\.' => 'Mrs. ',
160
- 'Prof\.' => 'Prof. '
156
+ 'dr\.' => 'Dr. ',
157
+ 'mr\.' => 'Mr. ',
158
+ 'mrs\.' => 'Mrs. ',
159
+ 'prof\.' => 'Prof. ',
160
+ '\, ph\.d\.' => ' Ph.D.',
161
+ '\, bro\.' => ' Bro.'
161
162
  }
162
163
 
163
164
  COMPLEX_SEPARATORS = %r{
@@ -258,6 +259,6 @@ module DwcAgent
258
259
  "has not"
259
260
  ]
260
261
 
261
- TITLE = /\s*\b(sir|count(ess)?|(gen|adm|col|maj|capt|cmdr|lt|sgt|cpl|pvt|prof|dr|md|ph\.?d|rev|docteur|mme|abbé|ptre)\.?|frère|frere|père|pere|professor|esq\.?)(\s+|$)/i
262
+ TITLE = /\s*\b(sir|count(ess)?|(gen|adm|col|maj|capt|cmdr|lt|sgt|cpl|pvt|prof|dr|md|ph\.?d|rev|mme|abbé|ptre|bro|esq)\.?|docteur|father|cantor|vicar|père|pastor|rabbi|reverend|pere|soeur|sister|professor)(\s+|$)/i
262
263
 
263
264
  end
@@ -8,7 +8,7 @@ module DwcAgent
8
8
  end
9
9
 
10
10
  def initialize
11
- options = {
11
+ options = {
12
12
  prefer_comma_as_separator: true,
13
13
  separator: SPLIT_BY,
14
14
  title: TITLE
@@ -18,11 +18,11 @@ module DwcAgent
18
18
  @strip_out_regex = Regexp.new STRIP_OUT.to_s
19
19
  @residual_terminators_regex = Regexp.new SPLIT_BY.to_s + %r{\s*\z}.to_s
20
20
  @char_subs_regex = Regexp.new [CHAR_SUBS.keys.join].to_s
21
- @phrase_subs_regex = Regexp.new (PHRASE_SUBS.keys.join('|')).to_s
21
+ @phrase_subs_regex = Regexp.new((PHRASE_SUBS.keys.join('|')).to_s, Regexp::IGNORECASE)
22
22
  @complex_separators_regex = Regexp.new COMPLEX_SEPARATORS.to_s
23
23
  @add_separators_regex = Regexp.new %r{(\S{1}\.)([[:alpha:]]{2,})}.to_s
24
24
  end
25
-
25
+
26
26
  # Parses the passed-in string and returns a list of names.
27
27
  #
28
28
  # @param names [String] the name or names to be parsed
@@ -42,4 +42,4 @@ module DwcAgent
42
42
  end
43
43
 
44
44
  end
45
- end
45
+ end
@@ -3,7 +3,7 @@ module DwcAgent
3
3
 
4
4
  MAJOR = 1
5
5
  MINOR = 4
6
- PATCH = 4
6
+ PATCH = 5
7
7
  BUILD = nil
8
8
 
9
9
  def self.version
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dwc_agent
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.4
4
+ version: 1.4.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - David P. Shorthouse
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-01-15 00:00:00.000000000 Z
11
+ date: 2020-01-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: namae