edu.stanford.nlp.parser.server
Class LexicalizedParserClient

java.lang.Object
  extended by edu.stanford.nlp.parser.server.LexicalizedParserClient

public class LexicalizedParserClient
extends Object

The sister class to LexicalizedParserServer. This class connects to the given host and port. It can then either return a Tree or a string with the output of the Tree, depending on the method called. getParse gets the string output, getTree returns a Tree.


Constructor Summary
LexicalizedParserClient(String host, int port)
           
 
Method Summary
 String getParse(String query)
          Returns the String output of the parse of the given query.
 Tree getTree(String query)
          Returs a Tree from the server connected to at host:port.
static void main(String[] args)
           
 void sendQuit()
          Tell the server to exit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LexicalizedParserClient

public LexicalizedParserClient(String host,
                               int port)
                        throws IOException
Throws:
IOException
Method Detail

getParse

public String getParse(String query)
                throws IOException
Returns the String output of the parse of the given query.
The "parse" method in the server is mostly useful for clients using a language other than Java who don't want to import or wrap Tree in any way. However, it is useful to provide getParse to test that functionality in the server.

Throws:
IOException

getTree

public Tree getTree(String query)
             throws IOException
Returs a Tree from the server connected to at host:port.

Throws:
IOException

sendQuit

public void sendQuit()
              throws IOException
Tell the server to exit

Throws:
IOException

main

public static void main(String[] args)
                 throws IOException
Throws:
IOException


Stanford NLP Group