diff options
Diffstat (limited to 'moses_1best')
-rwxr-xr-x | moses_1best | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/moses_1best b/moses_1best new file mode 100755 index 0000000..5c6bf9d --- /dev/null +++ b/moses_1best @@ -0,0 +1,15 @@ +#!/usr/bin/env ruby + +STDIN.set_encoding 'utf-8' +STDOUT.set_encoding 'utf-8' + +prev_idx = nil +while line = STDIN.gets + line.strip! + idx = line.split('|||')[0].to_i + if idx != prev_idx + puts line + prev_idx = idx + end +end + |