info.ephyra.answerselection.filters
Class ResultLengthFilter
java.lang.Object
info.ephyra.answerselection.filters.Filter
info.ephyra.answerselection.filters.ResultLengthFilter
public class ResultLengthFilter
- extends Filter
A filter that cuts off results if the total length of non-whitespace
characters exceeds a threshold.
This class extends the class Filter.
- Version:
- 2006-07-15
- Author:
- Guido Sautter, Nico Schlaefer
|
Method Summary |
Result[] |
apply(Result[] results)
Ensures that the total number of non-whitespace characters in all answer
strings does not exceed cutoffLength. |
| 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 |
MAX_NON_WHITESPACE
private static final int MAX_NON_WHITESPACE
- Maximum number of non-whitespace characters per question.
- See Also:
- Constant Field Values
cutoffLength
private int cutoffLength
ResultLengthFilter
public ResultLengthFilter()
ResultLengthFilter
public ResultLengthFilter(int cutoffLength)
- Parameters:
cutoffLength -
apply
public Result[] apply(Result[] results)
- Ensures that the total number of non-whitespace characters in all answer
strings does not exceed
cutoffLength.
- Overrides:
apply in class Filter
- Parameters:
results - array of Result objects
- Returns:
- filtered array of
Result objects