Runs the server on port
.
For more details about the stanford NLP server see https://stanfordnlp.github.io/CoreNLP/corenlp-server.html
nlp :: NLPServer :: defaultinit
core :: Object :: class_factory
Implementation used byget_class
to create the specific class.
nlp :: NLPServer :: defaultinit
core :: Object :: defaultinit
pthreads :: Thread :: defaultinit
core :: Finalizable :: defaultinit
core :: Finalizable :: finalize
Liberate any resources held byself
before the memory holding self
is freed
core :: Object :: is_same_instance
Return true ifself
and other
are the same instance (i.e. same identity).
core :: Object :: is_same_serialized
Isself
the same as other
in a serialization context?
core :: Object :: is_same_type
Return true ifself
and other
have the same dynamic type.
pthreads :: Thread :: main_intern
core :: Object :: native_class_name
The class name of the object in CString format.core :: Object :: output_class_name
Display class name on stdout (debug only).
# Stanford web server
#
# Runs the server on `port`.
#
# For more details about the stanford NLP server see
# https://stanfordnlp.github.io/CoreNLP/corenlp-server.html
class NLPServer
super Thread
# Stanford jar classpath
#
# Classpath to give to Java when loading the StanfordNLP jars.
var java_cp: String
# Port the Java server will listen on
var port: Int
redef fun main do
sys.system "java -mx4g -cp \"{java_cp}\" edu.stanford.nlp.pipeline.StanfordCoreNLPServer -port {port.to_s} -timeout 15000"
return null
end
end
lib/nlp/stanford.nit:301,1--322,3