Skip to content

About

Japanese verb conjugation drill up to N3, Spanish UI

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

6 Commits

Folders and files

Repository files navigation

活用 · Conjugación

Japanese verb-conjugation drill up to JLPT N3, with a Spanish interface and Spanish meanings. Static site, no build step, deployable to GitHub Pages as is.

Each question takes a random verb and a random form:

Dimension Options
Voice / base 基本 · 可能 · 受身 · 使役 · 使役受身 · たい
Inflection 現在 · 過去 · て · ば · たら · たり · 意向 · 命令 · ながら · そう
Polarity / register 肯定/否定 · 普通/丁寧 (where the form has them)

Only real combinations are asked (108 forms; no potential volitional, no 〜たい imperative, …). Type in romaji (converted live by WanaKana) or with a Japanese IME; kana and kanji answers are both accepted. Missed questions come back four turns later. After each answer the verb's Notion example sentence is shown rewritten in the asked form, with a Spanish translation, next to the original. Settings and per-form accuracy are kept in localStorage.

Layout

index.html               page
js/conjugate.js          conjugation engine (pure, also require()-able from Node)
js/app.js                quiz UI
ayuda.html               help page (examples generated by the engine)
js/vendor/wanakana.*     romaji → kana IME (MIT)
data/verbs.js            GENERATED verb list — do not edit
scripts/build_verbs.py   builds data/verbs.js from the Notion snapshot
translations/es/*.txt    hand-written Spanish for each rewritten example
scripts/build_translations.js  validates them -> data/examples_es.js (GENERATED)
tests/test_conjugate.js  engine tests

Updating the verb list

The verbs come from the Notion Verbos database via the snapshot kept by ../anki/notion_sync.py (sibling folder in the Japanese repo).

python3 ../anki/notion_sync.py pull      # refresh the Notion snapshot (needs NOTION_TOKEN)
python3 scripts/build_verbs.py           # -> data/verbs.js
node tests/test_conjugate.js             # every verb × every form must conjugate
node scripts/build_translations.js       # -> data/examples_es.js; reports stale entries
node scripts/build_translations.js --todo  # verbs whose example still needs Spanish

Each translation entry holds present / negative / past / negative past per voice (plus volitional and imperatives for plain and causative); the connective forms (ば, たら, て, たり, ながら, そう) are derived in js/app.js. An entry stores the Japanese before the verb (src), so if the Notion example changes it is reported as stale and the app falls back to the original sentence instead of a wrong translation. New verbs show up under --todo: translate them in a new translations/es/NNN.txt following the conventions at the top of 001.txt.

build_verbs.py skips grammar auxiliaries (〜てある, てみる, てもらう…), merges duplicate senses, and overrides 14 rows whose Notion Grupo is wrong (see GROUP_FIXES; remove an entry once it is fixed in Notion).

Deploying

GitHub Pages lets browsers cache assets for 10 minutes, so after changing anything under js/, css/ or data/ run scripts/bump_version.sh before committing; it stamps a fresh ?v= on every asset link.

Run locally

Open index.html directly, or python3 -m http.server and visit http://localhost:8000.

About

Japanese verb conjugation drill up to N3, Spanish UI

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages