info.ephyra.answerselection.filters
Class TermFilter

java.lang.Object
  extended by info.ephyra.answerselection.filters.Filter
      extended by info.ephyra.answerselection.filters.TermFilter

public class TermFilter
extends Filter

Drops answer candidates for the 'other' questions in TREC 13-16 that contain answers to previous factoid or list questions.

This class extends the class Filter.

Version:
2008-02-15
Author:
Guido Sautter

Field Summary
private static java.util.HashSet<java.lang.String> previousResultTerms
           
 
Constructor Summary
TermFilter()
           
 
Method Summary
 Result[] apply(Result[] results)
          Filters out snippets that are likely to contain the answer to a previously asked factoid or list question.
static void setPreviousResultsTerms(java.lang.String[] results)
          Sets the previous results so that answer candidates for an 'other' question can be filtered out if they are too close to one of them.
 
Methods inherited from class info.ephyra.answerselection.filters.Filter
apply
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

previousResultTerms

private static final java.util.HashSet<java.lang.String> previousResultTerms
Constructor Detail

TermFilter

public TermFilter()
Method Detail

setPreviousResultsTerms

public static void setPreviousResultsTerms(java.lang.String[] results)
Sets the previous results so that answer candidates for an 'other' question can be filtered out if they are too close to one of them.

Parameters:
results - the results for factoid and list questions (null will clear previous results)

apply

public Result[] apply(Result[] results)
Filters out snippets that are likely to contain the answer to a previously asked factoid or list question. This is to prevent wasting result length with information redundant to the factoid and list questions.

Overrides:
apply in class Filter
Parameters:
results - array of Result objects
Returns:
filtered array of Result objects