From 2920497fb155cd7285a77c1c01f6d424d8fd30e9 Mon Sep 17 00:00:00 2001 From: Patrick Simianer Date: Tue, 3 Apr 2018 11:17:30 +0200 Subject: fix --- bitext-filter-length | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bitext-filter-length b/bitext-filter-length index f3ed800..7f82a65 100755 --- a/bitext-filter-length +++ b/bitext-filter-length @@ -28,7 +28,7 @@ def main sza = linea.strip.split.size szb = lineb.strip.split.size ratio = sza.to_f/szb.to_f - if sza <= conf[:ignore_below] and szb <= conf[:ignore_below] or + if (sza > 0 and sza <= conf[:ignore_below] and szb > 0 and szb <= conf[:ignore_below]) or (sza >= conf[:min_len] and szb >= conf[:min_len] and sza <= conf[:max_len] and szb <= conf[:max_len] and ratio >= ratio_lower and -- cgit v1.2.3