summaryrefslogtreecommitdiff
path: root/sample/freq.rb
diff options
context:
space:
mode:
Diffstat (limited to 'sample/freq.rb')
-rw-r--r--sample/freq.rb12
1 files changed, 0 insertions, 12 deletions
diff --git a/sample/freq.rb b/sample/freq.rb
deleted file mode 100644
index 1b2194c69a..0000000000
--- a/sample/freq.rb
+++ /dev/null
@@ -1,12 +0,0 @@
-# word occurrence listing
-# usage: ruby freq.rb file..
-freq = Hash.new(0)
-while line = gets()
- line.scan(/\w+/) do |word|
- freq[word] += 1
- end
-end
-
-for word in freq.keys.sort!
- print word, " -- ", freq[word], "\n"
-end