Vocabulary study with FSRS spaced repetition, AI tutoring (Ollama/Claude), essay marking, idioms browser, Anki export, and dashboard. 918 vocabulary entries across 39 categories. 41 tests passing. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
39 lines
1.3 KiB
Markdown
39 lines
1.3 KiB
Markdown
# Persian Language Tutor
|
|
|
|
## Overview
|
|
Gradio-based Persian (Farsi) language learning app for English speakers, using GCSE Persian vocabulary (Pearson spec) as seed data.
|
|
|
|
## Tech Stack
|
|
- **Frontend**: Gradio (browser handles RTL natively)
|
|
- **Spaced repetition**: py-fsrs (same algorithm as Anki)
|
|
- **AI**: Ollama (fast, local) + Claude CLI (smart, subprocess)
|
|
- **STT**: faster-whisper via sttlib from tool-speechtotext
|
|
- **Anki export**: genanki for .apkg generation
|
|
- **Database**: SQLite (file-based, data/progress.db)
|
|
- **Environment**: `whisper-ollama` conda env
|
|
|
|
## Running
|
|
```bash
|
|
mamba run -n whisper-ollama python app.py
|
|
```
|
|
|
|
## Testing
|
|
```bash
|
|
mamba run -n whisper-ollama python -m pytest tests/
|
|
```
|
|
|
|
## Key Paths
|
|
- `data/vocabulary.json` — GCSE vocabulary data
|
|
- `data/progress.db` — SQLite database (auto-created)
|
|
- `app.py` — Gradio entry point
|
|
- `db.py` — Database layer with FSRS integration
|
|
- `ai.py` — Dual AI backend (Ollama + Claude)
|
|
- `stt.py` — Persian speech-to-text wrapper
|
|
- `modules/` — Feature modules (vocab, dashboard, essay, tutor, idioms)
|
|
|
|
## Architecture
|
|
- Single-process Gradio app with shared SQLite connection
|
|
- FSRS Card objects serialized as JSON in SQLite TEXT columns
|
|
- Timestamps stored as ISO-8601 strings
|
|
- sttlib imported via sys.path from tool-speechtotext project
|