summaryrefslogtreecommitdiff
path: root/moses_1best
diff options
context:
space:
mode:
authorPatrick Simianer <p@simianer.de>2014-01-29 19:14:08 +0100
committerPatrick Simianer <p@simianer.de>2014-01-29 19:14:08 +0100
commit68acbb9a0c7967cb90a7e3756fc94fdd8a73d154 (patch)
tree3b445131dcb203e94473ae1d8aa82a1798585276 /moses_1best
parent49158e721bfaf6423dca9fc633873218f691c83a (diff)
make use of nlp_ruby, LICENSE
Diffstat (limited to 'moses_1best')
-rwxr-xr-xmoses_1best8
1 files changed, 4 insertions, 4 deletions
diff --git a/moses_1best b/moses_1best
index 5c6bf9d..1a0805d 100755
--- a/moses_1best
+++ b/moses_1best
@@ -1,13 +1,13 @@
#!/usr/bin/env ruby
-STDIN.set_encoding 'utf-8'
-STDOUT.set_encoding 'utf-8'
+require 'nlp_ruby'
+
prev_idx = nil
while line = STDIN.gets
line.strip!
- idx = line.split('|||')[0].to_i
- if idx != prev_idx
+ idx = splitpipe(line)[0].to_i
+ if idx != prev_idx
puts line
prev_idx = idx
end