info.ephyra.answerselection.filters
Class CutKeywordsFilter

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

public class CutKeywordsFilter
extends Filter

Trims answer candidates for definitional questions to improve the precision by chopping of leading news agency acronyms and cities.

This class extends the class Filter.

Version:
2008-02-10
Author:
Guido Sautter

Field Summary
private static java.util.regex.Pattern BRACKETS
           
private static java.util.regex.Pattern KEYWORDS
           
 
Constructor Summary
CutKeywordsFilter()
           
 
Method Summary
 Result apply(Result result)
          Cut the leading news agency acronym and city from a snippet, for instance from 'MOSCOW (ITAR-TAS) ... some useful information
 Result[] apply(Result[] results)
          Cut the leading news agency acronym and city from a snippet, for instance from 'MOSCOW (ITAR-TAS) ... some useful information
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

KEYWORDS

private static final java.util.regex.Pattern KEYWORDS

BRACKETS

private static final java.util.regex.Pattern BRACKETS
Constructor Detail

CutKeywordsFilter

public CutKeywordsFilter()
Method Detail

apply

public Result apply(Result result)
Cut the leading news agency acronym and city from a snippet, for instance from 'MOSCOW (ITAR-TAS) ... some useful information ...', in order to not waste result length

Overrides:
apply in class Filter
Parameters:
result - a Result object
Returns:
the same Result object

apply

public Result[] apply(Result[] results)
Cut the leading news agency acronym and city from a snippet, for instance from 'MOSCOW (ITAR-TAS) ... some useful information ...', in order to not waste result length

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