info.ephyra.trec
Class TREC8To12Parser

java.lang.Object
  extended by info.ephyra.trec.TREC8To12Parser

public class TREC8To12Parser
extends java.lang.Object

A parser for the TREC 8-12 QA tracks.

Version:
2007-05-25
Author:
Nico Schlaefer

Field Summary
private static java.lang.String QTYPE
          Type of the TREC 8 to 11 questions.
 
Constructor Summary
TREC8To12Parser()
           
 
Method Summary
static TRECPattern[] loadPatterns(java.lang.String filename)
          Loads the patterns from a file.
static TRECPattern[] loadPatternsAligned(java.lang.String filename)
          Loads the patterns from a file.
static TRECQuestion[] loadQuestions(java.lang.String filename)
          Loads the questions from a file.
static TRECAnswer[] loadTREC9Answers(java.lang.String filename)
          Loads the answers to the TREC9 questions from a file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

QTYPE

private static final java.lang.String QTYPE
Type of the TREC 8 to 11 questions.

See Also:
Constant Field Values
Constructor Detail

TREC8To12Parser

public TREC8To12Parser()
Method Detail

loadQuestions

public static TRECQuestion[] loadQuestions(java.lang.String filename)
Loads the questions from a file.

Parameters:
filename - file that contains the questions
Returns:
questions or null, if the file could not be parsed

loadPatterns

public static TRECPattern[] loadPatterns(java.lang.String filename)
Loads the patterns from a file.

Parameters:
filename - file that contains the patterns
Returns:
patterns or null, if the file could not be parsed

loadPatternsAligned

public static TRECPattern[] loadPatternsAligned(java.lang.String filename)
Loads the patterns from a file. For each skipped question ID in the input file, a null entry is added to the array of patterns.

Parameters:
filename - file that contains the patterns
Returns:
patterns aligned to question IDs or null, if the file could not be parsed

loadTREC9Answers

public static TRECAnswer[] loadTREC9Answers(java.lang.String filename)
Loads the answers to the TREC9 questions from a file.

Parameters:
filename - file that contains the answers
Returns:
answers or null, if the file could not be parsed