diff options
author | Martin Gütlein <martin.guetlein@gmail.com> | 2009-11-24 10:26:17 +0100 |
---|---|---|
committer | Martin Gütlein <martin.guetlein@gmail.com> | 2009-11-24 10:26:17 +0100 |
commit | db65b03dc761f7788dad5bdbfd9e0d7e8376f6cb (patch) | |
tree | 108a823cdd26b0f47360d4a3f45502e52735150c /application.rb | |
parent | 199a350dfda66a918bd52b59e7f511a9cc19fd63 (diff) |
add prediction_feature param
Diffstat (limited to 'application.rb')
-rw-r--r-- | application.rb | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/application.rb b/application.rb index df65cfe..5c1d027 100644 --- a/application.rb +++ b/application.rb @@ -3,4 +3,35 @@ load "validation/validation_application.rb" load "report/report_application.rb" +[ 'rubygems', 'sinatra', 'sinatra/url_for' ].each do |lib| + require lib +end +get '/?' do + + transform_example +end + +private +def transform_example + + file = File.new("EXAMPLES", "r") + res = "" + while (line = file.gets) + res += line + end + file.close + + sub = { "validation_service" => url_for("", :full), + #"validation_id" => "??", + #"model_service" => "??", + #"model_id" => "??", + #"dataset_service" => "??", + "dataset_id" => "Hamster Carcenogenicity"} + + sub.each do |k,v| + res.gsub!(/<#{k}>/,v) + end + + res +end |