Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sg9372/adc
Anki Deck Creation, based on an existing book, or any PDF.
https://github.com/sg9372/adc
anki book language-learning translation
Last synced: about 2 months ago
JSON representation
Anki Deck Creation, based on an existing book, or any PDF.
- Host: GitHub
- URL: https://github.com/sg9372/adc
- Owner: sg9372
- License: mit
- Created: 2024-09-05T09:03:17.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-09-17T20:40:04.000Z (4 months ago)
- Last Synced: 2024-10-12T23:23:44.635Z (3 months ago)
- Topics: anki, book, language-learning, translation
- Language: Python
- Homepage:
- Size: 2.58 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: docs/README.md
- License: LICENSE
Awesome Lists containing this project
README
# Book Translator & Anki Card Generator
This project processes a Spanish PDF (later to add other foreign languages), extracts and lemmatizes verbs, translates them into English, and creates Anki flashcards for language learning. The program works at a rate of approx. 10 seconds per page.
## Features
- Reads foreign language PDF.
- Extracts verbs and calculates their frequency.
- Translates words using Google Translator.
- Generates Anki cue cards automatically.## Requirements
- Python 3.8+
- See `requirements.txt` for a full list of dependencies.## Installation
1. Clone the repository:
```bash
git clone https://github.com/your-username/your-repo.git
cd your-repo2. Set up a virtual environment and install dependencies:
python3 -m venv venv
source venv/bin/activate # On Windows: `venv\Scripts\activate`
pip install -r requirements.txt3. Store desired pdf in "raw" folder.
4. To process a book and create Anki cards, run in termainl, for example:
python src/main.py "./data/raw/Harry-Potter-III.pdf" "es" "test_deck"5. On the Anki desktop App, select "import..." and navigate to 'your-repo/data/processed'
## Future Work
- Add additional langauge processing ability.
- Improve run time (currently this is largly due the translation API).