A Streamlit-based application for learning German, featuring translation and grammatical gender visualization.
- Translate German text to English or Spanish
- Preserves speaker names in dialog format (e.g.,
Michael: Guten Tag→Michael: Good day) - Powered by Google Translate API
Highlights German articles and pronouns by grammatical gender:
| Gender | Color | Examples |
|---|---|---|
| Masculine | 🔵 Blue | der, ein, er, ihn, ihm |
| Feminine | 🩷 Pink | die, eine, sie, ihr |
| Neuter | 🟢 Green | das, ein, es |
| Plural | 🟠 Orange | die, wir, ihr, uns |
- Python 3.8+
- Internet connection (for Google Translate API)
-
Clone or download this repository
-
Create a virtual environment (recommended):
python -m venv venv
-
Activate the virtual environment:
- Windows:
venv\Scripts\activate
- macOS/Linux:
source venv/bin/activate
- Windows:
-
Install dependencies:
pip install -r requirements.txt
-
Download the German spaCy model:
python -m spacy download de_core_news_sm
Start the Streamlit server:
streamlit run main.pyThe app will open in your default browser at http://localhost:8501
Language_app/
├── main.py # Entry point
├── requirements.txt # Python dependencies
├── README.md # This file
└── src/
├── __init__.py # Package exports
├── ui.py # Streamlit UI components
├── translator.py # Translation logic
└── gender_detector.py # Gender detection & color-coding
| Package | Purpose |
|---|---|
streamlit |
Web UI framework |
deep-translator |
Google Translate API wrapper |
spacy |
NLP for gender detection |
MIT