Given a local corpus, your code will process the documents in the corpus, and build an inverted index from them. After building the index, your code will take a query, process it, find and rank documents matching that query, and return a ranked list of results with document snippets containing the query. Your code will also handle several other requests to get statistics from the index. The code should be as efficient as possible, so you will report the amount of time spent indexing and handling queries, as well as the amount of disk space used for the index.