summaryrefslogtreecommitdiff
path: root/example_geoquery/run.sh
blob: 249c859b7948e4d7a7d735e76748e115a203176f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/bash

# memcached has to be running!
#memcached -p 31337

CDEC=/toolbox/cdec

../rebol.rb \
  -k 100 \
  -i $(pwd)/data.in \
  -r $(pwd)/data.en \
  -g $(pwd)/data.gold \
  -h $(pwd)/data.funql \
  -w $(pwd)/../data/weights.init \
  -t $(pwd)/../data/stopwords.en \
  -c $(pwd)/cdec.ini \
  -b $(pwd)/cfg.rb \
  -o output-weights \
  -l \
  -e 0.01 \
  -j 1 \
  -u geoquery \
  -v rebol 2>output.stderr > output.stdout

# translate test
$CDEC/decoder/cdec \
  -c cdec.ini \
  -w output-weights 2>/dev/null \
  < data.in  \
  | ../scripts/geoquery/semparse.rb $(pwd)/cfg.rb \
  | ../scripts/geoquery/query.rb $(pwd)/cfg.rb > output-answers

# evaluate result
../scripts/geoquery/eval.rb \
  data.gold < output-answers > output-eval