geex = [ { word: "cat", weight: 0.8 }, { word: "LTE", weight: 0.2 }, { word: "girls", weight: 0.1 }, { word: "dog", weight: 0.1 }, { word: "woof", weight: 0.08 }, { word: "meow", weight: 0.2 }, { word: "FML", weight: 0.05 }, { word: "I'm", weight: 0.3 }, { word: "a", weight: 0.3 }]
total = geex.inject(0) {|sum, hash| sum + hash[:weight]}
curr = 0.0
geex.each do |word|
word[:range] = curr..curr+word[:weight]
curr += word[:weight]
end
rnd = Random.new
output = "@allquixotic "
startSentence = true