You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## 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:
12
12
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
+
```
14
22
##### I wanted a proper python application where one can do `import syntaxnet` and play with it.
15
23
16
24
#### 2.1 Pain Part - Syntaxnet is a RESEARCH MODEL:
0 commit comments