info.ephyra.answerselection.filters
Class YahooTermImportanceFilter
java.lang.Object
info.ephyra.answerselection.filters.Filter
info.ephyra.answerselection.filters.WebTermImportanceFilter
info.ephyra.answerselection.filters.YahooTermImportanceFilter
public class YahooTermImportanceFilter
- extends WebTermImportanceFilter
A web term importance filter that counts term frequencies in text snippets
retrieved with the Yahoo search engine.
This class extends the class WebTermImportanceFilter.
- Version:
- 2008-02-15
- Author:
- Guido Sautter
|
Field Summary |
private static int |
MAX_RESULTS_PERQUERY
Maximum number of search results per query. |
private static int |
RETRIES
Number of retries if search fails. |
private static java.lang.String |
YAHOO_ID
Yahoo application ID, allows 5,000 queries per day and IP address. |
| 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 |
YAHOO_ID
private static final java.lang.String YAHOO_ID
- Yahoo application ID, allows 5,000 queries per day and IP address.
- See Also:
- Constant Field Values
MAX_RESULTS_PERQUERY
private static final int MAX_RESULTS_PERQUERY
- Maximum number of search results per query.
- See Also:
- Constant Field Values
RETRIES
private static final int RETRIES
- Number of retries if search fails.
- See Also:
- Constant Field Values
YahooTermImportanceFilter
public YahooTermImportanceFilter(int normalizationMode,
int tfNormalizationMode,
boolean isCombined)
- Parameters:
normalizationMode - tfNormalizationMode - isCombined -
getTermCounters
public java.util.HashMap<java.lang.String,WebTermImportanceFilter.TermCounter> getTermCounters(java.lang.String[] targets)
- Description copied from class:
WebTermImportanceFilter
- fetch the term frequencies in the top X result snippets of a web search
for some target
- Specified by:
getTermCounters in class WebTermImportanceFilter
- Parameters:
targets - an array of strings containing the targets
- Returns:
- a HashMap mapping the terms in the web serach results to their
frequency in the snippets
- See Also:
WebTermImportanceFilter.getTermCounters(java.lang.String[])