Skip to content

Commit b63fdfe

Browse files
committed
Add a short SceneGraph interface demo
1 parent a0ad82e commit b63fdfe

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

demo/scenegraph.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
"""
2+
Very short demo for the SceneGraph interface in the CoreNLP server
3+
4+
Requires CoreNLP >= 4.5.5, Stanza >= 1.5.1
5+
"""
6+
7+
from stanza.server import CoreNLPClient
8+
9+
# start_server=None is if you have the server running in another process on the same host
10+
# you can start it with whatever normal options CoreNLPClient has
11+
with CoreNLPClient(start_server=None) as client:
12+
result = client.scenegraph("Jennifer's antennae are on her head.")
13+
print(result)
14+
15+

0 commit comments

Comments
 (0)