public class APELocal extends ACEParser
LD_PRELOAD=/usr/lib/pl-5.6.45/lib/i386-linux/libjpl.so
The exact paths are most probably different on your machine. Just look for the directory that
contains the file or symbolic link libjpl.jnilib (under Mac OS X), jpl.dll
(under Windows), or libjpl.so (under Unix). If you get the error message
java.lang.UnsatisfiedLinkError: no jpl in java.library.path
then this is a strong indication that the SWI Prolog JPL libraries are not found.Modifier and Type | Method and Description |
---|---|
void |
addLexicon(Lexicon lexicon)
Loads the lexicon by adding all lexicon entries of the lexicon.
|
void |
addLexiconEntry(LexiconEntry lexiconEntry)
Adds a new lexicon entry.
|
void |
discardLexicon()
Discards the dynamically added lexicon entries.
|
static APELocal |
getInstance()
Returns the singleton APELocal instance.
|
ACEParserResult |
getMultiOutput(String text,
Lexicon lexicon,
OutputType... outputTypes)
Returns multiple outputs for the given ACE text using the given lexicon.
|
String |
getSoloOutput(String text,
Lexicon lexicon,
OutputType outputType)
Returns one single output for the given ACE text using the given lexicon.
|
static void |
init(String apeExeFile)
Initializes the APELocal singleton instance.
|
static void |
init(String apeExeFile,
boolean guessSwiPrologPath)
Initializes the APELocal singleton instance.
|
static void |
init(String prologCommand,
String apeExeFile)
Deprecated.
|
static boolean |
isInitialized()
Checks whether the singleton instance has already been initialized.
|
getMultiOutput, getSoloOutput, getURI, isClexEnabled, isGuessingEnabled, setClexEnabled, setGuessingEnabled, setURI
public static APELocal getInstance()
public static void init(String apeExeFile, boolean guessSwiPrologPath)
apeExeFile
- The path (with filename) of the file "ape.exe".guessSwiPrologPath
- Guess the location of SWI-Prolog.public static void init(String apeExeFile)
apeExeFile
- The path (with filename) of the file "ape.exe".@Deprecated public static void init(String prologCommand, String apeExeFile)
prologCommand
argument is actually not needed.
Use init(String)
instead.prologCommand
- The command to run the SWI Prolog interpreter.
On Windows this is usually "plcon", on Linux and MacOS "swipl".apeExeFile
- The path (with filename) of the file "ape.exe".public static boolean isInitialized()
public String getSoloOutput(String text, Lexicon lexicon, OutputType outputType) throws ACEParserException
ACEParser
getSoloOutput
in class ACEParser
text
- The ACE text to be parsed.lexicon
- The lexicon to be loaded.outputType
- The kind of output that should be returned.ACEParserException
- Contains the error messages if an error occurred.ACEParser.getMultiOutput(String, Lexicon, OutputType...)
public ACEParserResult getMultiOutput(String text, Lexicon lexicon, OutputType... outputTypes)
ACEParser
getMultiOutput
in class ACEParser
text
- The ACE text to be parsed.lexicon
- The lexicon to be loaded.outputTypes
- The kind of outputs that should be returned.ACEParser.getSoloOutput(String, Lexicon, OutputType)
public void addLexicon(Lexicon lexicon)
lexicon
- The lexicon to be loaded.addLexiconEntry(ch.uzh.ifi.attempto.ape.LexiconEntry)
,
discardLexicon()
public void addLexiconEntry(LexiconEntry lexiconEntry)
lexiconEntry
- The lexicon entry to be added.addLexicon(ch.uzh.ifi.attempto.ape.Lexicon)
,
discardLexicon()
public void discardLexicon()
Copyright © 2013. All Rights Reserved.