|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectinfo.ephyra.answerselection.filters.Filter
info.ephyra.answerselection.filters.NumberOfKeywordsFilter
public class NumberOfKeywordsFilter
Filters results by the number of keywords.
The score of each result is incremented by the number of keywords it contains.
A result is dropped if m < Floor(Sqrt(k - 1)) + 1, where
k is the number of keywords in the query string and
m is the number of keywords that also occur in the result.
This class extends the class Filter.
| Constructor Summary | |
|---|---|
NumberOfKeywordsFilter()
|
|
| Method Summary | |
|---|---|
Result |
apply(Result result)
Filters a single Result object. |
private int |
getNumberOfMatches(java.lang.String[] s1,
java.lang.String[] s2)
Counts the number of words in the first array that occur in the second array. |
| 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 |
| Constructor Detail |
|---|
public NumberOfKeywordsFilter()
| Method Detail |
|---|
private int getNumberOfMatches(java.lang.String[] s1,
java.lang.String[] s2)
s1 - string array 1s2 - string array 2
public Result apply(Result result)
Result object.
apply in class Filterresult - result to filter
null if the result
is dropped
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||