Skip to content

Commit fdd7c0e

Browse files
authored
Update README.md
1 parent 2b06e8d commit fdd7c0e

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,17 @@ When Google declared that [The World’s Most Accurate Parser i.e., SyntaxNet go
88
<img src="https://github.com/tensorflow/models/blob/master/research/syntaxnet/g3doc/images/looping-parser.gif" width="500" height="300"/>
99

1010
## 2. Troubles of the world's best parser SyntaxNet
11-
Majority of the exmples on its usage are done in 2 ways:
11+
Predominantly one will find two approaches to use SyntaxNet:
1212
1. Using (demo.sh)[https://github.com/tensorflow/models/blob/master/research/syntaxnet/syntaxnet/demo.sh] script provided by syntaxnet
13-
2. Invoke the same from python as a subprocess (which is not a scalable approach).
13+
2. Invoke the same from python as a subprocess as shown below. This approach is obviously inefficient, non-scalable and over-kill as it internally calls two other python scripts (parser_eval and conll2tree).
14+
```markdown
15+
import subprocess
16+
import os
17+
os.chdir(r"../models/syntaxnet")
18+
subprocess.call([
19+
"echo 'Bob brought the pizza to Alice.' | syntaxnet/demo.sh"
20+
], shell = True)
21+
```
1422
##### I wanted a proper python application where one can do `import syntaxnet` and play with it.
1523

1624
#### 2.1 Pain Part - Syntaxnet is a RESEARCH MODEL:

0 commit comments

Comments
 (0)