From 3c20ae7fcba64ec27c8a75651bf8b82bba1c8300 Mon Sep 17 00:00:00 2001 From: Patrick Simianer Date: Wed, 11 Nov 2015 16:17:40 +0100 Subject: a lot of fixes and additions, most notably: also sending json --- views/debug.haml | 36 +++++++++++++++++++++++++++++++----- 1 file changed, 31 insertions(+), 5 deletions(-) (limited to 'views') diff --git a/views/debug.haml b/views/debug.haml index 7e8b164..5b7ad20 100644 --- a/views/debug.haml +++ b/views/debug.haml @@ -5,7 +5,7 @@ %title debug view (session ##{session_key}) %link(rel="stylesheet" type="text/css" href="debug.css") %script{:src =>"http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js", :charset=>"utf-8"} - %script{:src => "http://coltrane.cl.uni-heidelberg.de/lfpe/js/debug.js"} + %script{:src => "http://postedit.cl.uni-heidelberg.de/js/debug.js"} %body %h1 debug view %h2 session ##{session_key} @@ -34,29 +34,55 @@ - [1000,100,10,1,0.1,0.01,0.001,0.0001,0.00001,0.000001,0.0000001,0.00000001,0.000000001,0.0000000001].each do |i| %option{:value => i, :onclick => "window.open(\"http://\"+window.location.host+\"/set_sparse_learning_rate/#{i}\");"} #{i} %table + %tr + %td.noborder + %strong progress: + %td.left #{[0,data2["progress"]-1].max} %tr %td.noborder %strong source: - %td.left #{data["source"]} + %td.left #{data2["source_segments"][[0,data2["progress"]-1].max]} + %tr + %td.noborder + %strong source (original): + %td.left #{data2["raw_source_segments"][[0,data2["progress"]-1].max]} %tr %td.noborder %strong post-edit: - %td.left #{data["target"]} + %td.left #{data2["post_edits_raw"][data2["progress"]-1]} + %tr + %td.noborder + %strong post-edit (processed): + %td.left #{data2["post_edits"][data2["progress"]-1]} %tr %td.noborder %strong original mt: - %td.left #{data["1best"]} + %td.left #{data2["mt_raw"][data2["progress"]-1]} + %tr + %td.noborder + %strong shown mt: + %td.left #{data2["mt"][data2["progress"]-1]} %tr %td.noborder %strong best match (bleu=#{data["best_match_score"]}): %td.left #{data["best_match"]} + %h2 derivation + %pre #{data2["derivations"][data2["progress"]-1]} + %p + %strong processed + - if data2["derivations_proc"][data2["progress"]-1] + %pre #{JSON.pretty_generate(JSON.parse(data2["derivations_proc"][data2["progress"]-1]))} + %h2 manual update + - if data2["feedback"][data2["progress"]-1] + %pre #{JSON.pretty_generate(JSON.parse(data2["feedback"][data2["progress"]-1]))} %h2 meta %p k: #{data["samples_size"]} %p number of updates: #{data["num_up"]} %p updated features: #{data["updated_features"]} %p learning rate: #{data["learning_rate"]} %p learning rate (sparse): #{data["learning_rate_sparse"]} - %p duration: #{data2["durations"][[data2["progress"].to_i-1].max]}ms + %p duration: #{data2["durations"][data2["progress"].to_i-1]}ms + %p updated: #{data2["updated"][data2["progress"].to_i-1]} %h2 additional rules (forced rules) %pre #{additional_rules.join("\n")} -- cgit v1.2.3