The Anki Vocabulary Telegram Bot is an open-source flashcard bot designed to help users efficiently learn and review vocabulary using the proven SM-2 spaced repetition algorithm. Built with Python and the python-telegram-bot library, it offers a user-friendly experience for language learners, students, and anyone looking to expand their vocabulary.

asd

The bot allows users to add, edit, search, and review word-translation pairs, tracks learning progress, and sends daily reminders—all within Telegram.

Key Features

  • Flashcard Management:
    Add, edit, and search word-translation pairs. View all cards with pagination for easy navigation.
  • Spaced Repetition Review:
    Adaptive review sessions based on the SM-2 algorithm. Users rate their recall (“Again,” “Hard,” “Good,” “Easy”) to optimize review intervals.

asd

  • Detailed Statistics:
    Track total cards, due cards, review streak, average daily reviews, retention rate, and most challenging words.

asd

  • Daily Reminders:
    Enable or disable daily review reminders and set a custom reminder time.
  • Inline Keyboards:
    Use inline buttons for rating recall during reviews and for paginating search/all cards results.
  • Robust Error Handling:
    Clear feedback for invalid inputs, incorrect formats, and command usage.

Technical Architecture

  • Backend:
    Written in Python using python-telegram-bot for async Telegram API integration.
  • Database:
    Uses SQLite to store flashcards, user settings, and review session data.
  • Spaced Repetition:
    Implements the SM-2 algorithm for personalized review scheduling.
  • Reminders:
    Background job checks and sends reminders to users with due cards at their chosen time.

Example Workflow

  1. Start the bot:
    /start registers the user and shows available commands.
  2. Add a new word:
    /add prompts for a “word - translation” pair.
  3. Review session:
    /review starts a session; users rate recall with inline buttons, and the bot adapts intervals.
  4. Track progress:
    /stats displays learning statistics and most challenging cards.
  5. Set reminders:
    /reminder on enables daily reminders; /setreminder 08:30 sets the time.

Technologies Used

  • Python 3
  • python-telegram-bot
  • SQLite
  • AsyncIO

This project showcases how Telegram bots can make language learning more effective and engaging by combining proven spaced repetition techniques with a simple, interactive chat interface.