Created
August 19, 2009 17:13
-
-
Save msassak/170476 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
start = Time.now | |
puts "Starting to read file ..." | |
num = 0 | |
File.open(ARGV[0]) do |f| | |
f.each { |l| num += l.split.length } | |
end | |
puts "The number of tokens is: #{num}." | |
puts "It took #{(Time.now - start) * 1000} ms" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment