pubannotation_evaluator 1.0.0 → 1.0.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/lib/pubannotation_evaluator/pubannotation_evaluator.rb +12 -4
- 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: f62efd0b64eada9525ead8ffaa19d9530335f845d83dbb9ebb1fcb400f47b4fb
|
4
|
+
data.tar.gz: d4a6bf9d36aff4c78c25fab22449c9abad050153a7a7fbc4f100729987d189d7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 39e123cc7aba4352e4104c62cd78eea63cb27628cb97cb8bd0626302325303193ecaaf39843c5f47efbc3c704c41496874f1ebbc2bcdb6530c40912523142cc3
|
7
|
+
data.tar.gz: 9d62f8b3b79a5001bd2abca68ae78d84b1fc7ae3b66f5ca3673f2e65e419ea424299c4698fb741230f5f2b7578b8b272102bacc68e358a3787c07d2dd1a2ec86
|
@@ -233,14 +233,18 @@ class PubannotationEvaluator
|
|
233
233
|
end
|
234
234
|
|
235
235
|
count_study_match_denotations = begin
|
236
|
-
count = count_study_denotations.transform_values{|v| 0}
|
236
|
+
# count = count_study_denotations.transform_values{|v| 0}
|
237
|
+
count = {}
|
238
|
+
count_study_denotations.each_key{|k| count[k] = 0}
|
237
239
|
study_match_denotations = comparison.select{|m| m[:study] && m[:reference] && m[:type]==:denotation}
|
238
240
|
study_match_denotations.group_by{|m| m[:study][:obj]}.each{|k, m| count[k] = m.inject(0){|s, c| s+=c[:weight]}}
|
239
241
|
count.update('All' => study_match_denotations.inject(0){|s, c| s+=c[:weight]})
|
240
242
|
end
|
241
243
|
|
242
244
|
count_reference_match_denotations = begin
|
243
|
-
count = count_reference_denotations.transform_values{|v| 0}
|
245
|
+
# count = count_reference_denotations.transform_values{|v| 0}
|
246
|
+
count = {}
|
247
|
+
count_reference_denotations.each_key{|k| count[k] = 0}
|
244
248
|
reference_match_denotations = comparison.select{|m| m[:study] && m[:reference] && m[:type]==:denotation}
|
245
249
|
reference_match_denotations.group_by{|m| m[:reference][:obj]}.each{|k, m| count[k] = m.inject(0){|s, c| s+=c[:weight]}}
|
246
250
|
count.update('All' => reference_match_denotations.inject(0){|s, c| s+=c[:weight]})
|
@@ -273,14 +277,18 @@ class PubannotationEvaluator
|
|
273
277
|
end
|
274
278
|
|
275
279
|
count_study_match_relations = begin
|
276
|
-
count = count_study_relations.transform_values{|v| 0}
|
280
|
+
# count = count_study_relations.transform_values{|v| 0}
|
281
|
+
count = {}
|
282
|
+
count_study_relations.each_key{|k| count[k] = 0}
|
277
283
|
study_match_relations = comparison.select{|m| m[:study] && m[:reference] && m[:type]==:relation}
|
278
284
|
study_match_relations.group_by{|m| m[:study][:pred]}.each{|k, m| count[k] = m.inject(0){|s, c| s+=c[:weight]}}
|
279
285
|
count.update('All' => study_match_relations.count)
|
280
286
|
end
|
281
287
|
|
282
288
|
count_reference_match_relations = begin
|
283
|
-
count = count_reference_relations.transform_values{|v| 0}
|
289
|
+
# count = count_reference_relations.transform_values{|v| 0}
|
290
|
+
count = {}
|
291
|
+
count_reference_relations.each_key{|k| count[k] = 0}
|
284
292
|
reference_match_relations = comparison.select{|m| m[:study] && m[:reference] && m[:type]==:relation}
|
285
293
|
reference_match_relations.group_by{|m| m[:reference][:pred]}.each{|k, m| count[k] = m.inject(0){|s, c| s+=c[:weight]}}
|
286
294
|
count.update('All' => reference_match_relations.count)
|