|
||||||||||
| 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.WebDocumentFetcherFilter
public class WebDocumentFetcherFilter
A filter that fetches web documents that contain the given search engine snippets.
This class extends the class Filter.
| Field Summary | |
|---|---|
private static java.lang.String |
CACHE_DIR
Cache directory where web documents are stored. |
private static boolean |
CACHING
Enable caching of web documents. |
private java.util.ArrayList<Result> |
docs
Documents fetched by the WebDocumentFetcher threads. |
private static java.lang.String |
FORBIDDEN_DOCS
Forbidden document types. |
private static int |
MAX_DOCS
Maximum number of documents to fetch. |
private static int |
MAX_PENDING
Maximum number of documents fetched in parallel. |
private int |
pending
Number of active WebDocumentFetcher threads. |
| Constructor Summary | |
|---|---|
WebDocumentFetcherFilter()
|
|
| Method Summary | |
|---|---|
void |
addDoc(Result doc,
boolean cached)
Used by the WebDocumentFetcher threads to return the
documents. |
Result[] |
apply(Result[] results)
Fetches the top MAX_DOCS documents containing the given
search engine snippets. |
void |
incPending()
Increments the number of pending fetchers by 1. |
private void |
waitForDocs()
Delays the main thread until all documents have been fetched. |
void |
waitForPending()
Delays a thread until there are less than MAX_PENDING pending fetchers. |
| 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 |
| Field Detail |
|---|
private static final java.lang.String FORBIDDEN_DOCS
private static final int MAX_DOCS
private static final int MAX_PENDING
private static final boolean CACHING
private static final java.lang.String CACHE_DIR
private java.util.ArrayList<Result> docs
WebDocumentFetcher threads.
private int pending
WebDocumentFetcher threads.
| Constructor Detail |
|---|
public WebDocumentFetcherFilter()
| Method Detail |
|---|
private void waitForDocs()
public void waitForPending()
public void incPending()
public void addDoc(Result doc,
boolean cached)
WebDocumentFetcher threads to return the
documents.
doc - document that contains a snippetcached - flag indicating that the document was fetched from the
search engine cachepublic Result[] apply(Result[] results)
MAX_DOCS documents containing the given
search engine snippets. The original snippets are dropped.
apply in class Filterresults - array of Result objects containing snippets
Result objects containing entire documents
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||