diff options
-rwxr-xr-x | length-ratio | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/length-ratio b/length-ratio new file mode 100755 index 0000000..4b4432d --- /dev/null +++ b/length-ratio @@ -0,0 +1,12 @@ +#!/usr/bin/env ruby + +require 'zipf' + +a = ReadFile.new ARGV[0] +b = ReadFile.new ARGV[1] + +while linea = a.gets + lineb = b.gets + puts linea.strip.split.size.to_f / lineb.strip.split.size.to_f +end + |