This will implement a simple in-memory boolean search engine over the jokes from http://web.hawkesnest.net/~jthens/laffytaffy/.
The documents are read from documents.txt. The queries to be processed are read from queries.txt.
Your search engine will only need to support AND queries. A multi-word query is assumed to be an AND of the words. E.g., the query "why because" should be processed as "why AND because."
The expected output of running python boolean_search.py
is in Log.txt
.