Skip to content

Latest commit

 

History

History
27 lines (15 loc) · 1.18 KB

README.md

File metadata and controls

27 lines (15 loc) · 1.18 KB

Psittacus ALG (Automatic Lesson Generator)

An automatic lesson generator for Psittacus.

PALG auto-generates language lessons, in a json format compatible with that of Psittacus. It mines sentences randomly from a chosen corpus (a text file), and uses them to create lessons leveraging the power of TTS and automatic language translation apis. It supports both online and offline generation of lessons.

You can 'play' lessons generated by PALG on Psittacus.

Example Usage

python3 ./src/__main__.py  --corpus path/to/corpus.txt  --target-lang italian   --native-lang english  --lesson-size 5 --output path/to/mylesson.txt

This will mine 5 (lesson-size) random sentences from path/to/corpus.txt, a corpus of italian sentences (target-lang), and save the lesson json-file to path/to/mylesson.txt (output). The lesson will be targeted to english-speakers (native-lang).

Another example:

python3 ./src/__main__.py --corpus res/corpus_fr.txt  --target-lang french   --native-lang italian  --lesson-size 5 --output out/lesson.txt

Demo

https://www.youtube.com/watch?v=RqQUwAd-BUg&feature=youtu.be