Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 8 lines (6 sloc) 303 Bytes
#!/usr/bin/env ruby
Dir["#{File.dirname(__FILE__)}/lib/**/*.rb"].each {|file| require file }
sentences = []
ARGF.each('.') {|s| sentences << s }
frequency_table = WordCounter.new(sentences).sorted_table
puts frequency_table.collect {|row| "#{row[:word]}, #{row[:sentences].count}, #{row[:sentences]}"}
Something went wrong with that request. Please try again.