diff options
author | Patrick Simianer <simianer@cl.uni-heidelberg.de> | 2014-04-11 11:55:24 +0200 |
---|---|---|
committer | Patrick Simianer <simianer@cl.uni-heidelberg.de> | 2014-04-11 11:55:24 +0200 |
commit | d637e517919852217705a34d1355020a97af2f6a (patch) | |
tree | c8e80ea31f2e9a2b5d683f074dea2b72034cdd38 /scripts/geoquery/sigf_format.rb | |
parent | be45f7b253c23757449103ffe3005107ce9169fa (diff) |
hashing, helper scripts
Diffstat (limited to 'scripts/geoquery/sigf_format.rb')
-rwxr-xr-x | scripts/geoquery/sigf_format.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/scripts/geoquery/sigf_format.rb b/scripts/geoquery/sigf_format.rb new file mode 100755 index 0000000..9d0125b --- /dev/null +++ b/scripts/geoquery/sigf_format.rb @@ -0,0 +1,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 + |