info.ephyra.answerselection.filters
Class OverlapAnalysisFilter

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

public class OverlapAnalysisFilter
extends Filter

Generates overlap analyses for different answer extraction strategies. The filter can be added at more than one point in the pipeline, using different IDs to generate independent analyses.

This class extends the class Filter.

Version:
2008-02-10
Author:
Nico Schlaefer

Field Summary
private static java.util.Hashtable<java.lang.String,java.util.Hashtable<java.lang.String,java.lang.Integer>> analyses
          Overlap analyses, usually at different points in the pipeline.
private  java.util.Hashtable<java.lang.String,java.lang.Integer> overlapAnalysis
          Current overlap analysis.
private static TRECPattern pattern
          Pattern used to evaluate answer candidates.
private  boolean printing
          If this flag is set, an overlap analysis is printed every time the filter is applied.
 
Constructor Summary
OverlapAnalysisFilter(java.lang.String id, boolean printing)
          Creates the filter and adds an overlap analysis for the given ID if it did not occur before.
 
Method Summary
 Result[] apply(Result[] results)
          Evaluates the answer candidates and updates the current overlap analysis.
 java.util.Hashtable<java.lang.String,java.lang.Integer> getOverlapAnalysis()
          Returns the current overlap analysis.
 void printOverlapAnalysis()
          Prints the current overlap analysis.
static void setPattern(TRECPattern pattern)
          Sets the current pattern used to evaluate answer candidates.
 
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

pattern

private static TRECPattern pattern
Pattern used to evaluate answer candidates.


analyses

private static java.util.Hashtable<java.lang.String,java.util.Hashtable<java.lang.String,java.lang.Integer>> analyses
Overlap analyses, usually at different points in the pipeline.


overlapAnalysis

private java.util.Hashtable<java.lang.String,java.lang.Integer> overlapAnalysis
Current overlap analysis.


printing

private boolean printing
If this flag is set, an overlap analysis is printed every time the filter is applied.

Constructor Detail

OverlapAnalysisFilter

public OverlapAnalysisFilter(java.lang.String id,
                             boolean printing)
Creates the filter and adds an overlap analysis for the given ID if it did not occur before.

Parameters:
id - overlap analysis ID
printing - enable printing flag
Method Detail

setPattern

public static void setPattern(TRECPattern pattern)
Sets the current pattern used to evaluate answer candidates.

Parameters:
pattern - evaluation pattern

getOverlapAnalysis

public java.util.Hashtable<java.lang.String,java.lang.Integer> getOverlapAnalysis()
Returns the current overlap analysis.

Returns:
overlap analysis

printOverlapAnalysis

public void printOverlapAnalysis()
Prints the current overlap analysis.


apply

public Result[] apply(Result[] results)
Evaluates the answer candidates and updates the current overlap analysis.

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