Polonius: What do you read, my lord? Hamlet: Words, words, words.
A chatbot that answers in Shakespeare quotes. Live at https://hamlet.42labs.io.
Note
Unmaintained, and staying online. Built in 2016, kept running as an artifact of how this was done before LLMs. Nothing here is being developed; issues and pull requests may sit indefinitely. The site works — that is the whole point of leaving it up.
Flask + jQuery front end. The server picks an apt quote from shakespeare.json with a pre-LLM IR pipeline: TF–IDF cosine similarity over a pre-computed corpus index, Porter stemming, WordNet synonym expansion (NLTK), and TextBlob sentiment as a tiebreaker. Returns {quote, source}.
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
flask --app app run --port 5001MIT. Do what you like with it.
If it earned its keep, coffee is appreciated. ☕