Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## ch.uzh.ifi.attempto.ape
Class APESocket

    java.lang.Object
      ch.uzh.ifi.attempto.ape.ACEParser
          ch.uzh.ifi.attempto.ape.APESocket

    public class APESocket

extends ACEParser

This class provides an interface to the Attempto Parsing Engine (APE) socket server. The socket server implementation is provided by `ape.exe`. To start a server, execute for example:

     ./ape.exe -server -port 2766

Author:
  Kaarel Kaljurand

Constructor Summary
`APESocket(int port)` Constructs a new parser object based on the APE socket server running on "localhost".
`APESocket(java.lang.String host, int port)` Constructs a new parser object based on the hostname and the port number of the APE socket server.

Method Summary
`ACEParserResult` | `getMultiOutput(java.lang.String text, Lexicon lexicon, OutputType... outputTypes)` Returns multiple outputs for the given ACE text using the given lexicon.
`java.lang.String` | `getSoloOutput(java.lang.String text, Lexicon lexicon, OutputType outputType)` Returns one single output for the given ACE text using the given lexicon.
`static void` | `main(java.lang.String[] args)`

Methods inherited from class ch.uzh.ifi.attempto.ape.ACEParser
`getMultiOutput, getSoloOutput, getURI, isClexEnabled, isGuessingEnabled, setClexEnabled, setGuessingEnabled, setURI`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### APESocket

    public APESocket(java.lang.String host,
                     int port)

  Constructs a new parser object based on the hostname and the port number of the APE socket server.

  Parameters:
    `host` - The hostname of the socket server.
    `port` - The port number of the socket server.

### APESocket

    public APESocket(int port)

  Constructs a new parser object based on the APE socket server running on "localhost".

  Parameters:
    `port` - The port number of the socket server.

Method Detail

### getMultiOutput

    public ACEParserResult getMultiOutput(java.lang.String text,
                                          Lexicon lexicon,
                                          OutputType... outputTypes)

  Description copied from class: `ACEParser`
  Returns multiple outputs for the given ACE text using the given lexicon. See the enumeration OutputType for further information about the possible outputs. The result is returned as an ACEParserResult object.

  Specified by:
    `getMultiOutput` in class `ACEParser`
  Parameters:
    `text` - The ACE text to be parsed.
    `lexicon` - The lexicon to be loaded.
    `outputTypes` - The kind of outputs that should be returned.
  Returns:
    A ParserResult object containing the outputs.
  See Also:
    `ACEParser.getSoloOutput(String, Lexicon, OutputType)`

### getSoloOutput

    public java.lang.String getSoloOutput(java.lang.String text,
                                          Lexicon lexicon,
                                          OutputType outputType)
                                   throws ACEParserException

  Description copied from class: `ACEParser`
  Returns one single output for the given ACE text using the given lexicon. See the enumeration OutputType for further information about the possible outputs. If parsing succeeds then a string containing the result of the parser is returned. In the case of failure, an ACEParserException is thrown containing the error messages.

  Specified by:
    `getSoloOutput` in class `ACEParser`
  Parameters:
    `text` - The ACE text to be parsed.
    `lexicon` - The lexicon to be loaded.
    `outputType` - The kind of output that should be returned.
  Returns:
    The result as a string.
  Throws:
    `ACEParserException` - Contains the error messages if an error occurred.
  See Also:
    `ACEParser.getMultiOutput(String, Lexicon, OutputType...)`

### main

    public static void main(java.lang.String[] args)

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 2008, Attempto Group, University of Zurich (see http://attempto.ifi.uzh.ch)