Skip to main content

A utility to extract vocabulary lists from manga.

Project description

Manga Wordlist Extractor

This script allows you to automatically scan through various types of japanese media (currently manga and ebooks) and generate a csv with all contained words.

It is intended to be used with the community deck feature of Bunpro, hence the csv output format. Once the csv import feature will be published, I will adjust the format of the csv. If any other outputs are desired, let me know!

Installation

You need to have python installed (ideally Python 3.12).

Using pip

Install the package using

pip install japanese-vocabulary-extractor

Usage

main.py [-h] [--parent] --type TYPE input_path

Specify the type of media: 'manga', 'pdf', 'epub' or 'text'. Replace input_path with the path containing the files (or, if not a manga, the file directly). Make sure to surround it with quotation marks if there are spaces in the path!

Only for manga: If you enter a parent folder containing multiple volumes in their own folders, add "--parent" before the folder path.

This will generate a vocab.csv file containing all words.

Bonus: Since this script is using mokuro, you'll also generate a .mokuro and .csv file for each volume, allowing you to read the manga with selectable text in your browser. For more info, visit the mokuro github page linked at the bottom.

Notices

If you run into errors, look into the mokuro repository linked at the bottom. There might be some issues with python version compatibility.

Also important: This script is not perfect. The text recognition can make mistakes and some of the extracted vocab can be wrong. If this proves to be a big issue I will look for a different method to parse vocabulary from the text.

TODO

  • Live Output from Mokuro (it can take very long)
  • Separate outputs for each volume
  • Added translations through dictionary lookup?
  • Support more input formats (please suggest any you might want!)
  • Support other output formats

Acknowledgements

This is hardly my work, I just stringed together some amazing libraries:

Project details


Download files

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

Source Distribution

japanese_vocabulary_extractor-0.3.1.tar.gz (17.8 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file japanese_vocabulary_extractor-0.3.1.tar.gz.

File metadata

File hashes

Hashes for japanese_vocabulary_extractor-0.3.1.tar.gz
Algorithm Hash digest
SHA256 415cf095bc08a5dd7805e04e4e1c11ab4bc819662080121374fa074c0a53c4fe
MD5 b7acef3e65cafd1c5f5512e303764340
BLAKE2b-256 f93351dc45c040870e50fd1f3b93b5739494a393c827fc09b7ccbf43176effd5

See more details on using hashes here.

File details

Details for the file japanese_vocabulary_extractor-0.3.1-py3-none-any.whl.

File metadata

File hashes

Hashes for japanese_vocabulary_extractor-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 86914bbea00ad935f933dbcd7eec27cc1268e628da6c5ce4a75edcbbaac09180
MD5 fc0a11587d17e37c2c377e5ccd5e7cf5
BLAKE2b-256 92b5a4dc2373ef1f877f3d09388153ebe4333cefacc7396ddb71d7065c4ff463

See more details on using hashes here.

Supported by

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