blob: 5149115558f2938e7c208cd688b0758ce7401acd (
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
|
#!/bin/zsh -x
CDEC=~/src/cdec_json_serialization/decoder/cdec
CDEC_MINIMAL=~/src/cdec_json_serialization/decoder/minimal_decoder
WEAVER_PROTOTYPE=../prototype/weaver_proto.rb
FAST_WEAVER=../bin/fast_weaver
CDEC2JSON=./cdec/cdec2json.py
MAKE_PAK=../bin/make_pak
# 1020 \
for example in \
1391 \
1495 \
1570 \
1889 \
2002 \
3 \
429 \
748 \
; do
OUT_DIR=$example/output
mkdir -p $OUT_DIR
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# cdec
#
$CDEC \
-c cdec/default.ini \
-w weights/weights \
-g $example/grammar \
-O $OUT_DIR \
< $example/in \
> $OUT_DIR/cdec.out \
2>$OUT_DIR/cdec.err
mv $OUT_DIR/0.json.gz $OUT_DIR/cdec.json.gz
# +passthrough
$CDEC \
-c cdec/passthrough.ini \
-w weights/weights \
-g $example/grammar \
-O $OUT_DIR \
< $example/in \
> $OUT_DIR/cdec.passthrough.out \
2>$OUT_DIR/cdec.passthrough.err
mv $OUT_DIR/0.json.gz $OUT_DIR/cdec.passthrough.json.gz
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# cdec2json
#
$CDEC2JSON \
-c cdec/default.ini \
-w weights/weights \
-g $example/grammar \
< $example/in \
> $OUT_DIR/cdec2json.json \
2>$OUT_DIR/cdec2json.err
# +passthrough
$CDEC2JSON \
-c cdec/passthrough.ini \
-w weights/weights \
-g $example/grammar \
< $example/in \
> $OUT_DIR/cdec2json.passthrough.json \
2>$OUT_DIR/cdec2json.passthrough.err
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# cdec minimal_decoder
#
$CDEC_MINIMAL \
$OUT_DIR/cdec.json.gz \
weights/weights \
> $OUT_DIR/cdec_minimal.out \
2>$OUT_DIR/cdec_minimal.err
$CDEC_MINIMAL \
$OUT_DIR/cdec.passthrough.json.gz \
weights/weights \
> $OUT_DIR/cdec_minimal.passthrough.out \
2>$OUT_DIR/cdec_minimal.passthrough.err
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# fast_weaver
#
# make pak files first
$MAKE_PAK \
$OUT_DIR/cdec2json.json \
$OUT_DIR/weaver.pak
$MAKE_PAK \
$OUT_DIR/cdec2json.passthrough.json \
$OUT_DIR/weaver.passthrough.pak
$FAST_WEAVER \
$OUT_DIR/weaver.pak \
> $OUT_DIR/fast_weaver.out \
2>$OUT_DIR/fast_weaver.err
$FAST_WEAVER \
$OUT_DIR/weaver.passthrough.pak \
> $OUT_DIR/fast_weaver.passthrough.out \
2>$OUT_DIR/fast_weaver.passthrough.err
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# weaver prototype
#
$WEAVER_PROTOTYPE \
-w weights/weights \
-g $example/grammar \
-i $example/in \
-l \
> $OUT_DIR/weaver_proto.out \
2>$OUT_DIR/weaver_proto.err
# +passthrough
$WEAVER_PROTOTYPE \
-w weights/weights \
-g $example/grammar \
-i $example/in \
-l \
-p \
> $OUT_DIR/weaver_proto.passthrough.out \
2>$OUT_DIR/weaver_proto.passthrough.err
done
|