|
|||||||||
| 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,
String model)
|
|
LexicalizedParserServer(int port,
String model,
LexicalizedParser parser)
|
|
| Method Summary | |
|---|---|
void |
handleParse(String arg,
OutputStream outStream)
Returns the result of applying the parser to arg as a string. |
void |
handleQuit()
Tells the server to exit. |
void |
handleTree(String arg,
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(String[] args)
|
void |
processRequest(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,
String model)
throws IOException
IOException
public LexicalizedParserServer(int port,
String model,
LexicalizedParser parser)
throws IOException
IOException| Method Detail |
|---|
public void listen()
throws IOException
IOException
public void processRequest(Socket clientSocket)
throws IOException
IOExceptionpublic void handleQuit()
public void handleTree(String arg,
OutputStream outStream)
throws IOException
IOException
public void handleParse(String arg,
OutputStream outStream)
throws IOException
IOException
public static void main(String[] args)
throws IOException
IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||