[Request] Bridging the gap between Bunpro and Yomitan

I tried to work on this. I scraped the grammar points page, and generated a working dictionary. It’s only for Grammar Points, no vocabulary though.

image

Running python script.py does the following:

  1. Download (then cache) the Grammar Points Page
  2. Parse the page and generate a clean JSON of the data (then cache)
  3. Append new grammar points to the conjugation.csv file (used to customize recognition reading and inflection for each point)
  4. Use the JSON and the conjugation.csv file to generate a dictionary according to the schemas
  5. Output a file like Bunpro Grammar-2025-02-06.zip in the build/ directory.

The dictionary itself is pretty bad at the current state. It will only work for non-conjugatable structures, so it will find です、これ、でしょう、好き、きらい、のがすき、らしい、ぜんぜん、かも, and will not find かもしれません、あまり〜ない、真っ赤, しか〜ない etc. So it’s pretty much useless.

To make it better, it needs manual cleanup (in the 927 points), to setup the terms correctly, since It will never find “くらい ②” or “う-Verb (Dictionary)”, add the reading where necessary, and the inflection tag to support conjugations. Also, it would be good to scrape every grammar point page, to display more useful information directly, get more versions of the same grammar point and other stuff I can’t think of right now. That’s a ton of work and I probably won’t be doing that anytime soon.

The conjugation.csv file is currently empty, running the script for the first time will populate it. Fixing all terms, adding readings, and inflection tags in the file would be enough to make the dictionary usable. Other than that, it would be a good idea to add something to the file to “exclude” certain super common points, or adding other points as aliases with the same ID, perhaps. If anyone wants to do a PR to the code or send a updated csv file directly, I accept it.

Anyway, during the research I found these Grammar Dictionaries and I probably will be using those instead for the near future, although a link to Bunpro would be cooler.

6 Likes

Hello, bringing up an old thread here but I’m wondering if things have changed API-wise and what is currently the best way to mine vocab directly in bunpro?

At the moment I have to open the bunpro website, navigate to the search page, write down the word and pick the vocab to add it to my reviews. It’s far less convenient than the Yomitan-Anki integration I must say.

I guess another way would be to mine in Anki and then import the Anki mining deck into Bunpro regularly… also not ideal.

Ideally a link to the bunpro item directly in Yomitan would be amazing. I don’t mind having to do a second click to add to reviews or mark as mastered, at least I save myself the beginning of the process.

2 Likes