Permalink
Browse files

Add twitter bootstrap to clean things up

  • Loading branch information...
ryanstout committed Apr 21, 2012
1 parent e2a3e19 commit f02635893e92fb63c2055b171c3e584f47a59a70
View
@@ -18,6 +18,8 @@ group :assets do
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer'
+ # gem 'therubyrhino'
+ gem 'bootstrap-sass'
gem 'uglifier', '>= 1.0.3'
end
View
@@ -29,6 +29,7 @@ GEM
i18n (~> 0.6)
multi_json (~> 1.0)
arel (3.0.2)
+ bootstrap-sass (2.0.2)
builder (3.0.0)
coffee-rails (3.2.2)
coffee-script (>= 2.2.0)
@@ -104,6 +105,7 @@ PLATFORMS
ruby
DEPENDENCIES
+ bootstrap-sass
coffee-rails (~> 3.2.1)
jquery-rails
rails (= 3.2.0)
@@ -1,13 +0,0 @@
-/*
- * This is a manifest file that'll be compiled into application.css, which will include all the files
- * listed below.
- *
- * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
- * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
- *
- * You're free to add application-wide styles to this file and they'll appear at the top of the
- * compiled file, but it's generally better to create a new file per style scope.
- *
- *= require_self
- *= require_tree .
-*/
@@ -0,0 +1,8 @@
+@import "bootstrap";
+@import "sentiment_predictor";
+
+
+#content {
+ width: 500px;
+ margin: 50px auto;
+}
@@ -41,6 +41,10 @@ def create
result = @classifier.distribution_for_instance(instance).first
- render :text => result
+ percent_positive = 1 - result.to_f
+
+ @message = "The text is #{(percent_positive*100.0).round}% positive"
+
+ render :action => 'index'
end
end
@@ -8,7 +8,9 @@
</head>
<body>
-<%= yield %>
+ <div id="content">
+ <%= yield %>
+ </div>
</body>
</html>
@@ -1,6 +1,10 @@
<h1>Sentiment Predictor</h1>
+<% if @message %>
+ <div class="alert"><%= @message %></div>
+<% end %>
+
<%= form_for Sentiment.new do |f| %>
- <%= f.text_area :message %>
- <%= f.submit %>
+ <%= f.text_area :message, :class => 'input-xlarge', :rows => nil %><br />
+ <%= f.submit 'Check Sentiment' %>
<% end %>
@@ -1,4 +1,4 @@
-2012-04-16 14:52:14 weka.gui.GUIChooser main
+2012-04-20 15:17:23 weka.gui.GUIChooser main
INFO: Logging started
Refreshing GOE props...
---Registering Weka Editors---
@@ -9,11 +9,69 @@ Trying to add database driver (JDBC): com.mckoi.JDBCDriver - Warning, not in CLA
Trying to add database driver (JDBC): org.hsqldb.jdbcDriver - Warning, not in CLASSPATH?
[KnowledgeFlow] Loading properties and plugins...
[KnowledgeFlow] Initializing KF...
-2012-04-16 14:52:17 weka.gui.explorer.Explorer <init>
+2012-04-20 15:17:25 weka.gui.explorer.Explorer <init>
INFO: Weka Explorer
-2012-04-16 14:52:17 weka.gui.explorer.Explorer <init>
+2012-04-20 15:17:25 weka.gui.explorer.Explorer <init>
INFO: (c) 1999-2011 The University of Waikato, Hamilton, New Zealand
-2012-04-16 14:52:17 weka.gui.explorer.Explorer <init>
+2012-04-20 15:17:25 weka.gui.explorer.Explorer <init>
INFO: web: http://www.cs.waikato.ac.nz/~ml/weka/
-2012-04-16 14:52:17 weka.gui.explorer.Explorer <init>
-INFO: Started on Monday, 16 April 2012
+2012-04-20 15:17:25 weka.gui.explorer.Explorer <init>
+INFO: Started on Friday, 20 April 2012
+2012-04-20 15:17:41 weka.gui.explorer.PreprocessPanel$14 run
+INFO: Base relation is now Tweets (19998 instances)
+2012-04-20 15:18:37 weka.gui.explorer.PreprocessPanel$15 run
+INFO: Command: weka.filters.unsupervised.attribute.StringToWordVector -R first-last -P w- -W 1000 -prune-rate -1.0 -N 0 -L -stemmer weka.core.stemmers.NullStemmer -M 1 -tokenizer "weka.core.tokenizers.WordTokenizer -delimiters \" \\r\\n\\t.,;:\\\'\\\"()?!\""
+2012-04-20 15:18:39 weka.gui.explorer.PreprocessPanel$14 run
+INFO: Base relation is now Tweets-weka.filters.unsupervised.attribute.StringToWordVector-R1-Pw--W1000-prune-rate-1.0-N0-L-stemmerweka.core.stemmers.NullStemmer-M1-tokenizerweka.core.tokenizers.WordTokenizer -delimiters " \r\n\t.,;:\'\"()?!" (19998 instances)
+2012-04-20 15:19:41 weka.gui.explorer.ClassifierPanel$18 run
+INFO: Started weka.classifiers.functions.LibLINEAR
+2012-04-20 15:19:41 weka.gui.explorer.ClassifierPanel$18 run
+INFO: Command: weka.classifiers.functions.LibLINEAR -S 1 -C 1.0 -E 0.01 -B 1.0
+2012-04-20 15:19:57 weka.gui.explorer.ClassifierPanel$18 run
+INFO: Finished weka.classifiers.functions.LibLINEAR
+Warning : data contains more attributes than can be displayed as attribute bars.
+2012-04-20 15:19:57 weka.gui.visualize.VisualizePanel$PlotPanel addPlot
+INFO: Warning : data contains more attributes than can be displayed as attribute bars.
+2012-04-20 15:26:43 weka.gui.explorer.AttributeSelectionPanel$10 run
+INFO: Started weka.attributeSelection.InfoGainAttributeEval
+2012-04-20 15:26:43 weka.gui.explorer.AttributeSelectionPanel$10 run
+INFO: Command: weka.attributeSelection.InfoGainAttributeEval -s "weka.attributeSelection.Ranker -T -1.7976931348623157E308 -N -1"
+2012-04-20 15:26:43 weka.gui.explorer.AttributeSelectionPanel$10 run
+INFO: Filter command: weka.filters.supervised.attribute.AttributeSelection -E "weka.attributeSelection.InfoGainAttributeEval " -S "weka.attributeSelection.Ranker -T -1.7976931348623157E308 -N -1"
+2012-04-20 15:26:43 weka.gui.explorer.AttributeSelectionPanel$10 run
+INFO: Meta-classifier command: weka.classifiers.meta.AttributeSelectedClassifier -E "weka.attributeSelection.InfoGainAttributeEval " -S "weka.attributeSelection.Ranker -T -1.7976931348623157E308 -N -1" -W weka.classifiers.trees.J48 -- -C 0.25 -M 2
+2012-04-20 15:27:20 weka.gui.explorer.AttributeSelectionPanel$10 run
+INFO: Finished weka.attributeSelection.InfoGainAttributeEval weka.attributeSelection.Ranker
+2012-04-20 15:47:37 weka.gui.explorer.Explorer <init>
+INFO: Weka Explorer
+2012-04-20 15:47:37 weka.gui.explorer.Explorer <init>
+INFO: (c) 1999-2011 The University of Waikato, Hamilton, New Zealand
+2012-04-20 15:47:37 weka.gui.explorer.Explorer <init>
+INFO: web: http://www.cs.waikato.ac.nz/~ml/weka/
+2012-04-20 15:47:37 weka.gui.explorer.Explorer <init>
+INFO: Started on Friday, 20 April 2012
+2012-04-20 15:47:49 weka.gui.explorer.PreprocessPanel$14 run
+INFO: Base relation is now Tweets (19998 instances)
+2012-04-20 15:48:42 weka.gui.explorer.PreprocessPanel$15 run
+INFO: Command: weka.filters.unsupervised.attribute.StringToWordVector -R first-last -P w- -W 1000 -prune-rate -1.0 -N 0 -L -stemmer weka.core.stemmers.NullStemmer -M 1 -tokenizer "weka.core.tokenizers.WordTokenizer -delimiters \" \\r\\n\\t.,;:\\\'\\\"()?!\""
+2012-04-20 15:48:42 weka.gui.explorer.PreprocessPanel$14 run
+INFO: Base relation is now Tweets-weka.filters.unsupervised.attribute.StringToWordVector-R1-Pw--W1000-prune-rate-1.0-N0-L-stemmerweka.core.stemmers.NullStemmer-M1-tokenizerweka.core.tokenizers.WordTokenizer -delimiters " \r\n\t.,;:\'\"()?!" (19998 instances)
+2012-04-20 15:49:39 weka.gui.explorer.ClassifierPanel$18 run
+INFO: Started weka.classifiers.functions.LibLINEAR
+2012-04-20 15:49:39 weka.gui.explorer.ClassifierPanel$18 run
+INFO: Command: weka.classifiers.functions.LibLINEAR -S 1 -C 1.0 -E 0.01 -B 1.0
+2012-04-20 15:49:54 weka.gui.explorer.ClassifierPanel$18 run
+INFO: Finished weka.classifiers.functions.LibLINEAR
+Warning : data contains more attributes than can be displayed as attribute bars.
+2012-04-20 15:49:54 weka.gui.visualize.VisualizePanel$PlotPanel addPlot
+INFO: Warning : data contains more attributes than can be displayed as attribute bars.
+2012-04-20 15:55:47 weka.gui.explorer.AttributeSelectionPanel$10 run
+INFO: Started weka.attributeSelection.InfoGainAttributeEval
+2012-04-20 15:55:47 weka.gui.explorer.AttributeSelectionPanel$10 run
+INFO: Command: weka.attributeSelection.InfoGainAttributeEval -s "weka.attributeSelection.Ranker -T -1.7976931348623157E308 -N -1"
+2012-04-20 15:55:47 weka.gui.explorer.AttributeSelectionPanel$10 run
+INFO: Filter command: weka.filters.supervised.attribute.AttributeSelection -E "weka.attributeSelection.InfoGainAttributeEval " -S "weka.attributeSelection.Ranker -T -1.7976931348623157E308 -N -1"
+2012-04-20 15:55:47 weka.gui.explorer.AttributeSelectionPanel$10 run
+INFO: Meta-classifier command: weka.classifiers.meta.AttributeSelectedClassifier -E "weka.attributeSelection.InfoGainAttributeEval " -S "weka.attributeSelection.Ranker -T -1.7976931348623157E308 -N -1" -W weka.classifiers.trees.J48 -- -C 0.25 -M 2
+2012-04-20 15:56:25 weka.gui.explorer.AttributeSelectionPanel$10 run
+INFO: Finished weka.attributeSelection.InfoGainAttributeEval weka.attributeSelection.Ranker

0 comments on commit f026358

Please sign in to comment.