LangApp is a tool designed to help you learn new languages using flashcards. When reading a book in an unfamiliar language, you may come across many words you don't recognize. LangApp helps bridge that gap by generating flashcards containing words and their meanings. The generated flashcards are saved as a .txt file, which can be easily imported into Anki to assist in memorization.
LangApp leverages a comprehensive dictionary file to create a database of words and their meanings. Once the database is set up, you can generate flashcards based on any text you provide.
To get started, you'll need to parse a dictionary file from kaikki.org, which contains words in various languages along with their English meanings. This process takes around 3-5 hours.
Command to parse the dictionary:
go run cmd/parser/main.go -db ./assets/meaning/ -dict ./assets/kaikki.org-dictionary-English.jsonl -t 10 -p true
db: Path where the parsed database will be stored.dict: Path to the dictionary file.t: Number of threads to use for faster processing.p: Enable progress output (set totrue).
Note: The dictionary file should be stored in the ./assets folder of LangApp.
Once the dictionary has been parsed and the database is created, you can generate flashcards from any text.
Command to generate flashcards:
go run cmd/flashcard/main.go -t "Yo vivo en Granada, una ciudad pequeña que tiene monumentos muy importantes como la Alhambra. Aquí la comida es deliciosa y son famosos el gazpacho, el rebujito y el salmorejo."
t: Text input containing words for which you want flashcards.
This command will generate a cards.txt file containing the words and their meanings. The file will be saved in the current directory and can be imported into Anki to create your personalized deck.
-
Parse the Dictionary:
go run cmd/parser/main.go -db ./assets/meaning/ -dict ./assets/kaikki.org-dictionary-English.jsonl -t 10 -p true -
Generate Flashcards:
go run cmd/flashcard/main.go -t "Bonjour, je m'appelle Pierre et j'aime voyager."This will create a
cards.txtfile with flashcards for words like "Bonjour" and "voyager" along with their English meanings.
LangApp makes it easy to expand your vocabulary while reading in a new language. Use it to build your Anki decks and enhance your language learning journey.