Skip to content

Micro Learning is a terminal-based application that generates True/False quizzes from PDF files. It extracts text from your study materials and uses AI to create interactive quizzes, helping you review and reinforce key concepts efficiently. [IT WORKS OFFLINE]

License

Notifications You must be signed in to change notification settings

filippostanghellini/micro-learning

Repository files navigation

Micro Learning - PDF Quiz Generator

A terminal application that uses spaCy + Ollama to analyze PDFs and create intelligent True/False quizzes with structured data extraction.

Installation

  1. Install Python dependencies:
pip install -r requirements.txt
  1. Download spaCy model for English (recommended):
python -m spacy download en_core_web_trf

Alternatives (if space is limited):

python -m spacy download en_core_web_md   # Good accuracy
python -m spacy download en_core_web_sm   # Fast but basic
  1. Install Ollama:
# macOS
brew install ollama

# Linux
curl -fsSL https://ollama.ai/install.sh | sh

# Windows
# Download from https://ollama.ai/download
  1. Install Ollama Python package:
pip install ollama
  1. Download Ollama model:
ollama pull llama2

Usage

  1. Place your PDF file in the pdfs/ folder

  2. Start Ollama service (in a separate terminal):

ollama serve
  1. Run the application (in another terminal):
python main.py
  1. Follow the instructions to select PDF and answer questions

Important Notes:

  • Keep ollama serve running while using the application
  • The first run may take longer as models are loaded
  • If AI is not available, the system will use rule-based questions as fallback

Features

  • Structured Data Extraction: spaCy extracts entities, relationships, and facts from PDFs
  • AI-Powered Questions: Ollama generates intelligent questions from structured data
  • Hybrid Approach: Combines rule-based extraction with AI generation for best results
  • Fallback System: Works even without AI (rule-based questions as backup)
  • Interactive Quiz: Elegant terminal interface with immediate feedback
  • Educational Quality: Questions test understanding, not just memorization
  • Multi-Model Support: Automatically selects best available spaCy model (trf > md > sm)

System Requirements

  • Python 3.8+
  • 4GB+ RAM (for Ollama models)
  • Internet connection (for initial model downloads)
  • macOS/Linux/Windows (Ollama support)

About

Micro Learning is a terminal-based application that generates True/False quizzes from PDF files. It extracts text from your study materials and uses AI to create interactive quizzes, helping you review and reinforce key concepts efficiently. [IT WORKS OFFLINE]

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages