Anki Vocabulary Telegram Bot
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.
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.
- Detailed Statistics:
Track total cards, due cards, review streak, average daily reviews, retention rate, and most challenging words.
- 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 usingpython-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
- Start the bot:
/start
registers the user and shows available commands. - Add a new word:
/add
prompts for a “word - translation” pair. - Review session:
/review
starts a session; users rate recall with inline buttons, and the bot adapts intervals. - Track progress:
/stats
displays learning statistics and most challenging cards. - 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.