diff --git a/sample/freq.rb b/sample/freq.rb index 362753f71f..1b2194c69a 100644 --- a/sample/freq.rb +++ b/sample/freq.rb @@ -1,5 +1,5 @@ # word occurrence listing -# usege: ruby freq.rb file.. +# usage: ruby freq.rb file.. freq = Hash.new(0) while line = gets() line.scan(/\w+/) do |word| diff --git a/sample/occur.rb b/sample/occur.rb index 4ec6ae479b..42151d85e8 100644 --- a/sample/occur.rb +++ b/sample/occur.rb @@ -1,5 +1,5 @@ # word occurrence listing -# usege: ruby occur.rb file.. +# usage: ruby occur.rb file.. freq = Hash.new(0) while line = gets() for word in line.split(/\W+/) diff --git a/sample/occur2.rb b/sample/occur2.rb index ca87d0ddef..ef8ad2c541 100644 --- a/sample/occur2.rb +++ b/sample/occur2.rb @@ -1,5 +1,5 @@ # word occurrence listing -# usege: ruby occur2.rb file.. +# usage: ruby occur2.rb file.. freq = {} ARGF.each_line do |line| for word in line.split(/\W+/)