summaryrefslogtreecommitdiff
path: root/moses-1best
blob: fd35cf84b0558dc08118d7ab9f1e707d15e44f4d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/env ruby

require 'zipf'

prev_idx = nil
while line = STDIN.gets
  line.strip!
  idx = splitpipe(line)[0].to_i
  if idx != prev_idx
    puts line
    prev_idx = idx
  end
end