info.ephyra.answerselection.filters
Class WikipediaTermImportanceFilter
java.lang.Object
info.ephyra.answerselection.filters.Filter
info.ephyra.answerselection.filters.WebTermImportanceFilter
info.ephyra.answerselection.filters.WikipediaTermImportanceFilter
public class WikipediaTermImportanceFilter
- extends WebTermImportanceFilter
A web term importance filter that counts term frequencies in a Wikipedia
article on the target of the question.
This class extends the class WebTermImportanceFilter.
- Version:
- 2008-02-15
- Author:
- Guido Sautter
| 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 |
TEST_TERM_DOWMLOD
protected static boolean TEST_TERM_DOWMLOD
WikipediaTermImportanceFilter
public WikipediaTermImportanceFilter(int normalizationMode,
int tfNormalizationMode,
boolean isCombined)
- Parameters:
normalizationMode - tfNormalizationMode - isCombined -
getTargets
public java.lang.String[] getTargets(java.lang.String target)
- Description copied from class:
WebTermImportanceFilter
- produce the target variations for a given target
- Overrides:
getTargets in class WebTermImportanceFilter
- Parameters:
target - the original traget String
- Returns:
- an array of strings containing the variations of the target
String, including the original target
- See Also:
WebTermImportanceFilter.getTargets(java.lang.String)
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[])
getTermCounters
public java.util.HashMap<java.lang.String,WebTermImportanceFilter.TermCounter> getTermCounters(java.lang.String target)
- fetch the term frequencies in the top X result snippets of a web search
for some target
- Parameters:
target - the target
- Returns:
- a HashMap mapping the terms in the web search results to their
frequency in the snippets
main
public static void main(java.lang.String[] args)