MiningCat

Python / Flask

MiningCat is free software I develop in Python, with a local web interface, for learning languages through immersion and sentence mining: read, watch and play in the language you study, look up words in your own dictionaries, and turn the sentences you like into Anki flashcards.

It brings together in one application what usually takes several tools (reader, pop-up dictionary, video player, card maker), and everything runs on your computer: nothing is sent online.

Features

  • An ebook reader (EPUB, TXT, HTML, Markdown) that also reads comics and manga, their text read by OCR, in horizontal or vertical text.
  • A video player for local videos and YouTube, Instagram and Bilibili videos, with subtitles where every word can be clicked.
  • Video games: dialog boxes are read with OCR and sent, with a screenshot, to a page you can mine from.
  • A pop-up dictionary for Yomitan-format dictionaries: deconjugation, Japanese pitch accent, audio, and the word's rank in a frequency list.
  • Progress tracking: words coloured by status, how much of each text you understand, and "i+1" sentences (a single unknown word) recommended by that word's frequency.
  • Anki cards (word, reading, definitions, sentence, audio, image, translation) sent through AnkiConnect or exported as .apkg; word statuses are kept up to date from your Anki decks.
  • A converter that makes MP4 videos with synchronized subtitles from an audiobook and its ebook, an ebook alone (text-to-speech), or a video without subtitles (transcription, or OCR of burned-in subtitles).

Under the hood

MiningCat chains several AI models that run locally: transcription with Whisper (faster-whisper) and Qwen3-ASR, forced alignment of a book's text on its audiobook (stable-ts, Meta's MMS), speech synthesis (edge-tts, MMS-TTS), OCR (Apple Vision, EasyOCR, owocr) and offline translation of sentences and subtitles (Meta's NLLB-200, or Qwen3 with the context of the previous lines).

The interface is a local web application (Flask, Bootstrap) organised in layers (domain, application, infrastructure, interfaces). The project is tested on Linux, macOS and Windows, with more than 1,200 tests and a CI that requires at least 80% coverage.

Languages

Mandarin (traditional and simplified), Cantonese, Taiwanese Hokkien (Taigi), Japanese, Korean, Vietnamese, Russian, English, French, German, Italian, Spanish, Portuguese and Polish.

For Taigi, MiningCat reads and converts its three writing systems (Hanji, Tâi-lô and Pe̍h-ōe-jī), and uses dedicated local speech engines, since Whisper doesn't know the language.

GitHub View the documentation

The project is open-source, released under the AGPL-3.0 license.

Gallery