dwc_agent 1.0.0 → 1.4.1
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/bin/dwcagent +1 -1
- data/bin/dwcagent-similarity +1 -1
- data/lib/dwc_agent/cleaner.rb +0 -4
- data/lib/dwc_agent/constants.rb +10 -2
- data/lib/dwc_agent/parser.rb +1 -1
- data/lib/dwc_agent/version.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e2819869504dd7262508c63978dae9b03cd6380838bf20f1e5ffecb8464b610a
|
4
|
+
data.tar.gz: 3d1afff77e4bea9995cec5a3f72687646cdb6c9f7637bef8444f7a45df4ab556
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 223cdf7a80a54e102da1f35d0b98d420d5a3b4ca1a11494ac3feca73a80d86f83a092b3c8b5dac1e5079a56cb5c69c3771876a091770cb4c9e45de0fc905d177
|
7
|
+
data.tar.gz: 042d702364e285c9e629180802ecd2f1898af1c50ec6fbdcacefa8f117d734db7843fd17e0f816771fcef47c7839ccfa8014d963f6798eaec25e7a3854b88289
|
data/bin/dwcagent
CHANGED
data/bin/dwcagent-similarity
CHANGED
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
@@ -159,7 +159,7 @@ module DwcAgent
|
|
159
159
|
}
|
160
160
|
|
161
161
|
COMPLEX_SEPARATORS = %r{
|
162
|
-
^(
|
162
|
+
^(\S{4,},\s+(?:\S\.\s*){1,})\s+(\S{4,},\s+(?:\S\.\s*){1,})$
|
163
163
|
}x
|
164
164
|
|
165
165
|
BLACKLIST = %r{
|
@@ -198,11 +198,13 @@ module DwcAgent
|
|
198
198
|
(?i:no\s+(agent)?\s?(data|disponible)(\s+available)?)|
|
199
199
|
(?i:not?\s+(entered|stated))|
|
200
200
|
(?i:nomenclatur(e|al)\s+adjustment)|
|
201
|
+
(?i:not\s+available)|
|
201
202
|
(?i:ontario|qu(e|é)bec|saskatchewan|new brunswick|sault|newfoundland|assurance|vancouver|u\.?s\.?s\.?r\.?)|
|
202
203
|
(?i:recreation|culture)|
|
203
204
|
(?i:shaped|dark|pale|areas|phase|spotting|interior|between|closer)|
|
204
205
|
(?i:soci(e|é)t(y|é)|cent(er|re)|community|history|conservation|conference|assoc|class|commission|consortium|council|club|exposit|alliance|protective|circle)|
|
205
206
|
(?i:commercial|company|control|product)|
|
207
|
+
(?i:sequence\s+data)|
|
206
208
|
(?i:size|large|colou?r)\s+|
|
207
209
|
(?i:skeleton)|
|
208
210
|
(?i:survey|assessment|station|monitor|stn\.|index|project|bureau|engine|exchange|ex(c|k)ursi(e|o|ó)n?|exped\.?|exp(e|i)di(c|t)i(e|o|ó)n?|experiment|explora(d|t)|festival|generation|inventory|marine|service)|
|
@@ -213,6 +215,7 @@ module DwcAgent
|
|
213
215
|
\s*(?i:too)\s+|\s*(?i:the)\s+|
|
214
216
|
(?i:taxiderm(ies|y))|
|
215
217
|
(?i:though)|
|
218
|
+
(?i:texas\s+instruments?)\s*?(for)?|
|
216
219
|
(?:tropical)|
|
217
220
|
(?i:toward|seen at)|
|
218
221
|
(?i:unidentified|unspecified|unk?nown|unnamed|unread|unmistak|no agent)|
|
@@ -230,7 +233,12 @@ module DwcAgent
|
|
230
233
|
"of",
|
231
234
|
"curators",
|
232
235
|
"nomenclatural",
|
233
|
-
"adjustment"
|
236
|
+
"adjustment",
|
237
|
+
"available",
|
238
|
+
"data",
|
239
|
+
"orig",
|
240
|
+
"science",
|
241
|
+
"catalogue"
|
234
242
|
]
|
235
243
|
|
236
244
|
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
|
data/lib/dwc_agent/parser.rb
CHANGED
@@ -20,7 +20,7 @@ module DwcAgent
|
|
20
20
|
@char_subs_regex = Regexp.new [CHAR_SUBS.keys.join('\\')].to_s
|
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
|
-
@add_separators_regex = Regexp.new %r{(
|
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.
|
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: 1.
|
4
|
+
version: 1.4.1
|
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: 2019-
|
11
|
+
date: 2019-11-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: namae
|