Skip to main content

A tool for mining sentences from games. Update: Dependencies, replay buffer based line searching, and bug fixes.

Project description

gamesentenceminer

GSM (GameSentenceMiner)

Turn your gaming time into language mastery.


🎮 See it in Action

Demo Gif

  • OCR to get get text from a game that doesn't support text hooks.
  • Look up words with Yomitan in game.
  • Create Anki cards with game audio + screenshot (or gif) automatically.

What does it do?

GSM is an application designed to automate the process of creating flashcards while you play. It sits between your game and Anki, handling audio recording, screenshots, and OCR so you don't have to interrupt your gameplay.

📝 Anki Card Enhancement

GSM automatically adds context to your Anki cards whenever you create them.

  • Audio Capture: Uses Voice Activity Detection (VAD) to record and trim the specific voice line associated with the text.
  • Screenshots: Captures the game state the moment the line is spoken. GIFs and Black Bar Removal are supported.
  • Mine from History: Go back and create cards from previous lines you've encountered (i.e. cutscenes).
  • Multi-Line Support: Capture multiple lines of dialogue into one card using the built-in Texthooker.
  • AI Translation: Optional integration to provide sentence translations using your own API key.

https://github.com/user-attachments/assets/df6bc38e-d74d-423e-b270-8a82eec2394c

👁️ OCR (Text Recognition)

For games that don't have a text hook (Agent/Textractor), GSM uses a custom fork of OwOCR to read text directly from the screen.

This opens up all kinds of posssibilities for games that would otherwise be inaccessible for language learning/sentence mining. For example I've made cards with games like Metal Gear Solid 1+2, Titanfall 2, and Sekiro, all using GSM's OCR.

  • Easy Setup: Managed installation means you don't need to fiddle with terminals.
  • Two-Pass System: Clean, fast output similar to as if you had a hook.
  • Customizable Capture Zones: Define exactly where text appears on your screen for optimal results.

https://github.com/user-attachments/assets/07240472-831a-40e6-be22-c64b880b0d66

🖥️ Overlay

GSM includes a transparent overlay for instant dictionary lookups.

  • Hover over characters in-game to see definitions via Yomitan.
  • Create cards without ever leaving the game window.
  • Automatically Generated Furigana Display In Game.

Overlay Demo

📊 Statistics

Track your immersion habits with the stats dashboard.

  • Kanji Grid: View every Kanji you've encountered and click them to see their source sentences.
  • Goals: Set daily reading targets.
  • Tools: Clean up and organize your mining history.

stats


🚀 Getting Started

  1. Download: Get the latest release.
  2. Install: Watch the Installation Guide.
  3. Requirements:
    • An Anki tool (Yomitan, JL, etc.)
    • A text source (Agent, Textractor, or GSM's built-in OCR)
    • A game

📚 Documentation

For full setup guides and configuration details, check the Wiki (Currently WIP).

❤️ Acknowledgements

Integrated Components

This project includes modified versions of the following libraries, I got tired of submodule hell so I've included them directly here for easier management all credits go to the original authors:

Star History

Star History Chart

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gamesentenceminer-2026.4.6.tar.gz (28.6 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gamesentenceminer-2026.4.6-py3-none-any.whl (28.9 MB view details)

Uploaded Python 3

File details

Details for the file gamesentenceminer-2026.4.6.tar.gz.

File metadata

  • Download URL: gamesentenceminer-2026.4.6.tar.gz
  • Upload date:
  • Size: 28.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for gamesentenceminer-2026.4.6.tar.gz
Algorithm Hash digest
SHA256 b859dd4420ecccdcfd19e7f0111d916f65a13cfe039a145f7747c54c43af0160
MD5 e29b0a047ab68228ee934bcf59b71100
BLAKE2b-256 b81df2fc3509899c1a07dc4c83c7d01fcdc627f17b5e4cb8201e895da86f29f4

See more details on using hashes here.

File details

Details for the file gamesentenceminer-2026.4.6-py3-none-any.whl.

File metadata

File hashes

Hashes for gamesentenceminer-2026.4.6-py3-none-any.whl
Algorithm Hash digest
SHA256 51eec4946393de9c2dfc7665fc6c2f6e4b43a80cf53ca478368c430a94759c75
MD5 749fad5444bf8692623c612dc0e5d611
BLAKE2b-256 8d9c19f233bb5dab42a79c81101f57bc44155a5ca5e36ae59b51284a7a44dedd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page