uc3-dmp-id 0.1.15 → 0.1.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/uc3-dmp-id/augmenter.rb +3 -2
- data/lib/uc3-dmp-id/comparator.rb +1 -1
- data/lib/uc3-dmp-id/version.rb +1 -1
- 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: 07b0236754af5543d9df3785caaf83230f118babb09b68c1ff9be3d993c24807
|
4
|
+
data.tar.gz: bf3f615dcafdab117909c90251e25619c18b9c0156b287ea6ed34b84c31b1a51
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 667a1a82da392fe2e5a6be5da9e31106c9b472c8120162555ef498acf7e4a622abfb5c03ac804596434809a6942b7bf094b308c6721efd1667fd04cc6b9afa4e
|
7
|
+
data.tar.gz: 8ea7bbb594f44632fa194f36701f82b43594a7edf788bb356e3b52e8bd276630b936660985f1e567b5cc5aebb22a12c15ab37954860a10e2f506bbf062a055a8
|
data/lib/uc3-dmp-id/augmenter.rb
CHANGED
@@ -89,12 +89,13 @@ module Uc3DmpId
|
|
89
89
|
status: 'pending',
|
90
90
|
confidence: work['confidence'],
|
91
91
|
score: work['score'],
|
92
|
-
notes: work['notes']
|
92
|
+
notes: work['notes'],
|
93
|
+
citation: work['citation']
|
93
94
|
}
|
94
95
|
work_type = work.fetch('type', 'Text')&.downcase&.strip
|
95
96
|
ret[:work_type] = work_type == 'text' ? type : work_type
|
96
97
|
@logger&.debug(message: "Assessing Work: #{work['id']} (pre citation)", details: ret)
|
97
|
-
return JSON.parse(ret.to_json) if work['bibtex'].nil?
|
98
|
+
return JSON.parse(ret.to_json) if work['bibtex'].nil? || !ret[:citation].nil?
|
98
99
|
|
99
100
|
ret[:citation] = Uc3DmpCitation::Citer.bibtex_to_citation(uri: work['id'], bibtex_as_string: work['bibtex'])
|
100
101
|
JSON.parse(ret.to_json)
|
@@ -283,7 +283,7 @@ module Uc3DmpId
|
|
283
283
|
last_names_matched = _compare_arrays(array_a: @details_hash.fetch(:last_names, []), array_b: last_names)
|
284
284
|
rors_matched = _compare_arrays(array_a: @details_hash.fetch(:affiliation_ids, []), array_b: rors)
|
285
285
|
affil_names_matched = _compare_arrays(array_a: @details_hash.fetch(:affiliations, []), array_b: affil_names)
|
286
|
-
return response if last_names_matched <= 0
|
286
|
+
return response if last_names_matched <= 0
|
287
287
|
|
288
288
|
response[:score] += last_names_matched + rors_matched + affil_names_matched
|
289
289
|
response[:notes] << 'contributor names and affiliations matched'
|
data/lib/uc3-dmp-id/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: uc3-dmp-id
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.17
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Riley
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-11-
|
11
|
+
date: 2023-11-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|