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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1f492f0c865db6673ec836d33c24b4d22f73f26e0f957ced3e679cd7b8fe9ae5
4
- data.tar.gz: 01be9be7175842fdb5f217a2870b2734b58c912520c593dd990c2d6783a85fbd
3
+ metadata.gz: f62efd0b64eada9525ead8ffaa19d9530335f845d83dbb9ebb1fcb400f47b4fb
4
+ data.tar.gz: d4a6bf9d36aff4c78c25fab22449c9abad050153a7a7fbc4f100729987d189d7
5
5
  SHA512:
6
- metadata.gz: ffaf46d1e897243a6ff7e87e14797a36e20d6847519797be33ba1a4074cce46fb167de0e942e3288ce5e5f6cbf9f859edf2db76b9fb0fc62693b50397b0bbc9b
7
- data.tar.gz: 0cef53db1ee03d022f0c182e6e1babcec850ec86d18d636ebd8f42d1491732d2aead1279ba81cd6d7b265193a7019f832990b5229ba35008392d73868ca32869
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)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pubannotation_evaluator
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jin-Dong Kim