summaryrefslogtreecommitdiff
path: root/scripts/geoquery/sigf_format.rb
blob: 9d0125baf1a8267d88aa99da39b0b883957a1777 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/env ruby

require 'nlp_ruby'


gold = ReadFile.readlines_strip ARGV[0]
i = -1
while line = STDIN.gets
  i += 1
  line.strip!
  a = [0, 0, 1]
  if line==gold[i]
    a[0] = 1
    a[1] = 1
  elsif line!=''
    a[1] = 1 
  end
  puts a.join " "
end