Skip to content

Instantly share code, notes, and snippets.

View gummibeatz's full-sized avatar

Linus Liang gummibeatz

  • Ingest
  • New York, NY
View GitHub Profile
@gummibeatz
gummibeatz / gist:5732210
Created June 7, 2013 20:32
tokens.json
{"attempts":4,"page_count": 10,"radius":10,"rpp" :100,
"authentication":
{"consumer_key":"JGZXNDxaF05qONatyWbG1Q",
"consumer_secret":"Ip80obhVONbdbIBlEsXhIh8da2mTEtWbPb9QoZIA",
"access_token":"508152927-moXNfwk1y5EFWRjiuq1Dy9u0zc5gNtr60ptMVgVz",
"access_token_secret":"K5X4hu7xXdLNF0Hu1J89YrpjqFGMTpwQ26klk9ljrc"}
}
require 'rubygems'
require 'naive_bayes'
cls = NaiveBayes.new(:yes,:no,:maybe)
#put in words to ignore inside single quotes separated by commas
file=File.readlines('test.txt')
#classifies tweets from each row
require 'rubygems'
require 'naive_bayes'
cls = NaiveBayes.new(:yes,:no,:maybe)
#put in words to ignore inside single quotes separated by commas
file=File.readlines('test.txt')
#classifies tweets from each row
@gummibeatz
gummibeatz / gist:6128173
Last active December 20, 2015 12:08
naive base classifier
require 'rubygems'
require 'naive_bayes'
cls = NaiveBayes.new(:yes,:no,:maybe)
#put in words to ignore inside single quotes separated by commas
file=File.readlines('train_alc.txt')
temp = " "
temps = 2
todo empezo en una noche de mayo cuando el alcohol hizo que rozaras mis labios 8 1
no quiero saber lo que habr pensado de m la cajera cuando ha visto la locura de alcohol que me llevaba 1
courtneyjeppson you know the guy from glee he died from heroin and alcohol he didnt mean to kill himself either he was going to rehab 1
rt niaiisunshines when marcel drank the alcohol i died http t co prjzczvtti 1
rt _harrysbananas when marcel tried the alcohol omfg ksjfsdgjnfld hkmdfj http t co xjlay64dhp 1
se me antojo una cerveza y nada ya se me est n durmiendo los cachetes jajajaja el alcohol no es para mi neta perd n 1
niaiisunshines when marcel drank the alcohol i died http t co 3hoac5mbtz me too 1
en defensa del alcohol debo decir que tom peores decisiones estando sobrio 1
rt angelniall trying alcohol for the first time http t co az4hk92qdb 1
rt hosie_ alcohol u did me dirty http t co mtn6mp1dfb 2
beer girls party drunk alcohol instadaily instagood instagram iphone iphone5 iphonesia http t co odwntrgtla
1
rt eleazargarcia_ te invito a reducir tu velocidad al conducir en pachuca_ deja celular al manejar y no manejes e ingieras alcohol ht
0
rt idrinkifuck when life hands you alcohol get drunk
2
rt giinoo_marquez i wish palm had costcos alcohol prices
0
rt ginger_kaey jesus turn the blood that runs in my veins into alcohol and numb me from pain
1
require 'rubygems'
require 'naive_bayes'
cls = NaiveBayes.new(:yes,:no,:maybe)
#put in words to ignore inside single quotes separated by commas
file=File.readlines('train_alc.txt')
temp = " "
temps = 2
require 'rubygems'
require 'naive_bayes'
cls = NaiveBayes.new(:yes,:no,:maybe)
#put in words to ignore inside single quotes separated by commas
file=File.readlines('train_alc.txt')
temp = " "
temps = 2
require 'rubygems'
require 'naive_bayes'
cls = NaiveBayes.new(:yes,:no,:maybe)
#put in words to ignore inside single quotes separated by commas
file=File.readlines('train_alc.txt')
temp = " "
temps = 2
require 'rubygems'
require 'naive_bayes'
cls = NaiveBayes.new(:yes,:no,:maybe)
#put in words to ignore inside single quotes separated by commas
file=File.readlines('train_alc.txt')
temp = " "
temps = 2