dwc_agent 1.1.0 → 1.2.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/cleaner.rb +0 -4
- data/lib/dwc_agent/constants.rb +9 -3
- data/lib/dwc_agent/parser.rb +0 -2
- data/lib/dwc_agent/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: dcdfb4922038d07715bd064b74a516203bcce44ef824683ac9766586764bb98f
|
|
4
|
+
data.tar.gz: d9113f199abc420d7c608bfbead6e70f1f6192437a82e43541f77eb187752c2a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 403049856dbfbc83c984b5175615718c738b46312ecced4d3b5853fb4584a080d1e868492ee476187c8cf7238481845c0f77bd181e6ceaeebc22bae8b7aef127
|
|
7
|
+
data.tar.gz: 01e8bc4beb84140a80763c6c0dc8ff6ee6f967e8382cbacf04a230aa3405f2394ec1a90570471e113d90264c1e202c5452428858eb5aff6bc499f4e795dc3158
|
data/lib/dwc_agent/cleaner.rb
CHANGED
|
@@ -22,10 +22,6 @@ module DwcAgent
|
|
|
22
22
|
return blank_name
|
|
23
23
|
end
|
|
24
24
|
|
|
25
|
-
if parsed_namae.family && parsed_namae.family.length < 2 && parsed_namae.family.count('.') == 0
|
|
26
|
-
return blank_name
|
|
27
|
-
end
|
|
28
|
-
|
|
29
25
|
if parsed_namae.family && parsed_namae.family.length == 3 && parsed_namae.family.count('.') == 1
|
|
30
26
|
return blank_name
|
|
31
27
|
end
|
data/lib/dwc_agent/constants.rb
CHANGED
|
@@ -162,9 +162,15 @@ module DwcAgent
|
|
|
162
162
|
^(\S{4,},\s+(?:\S\.\s*){1,})\s+(\S{4,},\s+(?:\S\.\s*){1,})$
|
|
163
163
|
}x
|
|
164
164
|
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
165
|
+
# Was used in 1.1.0 but it sunk performance so threw it back to a WIP
|
|
166
|
+
#
|
|
167
|
+
# @contracted_list_regex = Regexp.new CONTRACTED_LIST.to_s
|
|
168
|
+
#
|
|
169
|
+
# name.gsub!(@contracted_list_regex, '\1 \3 | \2 \3')
|
|
170
|
+
#
|
|
171
|
+
# CONTRACTED_LIST = %r{
|
|
172
|
+
# ^(\S{1,}\.?)+\s+(?i:and|&)\s+(\S{1,}\.?)+\s*(.*)$
|
|
173
|
+
# }x
|
|
168
174
|
|
|
169
175
|
BLACKLIST = %r{
|
|
170
176
|
(?i:abundant)|
|
data/lib/dwc_agent/parser.rb
CHANGED
|
@@ -21,7 +21,6 @@ module DwcAgent
|
|
|
21
21
|
@phrase_subs_regex = Regexp.new (PHRASE_SUBS.keys.join('|')).to_s
|
|
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
|
-
@contracted_list_regex = Regexp.new CONTRACTED_LIST.to_s
|
|
25
24
|
end
|
|
26
25
|
|
|
27
26
|
# Parses the passed-in string and returns a list of names.
|
|
@@ -35,7 +34,6 @@ module DwcAgent
|
|
|
35
34
|
name.gsub!(@phrase_subs_regex, PHRASE_SUBS)
|
|
36
35
|
name.gsub!(@add_separators_regex, '\1 \2')
|
|
37
36
|
name.gsub!(@complex_separators_regex, '\1 | \2')
|
|
38
|
-
name.gsub!(@contracted_list_regex, '\1 \3 | \2 \3')
|
|
39
37
|
name.gsub!(@residual_terminators_regex, '')
|
|
40
38
|
name.squeeze!(' ')
|
|
41
39
|
name.strip!
|
data/lib/dwc_agent/version.rb
CHANGED