Vocab Exercise Generator
A simple web‑app that generates fill‑in‑the‑blank sentence exercises from dictionary example sentences, designed for English learners who need more support.
Project Overview
Vocab Exercise Generator is a lightweight tool I finished in July 2022. You paste a list of target words, press Generate, and the app outputs a numbered set of sentences with the target word blanked out. You can download the worksheet as a text file, a Word (.docx) file, or a PDF. It’s fast, ad‑free, and built to help teachers and students create practice materials in seconds.
Motivation
When I was tutoring weaker classmates, I spent a lot of time writing simple “fill‑in” sheets by hand as they help with active retrieval. I noticed that real dictionary examples are clearer than sentences I make up, especially for verbs with tricky usage. This app automates that process: grab authentic examples, blank the target word, and package everything neatly for printing or sharing.
Current Features
• Word List to Worksheet
Enter vocabulary words (one per line), click Generate, and get a clean, numbered exercise list with an answer key.

• Example‑Based Sentences
Sentences are sourced from reputable dictionaries and lightly cleaned for readability before the target word is blanked out.
• Download Options
Export your exercise as Text (.txt), Word (.docx), or PDF (.pdf) with a single click.

• Responsive, Minimal UI
A simple, distraction‑free interface that works on both desktop and mobile.
Technical Architecture
Backend (Python)
- FastAPI: exposes API endpoints for generating exercises and returning downloadable files
- BeautifulSoup4: scrapes dictionary pages and extracts example sentences
Frontend (Svelte + JavaScript)
- Svelte: drives a reactive UI for the word list, generated content, and downloads
- Simple state management: keeps input, generated sentences, and answer keys in sync
- Download helpers: triggers server exports for .txt, .docx, and .pdf
Challenges and Solutions
Unpredictable dictionary markup
Dictionary pages structure examples differently and change their HTML over time. Parsing them reliably was harder than I expected.
I wrote focused scrapers for example blocks and added fallbacks when a page layout didn’t match. Lightweight cleaning removes citation clutter, odd punctuation, and trailing ellipses.
Export formatting
Getting numbering and line breaks to look good across .txt, .docx, and .pdf is surprisingly fiddly.
The pdf option still remains buggy today. If the sentence is too long, it will just overflow out of the page.
Conclusion
This project started as a tiny helper for quick worksheets and turned into a handy, one‑click generator that saves time for teachers and learners. It’s simple, fast, and does one job well: turn your word list into authentic, fill‑in‑the‑blank practice with an answer key. If you want to try it, check out the live demo and the code—feedback welcome!