Create simple API for running syntaxnet without rebuilding models
There have been numerous attempts to solve the problem of "streaming" sentences to syntaxnet. None of them are ideal.
It would be great if there was a blessed way to:
- initialize the models (which take several seconds)
- feed sentences to them
- capture the output immediately
In code, this would be something like:
models = initialize_syntaxnet()
while True:
sentence = raw_input("Enter your sentence")
output = tag_and_parse(sentence, models)
print(output)
As it stands now, demo.sh waits until EOF is read, and then outputs everything (and then exits). To run it on another sentence, you have to run the program again (which takes several seconds to bootstrap).
/CC @calberti, can you take a look at this?
I was also wondering about the same thing. Ideally the user could also be able to get the trained model (network), and use it (or a part of it excluding the last layer for instance) as a module in a larger system.
Is this possible now? I am looking for a way to pre-load the models in memory so that I can use them for multiple sentences without having to load the models again and again.
I don't think so @ManojB18. I have the same problem, and I'm waiting on this issue (https://github.com/tensorflow/models/issues/2129) to continue my experiments.
is this possible now ? if yes, How ?
@nardeas seems to know how to do it. The wrapper.py script in his docker image does the trick: https://github.com/nardeas/tensorflow-syntaxnet
Anyone know of any wrappers done with the old syntaxnet that work? Most of what I've been able to find is for dragnn but we've finetuned our downstream analysis for the original syntaxnet already and prefer to continue using it
Hi There, We are checking to see if you still need help on this, as this seems to be considerably old issue. Please update this issue with the latest information, code snippet to reproduce your issue and error you are seeing. If we don't hear from you in the next 7 days, this issue will be closed automatically. If you don't need help on this issue any more, please consider closing this.