Can you output asciitree format when reading from and outputting to a file?
After figuring out the solution to #144, I started checking the output. The format is as follows:
In _ ADP IN _ 0 ROOT _ _ 2 charge _ NOUN NN _ 1 pobj _ _ 3 of _ ADP IN _ 2 prep _ _ 4 managing _ VERB VBG _ 3 pcomp _ _ 5 large _ ADJ JJ _ 8 amod _ _ 6 complex/heavy _ ADJ JJ _ 8 amod _ _ 7 ongoing _ ADJ JJ _ 8 amod _ _ 8 projects _ NOUN NNS _ 4 dobj _ _ 9 -LRB- _ . -LRB- _ 8 punct _ _ 10 strategic _ ADJ JJ _ 12 amod _ _ 11 marketing/public _ ADJ JJ _ 12 amod _ _ 12 relations _ NOUN NNS _ 8 dep _ _ 13 , _ . , _ 12 punct _ _ 14 copy _ NOUN NN _ 12 appos _ _ 15 , _ . , _ 12 punct _ _ 16 design _ NOUN NN _ 12 appos _ _ 17 , _ . , _ 12 punct _ _ 18 web _ NOUN NN _ 19 nn _ _ 19 development _ NOUN NN _ 12 appos _ _ 20 -RRB- _ . -RRB- _ 8 punct _ _ 21 . _ . . _ 1 punct _ _
But if I want to follow the dependency relations, this format is difficult for the human eye. Is there a parameter I can set to output the asciitree format (or some other more readable format)? The only two record_formats I see available in context.pbtxt are conll-sentence and english-text. Are there other formats for output?
Also, I tried using the conll2tree.py script (/models/syntaxnet/syntaxnet/conll2tree.py) at the command line, but only tensorflow is available as a python package (https://github.com/tensorflow/tensorflow/blob/master/tensorflow/g3doc/get_started/os_setup.md). I couldn't find a syntaxnet python package anywhere.
@shaxtell Can you show us your updated code of solving #144
@ColinUNCG,
The only difference was a change in the input and output files in the context.pbtxt. Other than that, I don't know what I was doing wrong. This was the only change I made and reran from the command line. When you feed in the input and output file information in the context.pbtxt, the only thing you need on the command line (from /models/syntaxnet/) is "syntaxnet/demo.sh".
input { name: 'test_data' record_format: 'english-text' Part { file_pattern: 'TestData/Mixed100.txt' } } input { name: 'test_data_out' record_format: 'conll-sentence' Part { file_pattern: 'TestDataOut/test_data_out_mixed.txt' } } input { name: 'test_data_parsed' record_format: 'conll-sentence' Part { file_pattern: 'TestDataOut/test_data_parsed_mixed.txt' } }
if 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. In that you have whatever is needed Write into any format you wish