public class LexicalizedParserServer extends Object
| Constructor and Description |
|---|
LexicalizedParserServer(int port,
ParserGrammar parser) |
LexicalizedParserServer(int port,
String parserModel) |
LexicalizedParserServer(int port,
String parserModel,
String taggerModel) |
| Modifier and Type | Method and Description |
|---|---|
void |
handleDependencies(String arg,
OutputStream outStream,
String commandArgs) |
void |
handleLemma(String arg,
OutputStream outStream) |
void |
handleParse(String arg,
OutputStream outStream,
boolean binarized)
Returns the result of applying the parser to arg as a string.
|
void |
handleQuit()
Tells the server to exit.
|
void |
handleTokenize(String arg,
OutputStream outStream) |
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 |
public LexicalizedParserServer(int port,
String parserModel)
throws IOException
IOExceptionpublic LexicalizedParserServer(int port,
String parserModel,
String taggerModel)
throws IOException
IOExceptionpublic LexicalizedParserServer(int port,
ParserGrammar parser)
throws IOException
IOExceptionpublic void listen()
throws IOException
IOExceptionpublic void processRequest(Socket clientSocket) throws IOException
IOExceptionpublic void handleQuit()
public void handleTokenize(String arg, OutputStream outStream) throws IOException
IOExceptionpublic void handleLemma(String arg, OutputStream outStream) throws IOException
IOExceptionpublic void handleDependencies(String arg, OutputStream outStream, String commandArgs) throws IOException
IOExceptionpublic void handleTree(String arg, OutputStream outStream) throws IOException
IOExceptionpublic void handleParse(String arg, OutputStream outStream, boolean binarized) throws IOException
IOExceptionpublic static void main(String[] args) throws IOException
IOException