8000 registered function not instance to server · TPNguyen/stanford-corenlp-python@a969f6e · GitHub
[go: up one dir, main page]

Skip to content

Commit a969f6e

Browse files
committed
registered function not instance to server
1 parent 1deab19 commit a969f6e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

corenlp.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ def __init__(self):
121121
pbar.update(5)
122122
self._server.expect("Entering interactive shell.")
123123
pbar.finish()
124-
print "Server loaded."
124+
print "NLP tools loaded."
125125
#print self._server.before
126126

127127
def parse(self, text):
@@ -170,6 +170,7 @@ def parse(self, text):
170170
options, args = parser.parse_args()
171171
server = jsonrpc.Server(jsonrpc.JsonRpc20(),
172172
jsonrpc.TransportTcpIp(addr=(options.host, int(options.port))))
173-
server.register_instance(StanfordCoreNLP())
173+
nlp = StanfordCoreNLP()
174+
server.register_function(nlp.parse())
174175
print 'Serving on http://%s:%s' % (options.host, options.port)
175176
server.serve()

0 commit comments

Comments
 (0)
0