pubannotation_evaluator 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/pubannotation-eval +6 -1
- data/lib/pubannotation_evaluator/pubannotation_evaluator.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: 221340084b2e71edebc25671fe196d05f0e17ebeb3b2b9e8bca72c0fd6c42266
|
4
|
+
data.tar.gz: 2c88f506c78a19a43d72c5c009cc40d0c586146b9e13d02bb5075a9460162596
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6ab795d95e7a6e44406932e132c65f0a5391f4a2623bba8d35126cdec68e7ae9c097d2dc2bb7da7e8f9db121d147a9dbf18a52e3b9f9f040bf272efbe468e1f1
|
7
|
+
data.tar.gz: 40efce24c19bfe9b2d4b62065a553a1b218a36703c6e1e2b074462788afabb68fbe3b4fce9ab666fc74e2fe0147bc7405206d02b784db5fcfe5fb6878c7961ac
|
data/bin/pubannotation-eval
CHANGED
@@ -84,6 +84,11 @@ if verbose
|
|
84
84
|
|
85
85
|
false_negatives = comparison.select{|m| m[:study].nil? && m[:reference]}
|
86
86
|
evaluation[:false_negatives] = false_negatives unless false_negatives.empty?
|
87
|
+
|
88
|
+
true_positives = comparison.select{|m| m[:study] && m[:reference]}
|
89
|
+
evaluation[:true_positives] = true_positives unless true_positives.empty?
|
87
90
|
end
|
88
91
|
|
89
|
-
puts JSON.generate(evaluation)
|
92
|
+
puts JSON.generate(evaluation)
|
93
|
+
|
94
|
+
# puts JSON.generate(comparison)
|
@@ -70,8 +70,8 @@ class PubannotationEvaluator
|
|
70
70
|
matches = find_denotation_matches(mmatches)
|
71
71
|
false_positives = study_denotations - matches.collect{|r| r[:study]}
|
72
72
|
false_negatives = reference_denotations - matches.collect{|r| r[:reference]}
|
73
|
-
|
74
|
-
|
73
|
+
study_denotations.each{|r| r.merge!(text:text[r[:span][:begin]...r[:span][:end]])}
|
74
|
+
reference_denotations.each{|r| r.merge!(text:text[r[:span][:begin]...r[:span][:end]])}
|
75
75
|
comparison = matches + false_positives.collect{|s| {study:s}} + false_negatives.collect{|r| {reference:r}}
|
76
76
|
[comparison, mmatches]
|
77
77
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pubannotation_evaluator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jin-Dong Kim
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-12-
|
11
|
+
date: 2021-12-22 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: A tool to evaluate the accuracy of a set of annotations.
|
14
14
|
email: jdkim@dbcls.rois.ac.jp
|