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 APEWebservice

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

    public class APEWebservice

extends ACEParser

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

     ./ape.exe -httpserver -port 8000

Author:
  Kaarel Kaljurand, Tobias Kuhn

Constructor Summary
`APEWebservice(java.lang.String wsUrl)` Creates a new parser object based on the URL of a running APE webservice.

Method Summary
`ACEParserResult` | `getMultiOutput(java.lang.String aceText, Lexicon lexicon, OutputType... outputTypes)` Returns multiple outputs for the given ACE text using the given lexicon.
`java.lang.String` | `getSoloOutput(java.lang.String aceText, Lexicon lexicon, OutputType outputType)` Returns one single output for the given ACE text using the given lexicon.
`void` | `setClexEnabled(boolean clexEnabled)` Determines whether the built-in lexicon should be used.
`void` | `setGuessingEnabled(boolean guessing)` Determines whether unknown words should be guessed.
`void` | `setURI(java.lang.String uri)` Sets the namespace URI to be used for outputs like OWL.
`void` | `setWebserviceUrl(java.lang.String wsUrl)` Sets the URL of the APE webservice to be used.

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

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

Constructor Detail

### APEWebservice

    public APEWebservice(java.lang.String wsUrl)

  Creates a new parser object based on the URL of a running APE webservice.

  Parameters:
    `wsUrl` - The URL of the APE webservice.

Method Detail

### setWebserviceUrl

    public void setWebserviceUrl(java.lang.String wsUrl)

  Sets the URL of the APE webservice to be used.

  Parameters:
    `wsUrl` - The URL of the APE webservice.

### getSoloOutput

    public java.lang.String getSoloOutput(java.lang.String aceText,
                                          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:
    `aceText` - 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...)`

### getMultiOutput

    public ACEParserResult getMultiOutput(java.lang.String aceText,
                                          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:
    `aceText` - 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)`

### setURI

    public void setURI(java.lang.String uri)

  Description copied from class: `ACEParser`
  Sets the namespace URI to be used for outputs like OWL.

  Overrides:
    `setURI` in class `ACEParser`
  Parameters:
    `uri` - The namespace URI.

### setGuessingEnabled

    public void setGuessingEnabled(boolean guessing)

  Description copied from class: `ACEParser`
  Determines whether unknown words should be guessed. If false, unknown words lead to an error message. Note that unknown word guessing is not always perfect. The default value is false.

  Overrides:
    `setGuessingEnabled` in class `ACEParser`
  Parameters:
    `guessing` - true if unknown words should be guessed. false otherwise.

### setClexEnabled

    public void setClexEnabled(boolean clexEnabled)

  Description copied from class: `ACEParser`
  Determines whether the built-in lexicon should be used. The default value is true.

  Overrides:
    `setClexEnabled` in class `ACEParser`
  Parameters:
    `clexEnabled` - true if the built-in lexicon should be used. false otherwise.

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)