Skip to content

Latest commit

 

History

11 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pokejisho_tool

Refreshes PokéJisho's jisho.json dictionary from PokéAPI, preserving the hand-curated canonical data. Intended to be run roughly once a year when a new game adds Pokémon / items / moves.

See DESIGN.md for how it works and why.

Setup

npm install

Usage

Build the merged dataset (fetches from PokéAPI as needed, then merges):

npm run build-dataset
  • Output: dist/jisho.json — the deliverable. Copy it into the iOS and web repos.
  • data/jisho.json is the hand-curated canonical layer and is never modified. On any collision (same type + name), the canonical entry wins.
  • Entries already present in data/jisho.json are skipped before fetching (a slug is derived from each canonical name), so only genuinely new resources hit the network. A cold run is ~1 hour (~2,550 requests at 1.5 s each); re-runs reuse the .cache/ and are near-instant. Delete .cache/ to force a fresh fetch.
  • The run is resumable: if it stops, just run it again — cached resources are skipped.

Deploy the result:

cp dist/jisho.json ../pokejisho_ios/PokeJishoKit/Sources/PokeJishoKit/Resources/jisho.json
cp dist/jisho.json ../pokejisho_web/js/...   # wherever the web dataset lives

Validate the romaji converter

Checks the katakana→romaji converter against every existing entry (round-trip diff):

npm run validate-romaji

Currently ~99.3% exact match; the residual is a set of Gen 9 entries the original hand-romanized with a looser convention. Those are preserved via canonical precedence, so the converter only affects genuinely new entries.

Find canonical typos

Flags entries whose Japanese name matches a PokéAPI resource but whose English differs — i.e. a misspelled English name in data/jisho.json (e.g. canonical Ninetails vs. PokéAPI Ninetales):

npm run find-typos                       # full scan, every category (~1h cold)
npm run find-typos -- pokemon-species    # quick scan of one category

The full scan fetches the same details build-dataset needs, so it also warms the cache — running build-dataset afterward is near-instant. Fix any reported typos in data/jisho.json, then re-run.

New entries each year

After running, review the + ... lines in the build output (the new entries). Spot-check their romaji, since new entries use the converter rather than hand curation. If any need correcting, edit data/jisho.json (the canonical layer) and re-run — canonical always wins.

About

Tools for populating the PokéJisho dictionary

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages