summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Simianer <p@simianer.de>2015-10-29 17:53:21 +0100
committerPatrick Simianer <p@simianer.de>2015-10-29 17:53:21 +0100
commit0f5a2e0effc117985e5fe4b94e9c60af4a519a15 (patch)
treede2b0a102fd3738a371fb8b2beb793ff0082b94a
parent8857a34ca0b673990211db8cec451ebaf9488917 (diff)
debug: show add. rules
-rwxr-xr-xserver.rb2
-rw-r--r--views/debug.haml3
2 files changed, 4 insertions, 1 deletions
diff --git a/server.rb b/server.rb
index f5e2ddb..a404b6c 100755
--- a/server.rb
+++ b/server.rb
@@ -327,7 +327,7 @@ get '/debug' do # debug view
end
- haml :debug, :locals => { :data => data, :data2 => data2, :session_key => SESSION_KEY }
+ haml :debug, :locals => { :data => data, :data2 => data2, :additional_rules => $additional_rules, :session_key => SESSION_KEY }
end
get '/confirm' do # client confirms received translation
diff --git a/views/debug.haml b/views/debug.haml
index 5ca709c..7e8b164 100644
--- a/views/debug.haml
+++ b/views/debug.haml
@@ -57,6 +57,9 @@
%p <strong>learning rate:</strong> #{data["learning_rate"]}
%p <strong>learning rate (sparse):</strong> #{data["learning_rate_sparse"]}
%p <strong>duration:</strong> #{data2["durations"][[data2["progress"].to_i-1].max]}ms
+ %h2
+ additional rules (forced rules)
+ %pre #{additional_rules.join("\n")}
%h2 k-best
%p bleu | model score | original rank | \|e\| | translation \n features
%p.red update needed ("any of the above hypotheses has a lower model score")