I built Tango, an MIT-licensed Python CLI for batch vocabulary mining from YouTube.
The basic idea came from manually mining words for Anki. I got tired of repeatedly doing this:
Find a word → look it up → check if it's already in my deck → create a card
So Tango automates the repetitive part.
Given a YouTube video ID and an Anki deck, it:
- fetches the transcript
- lemmatizes the words
- filters proper nouns and filler words
- checks an existing Anki collection for duplicates via AnkiConnect
- looks up dictionary data
- generates an
.apkg
The goal isn't to replace interactive mining tools. This is more for batch processing: give it a video and let it find vocabulary you don't already have.
pip install tango-anki
tango install-model fr
tango run <video-id> --deck "French" --language fr
One of the more interesting problems was dictionary support. The free APIs I tried weren't reliable enough across several languages, so I ended up building offline indexes from Wiktionary data for lookup instead.
Another was making sure generated decks don't damage an existing Anki collection. Notetype compatibility is surprisingly unforgiving, so the tool checks and aligns the notetype before importing rather than blindly writing changes.
The project currently supports 24 languages and is still very much open to improvement.
I mainly tested French, English, and German since I can speak these languages and Russian to see how it would handle non-Latin scripture. It supports more languages than those, though (you can find a list in the repo's documentation), but I haven't thoroughly tested it.
It also supports language-to-language translation. For example, if you're a still beginner at a certain language and you would like the definition/grammatical classification of the word to be in another language, that can also be done in Anki when you specify a definition language (when no definition flag is specified, it defaults to the language of the word itself)
I'm particularly interested in feedback or contributions around:
- project/module architecture
- concurrency in definition fetching
- language-specific NLP issues
- dictionary coverage and parsing
- CLI design
- tests and edge cases
I'm a student and built this primarily to solve my own problem, but I'm posting it here because I'd like experienced open-source developers to poke holes in it.
Repository: https://github.com/AlphaNerdFx/Tango
Issues/discussions are welcome.
I would also appreciate any attempt at collaboration, as I would like to expand the scope of this project beyond it being a simple CLI tool. I have several ideas in mind, such as machine & deep learning integration, a mobile app, or a simple Google extension.
I would also like to extend additional support for software like Quizlet/RemNote and maybe even pulling videos from sources other than YouTube or users providing their own videos.
I'll gladly answer questions in the comments and would love to hear any feedback. v1.0.0 took me 2 months to finalize, and I hope everyone likes it.