We'll use the following test script to measure the amount of time taken for each query. The provided utilities return XML data and we do not want to count the time needed by the system to structure the document.
search_for.py. Enter the following listing as it appears:
import sys import time from nucular import Nucular # create an instance. session = Nucular.Nucular(sys.argv) query = session.Query() query.anyWord(sys.argv) start = time.time() d = query.resultDictionaries() print "Query Duration: %f" % (time.time() - start) print "Results: %d" % len(d)
mcneil, your results should be as follows.
(text_processing)$ python ...