summaryrefslogtreecommitdiff
path: root/views/summary.haml
diff options
context:
space:
mode:
authorPatrick Simianer <p@simianer.de>2016-06-03 13:36:55 +0200
committerPatrick Simianer <p@simianer.de>2016-06-03 13:36:55 +0200
commit6c62dc57ae90fc6b016da507cae22d96fc128af2 (patch)
tree28e955964b96e7a568517d3f25b2574d86b64e1c /views/summary.haml
parent8596c2775346757c7f7c37e603f015a671f86b88 (diff)
parent0885987afd448fe1aedba7c6a2fdeff64c426623 (diff)
Merge branch 'master' of github.com:pks/lfpe
Diffstat (limited to 'views/summary.haml')
-rw-r--r--views/summary.haml53
1 files changed, 53 insertions, 0 deletions
diff --git a/views/summary.haml b/views/summary.haml
new file mode 100644
index 0000000..29dc0ad
--- /dev/null
+++ b/views/summary.haml
@@ -0,0 +1,53 @@
+- require 'zipf'
+!!!
+%html
+ %head
+ %title Summary (Session #{session_key})
+ %link(rel="stylesheet" type="text/css" href="debug.css")
+ %script{:src => "http://postedit.cl.uni-heidelberg.de/js/jquery.min.js"}
+ %script{:src => "http://postedit.cl.uni-heidelberg.de/js/jquery.tablesorter.min.js"}
+ %script{:src => "http://postedit.cl.uni-heidelberg.de/js/debug.js"}
+ %body
+ %h1 Summary
+ %p (Session #{session_key})
+ %p Data is shown in the MT system's formatting. BLEU is calculated without smoothing.
+ %table
+ %tr
+ %td
+ #{"#"}
+ %td
+ %strong Source
+ %td
+ %strong
+ Post-Edit
+ %td
+ %strong
+ Reference
+ %td
+ %strong
+ BLEU
+ %td
+ %strong
+ TER
+ %td
+ %strong
+ Keystrokes
+ %td
+ %strong
+ Mouse actions
+ %td
+ %strong
+ Duration
+ - data["post_edits"].each_with_index do |pe,j|
+ %tr
+ %td.center #{j+1}.
+ %td #{data["source_segments"][j]}
+ %td #{pe}
+ %td #{data["references"][j]}
+ %td.center #{(BLEU::per_sentence_bleu(pe, [data["references"][j]], 4, 0)*100).round 2}%
+ %td.center #{ter_scores[j]}
+ %td.center #{data["count_kbd"][j]}
+ %td.center #{data["count_click"][j]}
+ %td.center #{(data["durations"][j]/1000).round 1}s
+
+