summaryrefslogtreecommitdiff
path: root/example/run.sh
blob: c47a95570d484b8f3f9628cfc5fd8bf91be0814a (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
#!/bin/bash

# stop and start memcached
killall memcached
memcached &

# run lampion with rampion variant for 3 epochs over 30 examples
../lampion.rb \
  -k 100 \
  -i train.in \
  -r train.en \
  -g train.gold \
  -h train.funql \
  -w weights.init \
  -c cdec.ini \
  -t stopwords.en \
  -o output-weights \
  -l \
  -e 0.01 \
  -j 3 \
  -s 30 \
  -v rampion 2> output.stderr > output.stdout

# translate test
/toolbox/cdec-dtrain/decoder/cdec \
  -c cdec.ini \
  -w output-weights.2.gz 2>/dev/null \
  < test.in  \
  | ../scripts/geoquery/semparse.rb \
  | ../scripts/geoquery/query.rb > output-answers

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