Skip to content

WojtekReu/parrot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Parrot - learn English from books

This project helps you learn new words from the book you are reading. It uses the flashcard technique to increase memorization process. All you need is your book in text format, and list of translated phrases. You can download book from https://www.gutenberg.org/ or https://archive.org/

Docker

Run docker compose to build and run containers for project

docker compose up

Virtualenv

If you don't want to use docker, you can bild project in virtualenv Run pipenv to install necessary packages:

pipenv sync

Run install.py to install packages: dolch, punkt, averaged_perceptron_tagger, wordnet.

./install.py

Create database, database user and copy alembic.example.ini to alembic.ini and configure it. Run alembic migrations:

alembic upgrade head

Add author and title to database. You can import it from prepared file data/book_list.csv separated by tabs (see book_list.example.csv):

./import_books.py

You can download book in txt format https://archive.org/stream/TheOldManAndTheSea-Eng-Ernest/oldmansea_djvu.txt and load to database:

./load_book_content.py Ernest_Hemingway/The_Old_man_and_the_Sea.txt

The best way to prepare sentences list is using google translator and "saved":

Load your translations to database:

./load_translations.py translations/Ernest_Hemingway/The_Old_man_and_the_Sea.csv

Run FastAPI service:

python -m uvicorn api.server:app --reload

Run client based on Vue.js:

cd client
npm run serve

About

learn English from books

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages