Commits

Anonymous committed a969f6e

registered function not instance to server

Comments (0)

Files changed (1)

         pbar.update(5)
         self._server.expect("Entering interactive shell.")
         pbar.finish()
-        print "Server loaded."
+        print "NLP tools loaded."
         #print self._server.before
 
     def parse(self, text):
     options, args = parser.parse_args()
     server = jsonrpc.Server(jsonrpc.JsonRpc20(), 
                             jsonrpc.TransportTcpIp(addr=(options.host, int(options.port))))
-    server.register_instance(StanfordCoreNLP())
+    nlp = StanfordCoreNLP()
+    server.register_function(nlp.parse())
     print 'Serving on http://%s:%s' % (options.host, options.port)
     server.serve()