Skip to content

Instantly share code, notes, and snippets.

@jonatas
Created March 16, 2016 23:09
Show Gist options
  • Save jonatas/1c95b9807d5723b14320 to your computer and use it in GitHub Desktop.
Save jonatas/1c95b9807d5723b14320 to your computer and use it in GitHub Desktop.
verb = Hash.new { |hash, key| hash[key] = 0 }
Dir["*.md"].each do |filename|
File.readlines(filename).each do |line|
if line =~ /extremamente (\w*) /i
verb[$1] += 1
end
end
end
#verb.reject! { |verb,counter| counter < 3 }
p verb.sort_by{|k,v|v}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment