How to get parsey mcparseface tree output programatically
I've read through the README on syntaxnet and figured out how to set everything up and running with the demo.sh file. What i'm unclear about is how i can get the output tree that is created by the demo, and access it programatically so that i can actually make use of the structure. Any help would that could point me in the right direction would be appreciated?
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 and storing the tree as a dictionary. Using the dictionary you could do whatever instead of printing the ascii tree.
Okay this seems to be a good start. Is there not a more official way to go about this, rather than digging through the code? Also, would i need to rebuild the whole project after making some modification there?
This would be a good way to utilize the parse_eval output. I am not part of Google and I am sure thats the whole purpose of open sourcing this, so anyone can make changes as one needs. Well changing the python code would not need a rebuild. If you would change the ops code thats in C then definitely Yes.
Hi Jemar,
Smaran's right, if you tweak the Python code you won't need to rebuild. You can of course add further Python binaries by adding more BUILD rules (at which point you'll need to rebuild).
At this stage we're not suggesting any 'official' way to access SyntaxNet through Python, and could envision running it in a variety of ways from Python or even directly from C++.
Cheers, Daniel