SyntaxNet - Reduce time for parsing sentence

179 views Asked by At

I am successfully able to parse a sentence using Syntaxnet using following command.

echo 'Bob brought the pizza to Alice.' | syntaxnet/demo.sh

On an average Syntaxnet takes about 4 seconds to parse. I presume the model loads everything each time it is called. is there any way where we can pre-load the model in memory and keep it as such so that I can reduce the time taken. Also, is there any way to reduce the time taken to parse a single sentence.

1

There are 1 answers

0
Xiang Lv On
$ cat test.txt| syntaxnet/demo.sh

In the test.txt, I write two setences:

how are you doing today
i am doing great

The result is as follows:

Input: how are you doing today
Parse:
doing VBG ROOT
 +-- how WRB advmod
 +-- are VBP aux
 +-- you PRP nsubj
 +-- today NN tmod
Input: i am doing great
Parse:
doing VBG ROOT
 +-- i PRP nsubj
 +-- am VBP aux
 +-- great JJ advmod