summaryrefslogtreecommitdiff
path: root/moses_1best
diff options
context:
space:
mode:
authorPatrick Simianer <p@simianer.de>2013-12-05 07:56:38 +0100
committerPatrick Simianer <p@simianer.de>2013-12-05 07:56:38 +0100
commitdb6a6ecfa350cae29739c59df1210d8f76a479c9 (patch)
treef137a001f57f170455c28ce97b5abb2726006cf6 /moses_1best
init
Diffstat (limited to 'moses_1best')
-rwxr-xr-xmoses_1best15
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
+