Sahaj.blogs
11 Oct 2026 · Projects

Built this: NLP Document Search Engine

A Gradio app for classical document search: NLTK preprocessing, a TF-IDF vector space model with cosine ranking, term-level explanations and a lexical-matching comparison mode.

On 11 October 2026 I committed an NLP document search engine for a college NLP course showcase, built with Gradio (and set up for Hugging Face Spaces).

Features

From the README:

  • upload .txt and .pdf documents (parsed with PyMuPDF), or use the 8 preloaded sample documents
  • an NLTK pipeline (tokenisation, normalisation, stop-word removal, Porter stemming) with a step-by-step inspector
  • a TF-IDF vector space model with smoothed IDF and L2 normalisation, ranked by cosine similarity, top-K configurable
  • term-level explainability: which terms drove each ranking
  • a comparison mode between TF-IDF and plain lexical matching
  • corpus analytics, SHA-256 de-duplication, a query history log, and error handling for empty queries, scanned PDFs and out-of-vocabulary terms

The README also discusses the theoretical limits of lexical search, and dense embeddings and hybrid search as future work.

Where it connects

It’s my bag of words and TF-IDF notes turned into a real search tool, and the “future work” section points toward the embeddings and RAG material from 2026.

#nlp#information-retrieval#tf-idf

Sources

  1. SahajIVVIX-1/NLP-Based-Search (GitHub) — GitHub
  2. First commit c69c8a2 — GitHub

This is a summary written from the linked public sources. Figures and numbers are as reported there.