|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectinfo.ephyra.trec.TREC13To16Parser
public class TREC13To16Parser
A parser for the TREC 13-16 QA tracks.
| Field Summary | |
|---|---|
private static java.util.ArrayList<java.lang.String> |
factoidEntries
Cached log file entries of type "factoid". |
private static java.util.ArrayList<java.lang.String> |
listEntries
Cached log file entries of type "list". |
private static java.util.ArrayList<java.lang.String> |
otherEntries
Cached log file entries of type "other". |
private static java.lang.String[] |
REPLACEMENTS
Replacements for the special characters. |
private static java.lang.String[] |
SPECIALCHARS
Characters that have to be replaced before parsing an XML document. |
| Constructor Summary | |
|---|---|
TREC13To16Parser()
|
|
| Method Summary | |
|---|---|
static void |
dropAllCachedEntries()
Drops the cached entries of all types. |
static void |
dropCachedFactoidEntries()
Drops the cached entries of type "factoid". |
static void |
dropCachedListEntries()
Drops the cached entries of type "list". |
static void |
dropCachedOtherEntries()
Drops the cached entries of type "other". |
static TRECPattern[] |
loadPatterns(java.lang.String filename)
Loads patterns for the factoid or list questions from a file. |
static Result[] |
loadResults(java.lang.String question,
java.lang.String type,
java.lang.String logfile)
Loads the results for a question from a log file. |
static TRECTarget[] |
loadTargets(java.lang.String filename)
Loads the target objects from a file. |
static boolean |
saveAnswers(java.lang.String filename,
TRECAnswer[] answers,
boolean[] correct,
java.lang.String runTag)
Appends answers to an output file. |
| 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[] SPECIALCHARS
private static final java.lang.String[] REPLACEMENTS
private static java.util.ArrayList<java.lang.String> factoidEntries
private static java.util.ArrayList<java.lang.String> listEntries
private static java.util.ArrayList<java.lang.String> otherEntries
| Constructor Detail |
|---|
public TREC13To16Parser()
| Method Detail |
|---|
public static void dropCachedFactoidEntries()
public static void dropCachedListEntries()
public static void dropCachedOtherEntries()
public static void dropAllCachedEntries()
public static TRECTarget[] loadTargets(java.lang.String filename)
filename - file that contains the targets
null, if the file could not be parsedpublic static TRECPattern[] loadPatterns(java.lang.String filename)
filename - file that contains the patterns
null, if the file could not be parsed
public static Result[] loadResults(java.lang.String question,
java.lang.String type,
java.lang.String logfile)
question - the questiontype - the type of question ("factoid", "list" or "other")logfile - the log file
null if the question could not
be found in the log file
public static boolean saveAnswers(java.lang.String filename,
TRECAnswer[] answers,
boolean[] correct,
java.lang.String runTag)
filename - the output fileanswers - the answerscorrect - for each answer a flag that is true iff the answer is
correct or null if the answers were not evaluatedrunTag - tag that uniquely identifies the run
true, iff the answers could be saved
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||