|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.stanford.nlp.parser.server.LexicalizedParserServer
public class LexicalizedParserServer
Serves requests to the given parser model on the given port. See processRequest for a description of the query formats that are handled.
Constructor Summary | |
---|---|
LexicalizedParserServer(int port,
java.lang.String model)
|
|
LexicalizedParserServer(int port,
java.lang.String model,
LexicalizedParser parser)
|
Method Summary | |
---|---|
void |
handleParse(java.lang.String arg,
java.io.OutputStream outStream)
Returns the result of applying the parser to arg as a string. |
void |
handleQuit()
Tells the server to exit. |
void |
handleTree(java.lang.String arg,
java.io.OutputStream outStream)
Returns the result of applying the parser to arg as a serialized tree. |
void |
listen()
Runs in a loop, getting requests from new clients until a client tells us to exit. |
static void |
main(java.lang.String[] args)
|
void |
processRequest(java.net.Socket clientSocket)
Possible commands are of the form: quit parse query: returns a String of the parsed query tree query: returns a serialized Tree of the parsed query |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LexicalizedParserServer(int port, java.lang.String model) throws java.io.IOException
java.io.IOException
public LexicalizedParserServer(int port, java.lang.String model, LexicalizedParser parser) throws java.io.IOException
java.io.IOException
Method Detail |
---|
public void listen() throws java.io.IOException
java.io.IOException
public void processRequest(java.net.Socket clientSocket) throws java.io.IOException
java.io.IOException
public void handleQuit()
public void handleTree(java.lang.String arg, java.io.OutputStream outStream) throws java.io.IOException
java.io.IOException
public void handleParse(java.lang.String arg, java.io.OutputStream outStream) throws java.io.IOException
java.io.IOException
public static void main(java.lang.String[] args) throws java.io.IOException
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |