diff options
author | Patrick Simianer <pks@pks.rocks> | 2018-04-03 11:17:30 +0200 |
---|---|---|
committer | Patrick Simianer <pks@pks.rocks> | 2018-04-03 11:17:30 +0200 |
commit | 2920497fb155cd7285a77c1c01f6d424d8fd30e9 (patch) | |
tree | 0fe4a652f153d39cc2c85aa6eb7026579274a5a2 | |
parent | 93beb31711410183c2d0b1ef7a091272df953a83 (diff) |
fix
-rwxr-xr-x | bitext-filter-length | 2 |
1 files changed, 1 insertions, 1 deletions
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 |