|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectinfo.ephyra.nlp.semantics.ASSERT
public class ASSERT
A Wrapper for the ASSERT semantic role labeler.
| Field Summary | |
|---|---|
private static boolean |
ASSERT_CLIENT_MODE
Run ASSERT in client mode. |
private static java.lang.String |
ASSERT_DIR
Directory of ASSERT. |
private static java.lang.String |
CACHE_DIR
Cache directory where parses are stored. |
private static boolean |
CACHING
Enable caching of parses. |
private static java.util.regex.Pattern |
PARSE_P
Pattern for extracting parses from ASSERT's output file. |
| Constructor Summary | |
|---|---|
ASSERT()
|
|
| Method Summary | |
|---|---|
static java.lang.String[][] |
annotatePredicates(java.lang.String[] ss)
Annotates the predicates in an array of sentences. |
private static int |
checkLogFile(java.io.File logf)
Checks the log file for ASSERT failures. |
private static java.io.File |
createInputFile(java.lang.String[] ss)
Creates a temporary file containing the sentences to be processed by ASSERT. |
private static java.io.File |
execAssertProcess(java.io.File input)
Instantiates an ASSERT process using the supplied input file. |
private static java.lang.String[][] |
readOutputFile(java.io.File input,
int sentCount)
Reads the annotated sentences from the output file created by ASSERT. |
static java.lang.String |
untokenize(java.lang.String text,
java.lang.String original)
This untokenizer is tailored for ASSERT. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final java.lang.String ASSERT_DIR
private static final boolean ASSERT_CLIENT_MODE
private static final boolean CACHING
private static final java.lang.String CACHE_DIR
private static final java.util.regex.Pattern PARSE_P
| Constructor Detail |
|---|
public ASSERT()
| Method Detail |
|---|
private static java.io.File createInputFile(java.lang.String[] ss)
throws java.lang.Exception
ss - sentences to be parsed
java.lang.Exception
private static java.io.File execAssertProcess(java.io.File input)
throws java.lang.Exception
input - an input file initialized previously with a call to createInputFile()
java.lang.Exception
private static java.lang.String[][] readOutputFile(java.io.File input,
int sentCount)
throws java.lang.Exception
input - an input file initialized previously with a call to createInputFile()sentCount - number of sentences that have been passed to ASSERT
java.lang.Exceptionprivate static int checkLogFile(java.io.File logf)
Integer.MAX_VALUE if ASSERT successfully parsed the
sentences or the index of the last sentence that was parsed if ASSERT failed. -1 indicates that no sentence could
be parsed.
logf - log file
Integer.MAX_VALUE or index of last sentence that was parsedpublic static java.lang.String[][] annotatePredicates(java.lang.String[] ss)
ss - sentences to be parsed
public static java.lang.String untokenize(java.lang.String text,
java.lang.String original)
text - text to untokenizeoriginal - string that contains the original text as a subsequence
null, iff there is no such subsequence
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||