summaryrefslogtreecommitdiff
path: root/views/debug.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/debug.haml
parent8596c2775346757c7f7c37e603f015a671f86b88 (diff)
parent0885987afd448fe1aedba7c6a2fdeff64c426623 (diff)
Merge branch 'master' of github.com:pks/lfpe
Diffstat (limited to 'views/debug.haml')
-rw-r--r--views/debug.haml124
1 files changed, 63 insertions, 61 deletions
diff --git a/views/debug.haml b/views/debug.haml
index 3c1e006..17f7f86 100644
--- a/views/debug.haml
+++ b/views/debug.haml
@@ -14,8 +14,9 @@
%p.red
%strong No data to show!
%ul
- %li
- %a{ :href => "#controls" } Controls
+ -if admin
+ %li
+ %a{ :href => "#controls" } Controls
%li
%a{ :href => "#post_edit" } Post-edit
%li
@@ -31,63 +32,64 @@
%p.tiny Session: #{session_key}
/=#########################################################################
- %h2#controls Controls
- %h3 Reset
- %p
- %strong [Server reply]
- %span#control_reply
- %ul
- %li
- %a.ajax{:tgt => "/reset_progress", :href => "#controls"} Reset progress
- %li
- %a.ajax{:tgt => "/reset_weights", :href => "#controls"} Reset weights
- %li
- %a.ajax{:tgt => "/reset_learning_rates", :href => "#controls"} Reset learning rates
- /
+ -if admin
+ %h2#controls Controls
+ %h3 Reset
+ %p
+ %strong [Server reply]
+ %span#control_reply
+ %ul
%li
- %a.ajax{:tgt => "/reset_extractor", :href => "#controls"} Reset extractor
- %li
- %a.ajax{:tgt => "/reset_grammars", :href => "#controls"} Reset grammars
- %li
- %a.ajax{:tgt => "/reset_new_rules", :href => "#controls"} Reset new rules
- /
+ %a.ajax{:tgt => "/reset_progress", :href => "#controls"} Reset progress
%li
- %a.ajax{:tgt => "/shutdown", :href => "#controls"} Initiate shutdown
- %h3 Learning rates &amp; weights
- %p Get current weight/rate for specific features:
- %input#features_get{ :value => "Feature", :style => "text-align:center; width:20em" }
- %select#features_type_get
- %option{ :value => "/get_weight" } Weight
- %option{ :value => "/get_rate" } Rate
- %input#features_value_get{ :value => " ", :style => "text-align:right; width:10em" }
- %button#get_features
- Get
- %p Set weight/rate for specific features:
- %input#features{ :value => "Feature", :style => "text-align:center; width:20em" }
- %select#features_type
- %option{ :value => "/set_weights" } Weight
- %option{ :value => "/set_learning_rates" } Rate
- %input#features_value{ :value => "1e-05", :style => "text-align:right; width:10em" }
- %button#set_features
- Set
- %p
- Set rate for feature groups:
- %span.tiny (Features unseen in training/tuning have a common default rate.)
- %select#feature_groups_get
- %option{ :value => "R" } rule ids
- %option{ :value => "RB" } rule bigrams
- %option{ :value => "Shape" } rule shapes
- %input#feature_groups_value_get{ :value => "1e-05", :style => "text-align:right; width:10em" }
- %button#get_feature_groups
- Get rate
- %br
- %select#feature_groups
- %option{ :value => "R" } rule ids
- %option{ :value => "RB" } rule bigrams
- %option{ :value => "Shape" } rule shapes
- %input#feature_groups_value{ :value => "1e-05", :style => "text-align:right; width:10em" }
- %button#set_feature_groups
- Set rate
+ %a.ajax{:tgt => "/reset_weights", :href => "#controls"} Reset weights
+ %li
+ %a.ajax{:tgt => "/reset_learning_rates", :href => "#controls"} Reset learning rates
+ /
+ %li
+ %a.ajax{:tgt => "/reset_extractor", :href => "#controls"} Reset extractor
+ %li
+ %a.ajax{:tgt => "/reset_grammars", :href => "#controls"} Reset grammars
+ %li
+ %a.ajax{:tgt => "/reset_new_rules", :href => "#controls"} Reset new rules
+ /
+ %li
+ %a.ajax{:tgt => "/shutdown", :href => "#controls"} Initiate shutdown
+ %h3 Learning rates &amp; weights
+ %p Get current weight/rate for specific features:
+ %input#features_get{ :value => "Feature", :style => "text-align:center; width:20em" }
+ %select#features_type_get
+ %option{ :value => "/get_weight" } Weight
+ %option{ :value => "/get_rate" } Rate
+ %input#features_value_get{ :value => " ", :style => "text-align:right; width:10em" }
+ %button#get_features
+ Get
+ %p Set weight/rate for specific features:
+ %input#features{ :value => "Feature", :style => "text-align:center; width:20em" }
+ %select#features_type
+ %option{ :value => "/set_weights" } Weight
+ %option{ :value => "/set_learning_rates" } Rate
+ %input#features_value{ :value => "1e-05", :style => "text-align:right; width:10em" }
+ %button#set_features
+ Set
+ %p
+ Set rate for feature groups:
+ %span.tiny (Features unseen in training/tuning have a common default rate.)
+ %select#feature_groups_get
+ %option{ :value => "R" } rule ids
+ %option{ :value => "RB" } rule bigrams
+ %option{ :value => "Shape" } rule shapes
+ %input#feature_groups_value_get{ :value => "1e-05", :style => "text-align:right; width:10em" }
+ %button#get_feature_groups
+ Get rate
+ %br
+ %select#feature_groups
+ %option{ :value => "R" } rule ids
+ %option{ :value => "RB" } rule bigrams
+ %option{ :value => "Shape" } rule shapes
+ %input#feature_groups_value{ :value => "1e-05", :style => "text-align:right; width:10em" }
+ %button#set_feature_groups
+ Set rate
/=#########################################################################
@@ -109,14 +111,14 @@
%td.left.noborder ##{[0,progress].max}
%tr
%td.noborder
- %strong MT Input:
- %td.left.noborder #{data["source_segments"][[0,progress].max]}
- %tr
- %td.noborder
%strong Raw source:
%td.left.noborder #{data["raw_source_segments"][[0,progress].max]}
%tr
%td.noborder
+ %strong MT Input:
+ %td.left.noborder #{data["source_segments"][[0,progress].max]}
+ %tr
+ %td.noborder
%strong Post-edit:
%td.left.noborder #{data["post_edits_raw"][progress]}
%tr