summaryrefslogtreecommitdiff
path: root/bitext-filter-length
diff options
context:
space:
mode:
Diffstat (limited to 'bitext-filter-length')
-rwxr-xr-xbitext-filter-length2
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