A comprehensive tool for language learning that implements various effective learning techniques including the Ilya Frank's Reading Method, audio mirroring, and ANKI cards integration (upcoming).
-
Split text into syntagmas (meaningful chunks that can be pronounced in one breath)
-
Automatic translation with context preservation
-
Multiple output formats (web page, PDF, raw JSON)
-
Customizable layout options:
- Continuous format with translations
- Side-by-side tabular format
- Raw JSON format
- Generation of audio files with TTS models, using customizable SSML templates
-
Comprehension questions related to the text (0-9 questions):
- Interactive expandable/collapsible answers in web view
- Included as a formatted section in PDF output
-
Detailed tracking of LLM usage metrics (input text length, input/output tokens)
-
Per-user usage thresholds and restrictions
-
Comprehensive usage statistics for administrators
-
Automatic prevention of threshold exceeding
-
Ilya Frank's Reading Method implementation
-
Audio materials for pronunciation mirroring
-
Comprehension questions with expandable answers to test understanding
-
ANKI cards integration (planned)
- Clone the repository:
git clone [repository-url]
cd learn_language_with_texts- Install dependencies:
pip install -e . python -m src.deploy.download_nlpTo start the FastAPI server on your Azure VM (or any Linux environment):
- Ensure you have created and installed dependencies in your Python virtual environment named
.venv. - If you get a "Permission denied" error, make the script executable:
chmod +x ./start_server.sh- Use the provided script to activate the virtual environment and launch the server:
./start_server.shThis will:
- Activate the
.venvvirtual environment - Start the FastAPI app with Uvicorn, listening on all interfaces at port 8000
You can then access the app at http://<your-vm-ip>:8000/ from your browser.
- Start the application using the launch command above
- Open your web browser and navigate to
http://localhost:8000 - Input your text in the source language
- Select your desired output format and layout
- Adjust the number of comprehension questions (0-9, default: 2)
- Choose additional options like lemmatization if needed
- Click "Go ahead" to process the text
src/
├── api/ - FastAPI endpoints and utilities
├── data_classes/ - Core data structures
├── pdf_gen/ - PDF generation functionality
├── prompts/ - System prompts and templates
├── static/ - Web frontend assets
├── text_processing/- Text analysis and translation
└── tts/ - Text-to-speech functionality
The application's main page where users can input text and select processing options.
The results page displaying the processed bilingual text with translations and interactive comprehension questions with expandable answers.
Visualization of the lemmatization process used for text analysis.
telegram: @dklmn