A single-page browser app for exploring the structure of Japanese sentences.
Paste a Japanese sentence (or a whole paragraph) and Ayaki renders its bunsetsu-level dependency tree as an interactive arc diagram (with a node-tree view and the classic CaboCha-style stair view as alternatives). Click any part of the sentence to inspect its morphemes — part of speech (Japanese term with a gloss in the UI language), reading, base form — have words or whole sentences spoken via the Web Speech API, and jump straight to Jisho.org for a word or Google Translate for a sentence. The interface is available in English, German, Japanese and Chinese (following the browser language by default, selectable via the globe in the header).
Everything runs client-side; there is no backend. Parsing is powered by sasara on top of kuromojin / kuromoji.js with the IPAdic dictionary.
Design documents live in docs/superpowers/specs/.
Background on the confidence display: docs/attachment-confidence.md.
Background on the relation labels (their UD mapping and measured ~92% accuracy): docs/relation-labels.md.
npm run dev— dev server with hot reload.npm test— unit/component tests (vitest).npm run check— svelte-check (TypeScript across.ts/.svelte).npm run build -- --base=/ayaki/— production build intodist/(the--basemust match the path the app is served from; GitHub Pages serves it under/ayaki/).npm run smoke— after a build, bootsvite previewand drives headless Chromium (via Playwright) through a real parse to catch bundling breakage the unit suite can't see (kuromoji/zlibjs shims, asset paths, etc.).vite previewneeds the same--basethe build used, which is why the script always passes--base=/ayaki/itself. Any bump ofsasara,kuromojin/kuromoji.js, orviteshould never be merged without a greennpm run smokerun — the CI build job runs it on every push.npm run shots— regenerates all three README screenshots via headless Chromium (builds first, so they are never stale). Run after any UI-visible change: every screenshot shows the app chrome, so a chrome change invalidates the whole set.npm run live-check [-- <url>]— post-deploy verification against production (defaulthttps://saigyo.github.io/ayaki/): boots the app, parses the example, exercises all three views and the language switcher, and fails on any console error.
Ayaki itself is released under the MIT License.
Ayaki builds on third-party components under their own licenses:
| Component | Use | License |
|---|---|---|
| sasara © Satoshi Imamura | Bunsetsu dependency parser | MIT |
sasara model.json |
Parsing model, served as a static asset; derived from UD Japanese-GSD (Megagon Labs) | CC BY-SA 4.0 |
| kuromojin © azu | Tokenizer wrapper (via sasara) | MIT |
| kuromoji.js © Atilika Inc. | Japanese morphological analyzer | Apache-2.0 |
| IPAdic dictionary (bundled with kuromoji.js) | Morphological dictionary, served as static assets | IPADIC license |
The deployed app serves the sasara model and the IPAdic dictionary files as static assets, so the CC BY-SA 4.0 attribution/share-alike terms and the IPADIC notice apply to redistributions of those files. The app's footer carries the same attributions.


