edu.stanford.nlp.parser.server
Class LexicalizedParserClient

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

public class LexicalizedParserClient
extends java.lang.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(java.lang.String host, int port)
           
 
Method Summary
 java.lang.String getParse(java.lang.String query)
          Returns the String output of the parse of the given query.
 Tree getTree(java.lang.String query)
          Returs a Tree from the server connected to at host:port.
static void main(java.lang.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(java.lang.String host,
                               int port)
                        throws java.io.IOException
Throws:
java.io.IOException
Method Detail

getParse

public java.lang.String getParse(java.lang.String query)
                          throws java.io.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:
java.io.IOException

getTree

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

Throws:
java.io.IOException

sendQuit

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

Throws:
java.io.IOException

main

public static void main(java.lang.String[] args)
                 throws java.io.IOException
Throws:
java.io.IOException


Stanford NLP Group