nlp :: nlp_server
Serializable::inspect
to show more useful information
curl :: native_curl
Binding of C libCurl which allow us to interact with network.serialization :: serialization_core
Abstract services to serialize Nit objects to different formatscore :: union_find
union–find algorithm using an efficient disjoint-set data structure
module nlp_server
import nlp
import config
redef class Config
var opt_java_cp = new OptionString("StanfordNLP java classpath", "-c", "--classpath")
var opt_port = new OptionInt("Server port on localhost (default is 9000)", 9000, "-p", "--port")
redef init do
opts.add_option(opt_java_cp, opt_port)
end
end
var config = new Config
config.parse_options(args)
var cp = config.opt_java_cp.value
if cp == null then cp = "stanfordnlp/*"
var srv = new NLPServer(cp, config.opt_port.value)
srv.start
lib/nlp/examples/nlp_server.nit:15,1--37,9