forked from dsindex/syntaxnet
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathparse.sh
More file actions
executable file
·71 lines (65 loc) · 1.72 KB
/
Copy pathparse.sh
File metadata and controls
executable file
·71 lines (65 loc) · 1.72 KB
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
#!/bin/bash
CDIR=$(readlink -f $(dirname $(readlink -f ${BASH_SOURCE[0]})))
PDIR=$(readlink -f $(dirname $(readlink -f ${BASH_SOURCE[0]}))/..)
SYNTAXNET_HOME=${PDIR}
BINDIR=${SYNTAXNET_HOME}/bazel-bin/syntaxnet
PARSER_EVAL=${BINDIR}/parser_eval
CONLL2TREE=${BINDIR}/conll2tree
MODEL_DIR=${CDIR}/English
CONTEXT=${MODEL_DIR}/context.pbtxt
cd ${PDIR}
${PARSER_EVAL} \
--input=stdin-untoken \
--output=stdin-untoken \
--hidden_layer_sizes=128,128 \
--arg_prefix=brain_tokenizer \
--graph_builder=greedy \
--task_context=${CONTEXT} \
--resource_dir=${MODEL_DIR} \
--model_path=${MODEL_DIR}/tokenizer-params \
--batch_size=32 \
--alsologtostderr \
--slim_model \
| \
${PARSER_EVAL} \
--input=stdin \
--output=stdout-conll \
--hidden_layer_sizes=64 \
--arg_prefix=brain_morpher \
--graph_builder=structured \
--task_context=${CONTEXT} \
--resource_dir=${MODEL_DIR} \
--model_path=${MODEL_DIR}/morpher-params \
--slim_model \
--batch_size=1024 \
--alsologtostderr \
| \
${PARSER_EVAL} \
--input=stdin-conll \
--output=stdout-conll \
--hidden_layer_sizes=64 \
--arg_prefix=brain_tagger \
--graph_builder=structured \
--task_context=${CONTEXT} \
--resource_dir=${MODEL_DIR} \
--model_path=${MODEL_DIR}/tagger-params \
--slim_model \
--batch_size=1024 \
--alsologtostderr \
| \
${PARSER_EVAL} \
--input=stdin-conll \
--output=stdout-conll \
--hidden_layer_sizes=512,512 \
--arg_prefix=brain_parser \
--graph_builder=structured \
--task_context=${CONTEXT} \
--resource_dir=${MODEL_DIR} \
--model_path=${MODEL_DIR}/parser-params \
--slim_model \
--batch_size=1024 \
--alsologtostderr \
| \
${CONLL2TREE} \
--task_context=${MODEL_DIR}/context.pbtxt \
--alsologtostderr