scrappy 0.4.3 → 0.4.4
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.
- data/History.txt +4 -0
- data/lib/scrappy/server/admin.rb +3 -0
- data/lib/scrappy.rb +1 -1
- data/scrappy.gemspec +1 -1
- data/views/test.haml +8 -1
- metadata +2 -2
data/History.txt
CHANGED
data/lib/scrappy/server/admin.rb
CHANGED
@@ -189,6 +189,7 @@ module Scrappy
|
|
189
189
|
precision, recall, fscore = agent.send :metrics, new_output, new_extraction
|
190
190
|
@results[predicate] ||= Hash.new(0.0)
|
191
191
|
@results[predicate][:count] += 1
|
192
|
+
@results[predicate][:triples] = new_output.size
|
192
193
|
@results[predicate][:fscore] += fscore
|
193
194
|
@results[predicate][:precision] += precision
|
194
195
|
@results[predicate][:recall] += recall
|
@@ -201,6 +202,7 @@ module Scrappy
|
|
201
202
|
precision, recall, fscore = agent.send :metrics, new_output, new_extraction
|
202
203
|
@results[type] ||= Hash.new(0.0)
|
203
204
|
@results[type][:count] += 1
|
205
|
+
@results[type][:triples] = new_output.size
|
204
206
|
@results[type][:fscore] += fscore
|
205
207
|
@results[type][:precision] += precision
|
206
208
|
@results[type][:recall] += recall
|
@@ -209,6 +211,7 @@ module Scrappy
|
|
209
211
|
precision, recall, fscore = agent.send :metrics, output, extraction
|
210
212
|
@results[:total] ||= Hash.new(0.0)
|
211
213
|
@results[:total][:count] += 1
|
214
|
+
@results[:total][:triples] = output.size
|
212
215
|
@results[:total][:fscore] += fscore
|
213
216
|
@results[:total][:precision] += precision
|
214
217
|
@results[:total][:recall] += recall
|
data/lib/scrappy.rb
CHANGED
data/scrappy.gemspec
CHANGED
data/views/test.haml
CHANGED
@@ -40,10 +40,17 @@
|
|
40
40
|
|
41
41
|
%h2 Details
|
42
42
|
%p
|
43
|
+
%ul.detail
|
44
|
+
-(@results.keys-[:total]).each do |label|
|
45
|
+
%li
|
46
|
+
%span.name
|
47
|
+
=label
|
48
|
+
%span.date
|
49
|
+
=@results[label][:triples].to_i
|
43
50
|
%ul.detail
|
44
51
|
%li
|
45
52
|
%span.name
|
46
|
-
|
53
|
+
Total triples
|
47
54
|
%span.date
|
48
55
|
=@total
|
49
56
|
%li
|