dwc_agent 3.0.0.8 → 3.0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/dwc_agent/constants.rb +4 -3
- data/lib/dwc_agent/parser.rb +2 -3
- data/lib/dwc_agent/version.rb +2 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a9428270164619d86464c072066fc6ca0abb8f29fa5453bee14e9213a50d2436
|
4
|
+
data.tar.gz: ef6dea822f19594773883268e1100baaabadcba660065a9d862de6df792256b2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6c778778f63294ea9844a1ee3bfc042b51da618811e43118a2487d304d826089b10025c01df98d3c1cdb8fccd1828d320ca10207e140d43bd7ce0745efabbb79
|
7
|
+
data.tar.gz: da216fa168e39240066d7fb6f93c63d7e66a822679623104b7c8fadacf03ac822e78c772a9b69392584319691d277685ba953d7bbc43d71c3cbee460e8b95d53
|
data/lib/dwc_agent/constants.rb
CHANGED
@@ -124,7 +124,8 @@ module DwcAgent
|
|
124
124
|
(?i:ex\.?\s+herb\.?\s*)|
|
125
125
|
\:?\s*(?i:exch)(\b|\z)|
|
126
126
|
\s+de\s*$|
|
127
|
-
\.{2,}
|
127
|
+
\.{2,}$|
|
128
|
+
\[|\]
|
128
129
|
}x
|
129
130
|
|
130
131
|
SPLIT_BY = %r{
|
@@ -200,6 +201,7 @@ module DwcAgent
|
|
200
201
|
"^(\\S{4,},\\s+(?:\\S\\.\\s*){1,})\\s+(\\S{4,},\\s+(?:\\S\.\\s*){1,})$" => "\\1 | \\2",
|
201
202
|
"(\\S{1}\\.)([[:alpha:]]{2,})" => "\\1 \\2",
|
202
203
|
"([[:alpha:]]*),?\\s+(.*)\\s+(van|von)$" => "\\3 \\1, \\2",
|
204
|
+
"^([A-Z.\\s]+)\\s+(?:and|&|et|e)\\s+([A-Z.\\s]+)\\s+([[:alpha:]]{2,})\\s+([[:alpha:]]{2,})$" => "\\1 \\4 | \\2 \\3 \\4",
|
203
205
|
"^([A-Z.\\s]+)\\s+(?:and|&|et|e)\\s+([A-Z.\\s]+)\\s+([[:alpha:]]{2,})(.*)" => "\\1 \\3 | \\2 \\3 | \\4",
|
204
206
|
"^([A-Z][[:alpha:]]{2,}),\\s*?([A-Z][[:alpha:]]{2,})\\s*?[,&]\\s*?([A-Z][[:alpha:]]{2,})$" => "\\1 | \\2 | \\3",
|
205
207
|
"^([A-Z][[:alpha:]]{2,}),\\s*?([A-Z][[:alpha:]]{2,}),\\s*?([A-Z][[:alpha:]]{2,})\\s*?[,&]\\s*?([A-Z][[:alpha:]]{3,})$" => "\\1 | \\2 | \\3 | \\4",
|
@@ -261,8 +263,7 @@ module DwcAgent
|
|
261
263
|
(?i:submersible)|
|
262
264
|
(?i:synonymy?)|
|
263
265
|
(?i:systematic|perspective)|
|
264
|
-
|
265
|
-
\s*(?i:too)\s+|\s*(?i:the)\s+|
|
266
|
+
^\s*(?i:off|too|the)\s*|
|
266
267
|
(?i:taxiderm(ies|y))|
|
267
268
|
(?i:though)|
|
268
269
|
(?i:texas\s+instruments?)\s*?(for)?|
|
data/lib/dwc_agent/parser.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
module DwcAgent
|
2
|
+
|
2
3
|
class Parser
|
3
4
|
|
4
5
|
class << self
|
@@ -29,9 +30,7 @@ module DwcAgent
|
|
29
30
|
def parse(name)
|
30
31
|
return [] if name.nil? || name == ""
|
31
32
|
name.gsub!(@strip_out_regex, ' ')
|
32
|
-
name.gsub!(
|
33
|
-
name.gsub!(@char_subs_regex, CHAR_SUBS)
|
34
|
-
name.gsub!(@phrase_subs_regex, PHRASE_SUBS)
|
33
|
+
name.gsub!(Regexp.union(@char_subs_regex, @phrase_subs_regex), CHAR_SUBS.merge(PHRASE_SUBS))
|
35
34
|
SEPARATORS.each{|key, value| name.gsub!(Regexp.new(key), value)}
|
36
35
|
name.gsub!(@residual_terminators_regex, '')
|
37
36
|
name.squeeze!(' ')
|
data/lib/dwc_agent/version.rb
CHANGED
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: 3.0.0
|
4
|
+
version: 3.0.1.0
|
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: 2022-
|
11
|
+
date: 2022-08-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: namae
|
@@ -119,7 +119,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
119
119
|
- !ruby/object:Gem::Version
|
120
120
|
version: '0'
|
121
121
|
requirements: []
|
122
|
-
rubygems_version: 3.
|
122
|
+
rubygems_version: 3.3.17
|
123
123
|
signing_key:
|
124
124
|
specification_version: 4
|
125
125
|
summary: Parse Darwin Core agent terms such as recordedBy and identifiedBy
|