Can anyone give a example of adding additional output formats to python code ? #SyntaxNet#
I've removed a few flags and args of the models/syntaxnet/syntaxnet/demo.sh, the current code like this.
`PARSER_EVAL=bazel-bin/syntaxnet/parser_eval MODEL_DIR=syntaxnet/models/parsey_mcparseface [[ "$1" == "--conll" ]] && INPUT_FORMAT=stdin-conll || INPUT_FORMAT=stdin
$PARSER_EVAL
--input=$INPUT_FORMAT
--output=stdout-conll
--hidden_layer_sizes=64
--arg_prefix=brain_tagger
--graph_builder=structured
--task_context=$MODEL_DIR/context.pbtxt
--model_path=$MODEL_DIR/tagger-params
--slim_model
--batch_size=1024 `
Can anyone give a example of adding additional output formats to the python code ?
f you go through the master/syntaxnet/syntaxnet/conll2tree.py you should see the basic tensorflow session reading the output of the parse_eval into a sentence class and storing the tree as a dictionary. This is exactly the example you are looking for.
Thanks @smaransmarty!