From bda3b2633935b3e217b17406ed0a379ffb97c2a1 Mon Sep 17 00:00:00 2001 From: Patrick Simianer
Date: Thu, 14 Dec 2017 22:47:21 +0000 Subject: length-ratio --- length-ratio | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 length-ratio (limited to 'length-ratio') 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 + -- cgit v1.2.3