# Third-party data

The dormant reference datasets in `jlpt-reference-data.js` and `frequency-reference-data.js` combine:

- Word ordering and readings from [Real Kana](https://realkana.com/).
- English definitions from [JMdict](https://www.edrdg.org/jmdict/j_jmdict.html).
- Character meanings from [KANJIDIC2](https://www.edrdg.org/wiki/KANJIDIC_Project.html).

JMdict and KANJIDIC2 are provided by the Electronic Dictionary Research and Development Group under the [EDRDG licence](https://www.edrdg.org/edrdg/licence.html), including Creative Commons Attribution-ShareAlike 4.0 terms. Data assembly is part of Ink Run.

## Supplemental vocabulary study bands

`src/domain/jlpt-supplement-data.ts` includes matching written forms and readings
from [Jonathan Waller's Tanos vocabulary lists](https://www.tanos.co.uk/jlpt/),
licensed under Creative Commons Attribution (CC BY), using the JSON conversion by
[Bluskyo/JLPT_Vocabulary](https://github.com/Bluskyo/JLPT_Vocabulary).
These are unofficial study references, not a verified official JLPT syllabus.
Ink Run normalizes spellings/readings, retains relevant app entries, and applies
approximate editorial bands from `scripts/jlpt-study-overrides.json` to additional
words and misleading basic-word labels. The generated data preserves whether a
classification comes from the reference or an estimate. Regenerate with
`npm run data:jlpt-study-bands -- /path/to/JLPT_vocab_ALL.json`, or omit the path to
download the public source. Number/counter patterns are classified separately.

## N5 and N4 Katakana vocabulary

`scripts/katakana-source.json` contains 101 selected entries from
[OpenJLPT](https://github.com/evanclan/OpenJLPT) at revision
`0d1d3410bec90bd4098a7c72de820543cb4f707c` (version 0.3.0).
OpenJLPT uses JMdict and KANJIDIC2 from EDRDG, Jonathan Waller's JLPT lists,
and Tatoeba; see its [source attribution notice](https://github.com/evanclan/OpenJLPT/blob/0d1d3410bec90bd4098a7c72de820543cb4f707c/NOTICE.md).
The selected source data and its adaptation in `katakana-data.js` are distributed
under [Creative Commons Attribution-ShareAlike 4.0](https://creativecommons.org/licenses/by-sa/4.0/).
The snapshot retains the OpenJLPT IDs, original readings, meanings, and variants.
INKY adds hiragana readings, long-vowel input variants, study sets, and editorial
meaning clarifications (including ガス, ビル, and ポスト). No OpenJLPT example
sentences or recordings are imported. Levels are unofficial study estimates.
Regenerate locally with `npm run data:katakana`; source updates are explicit.
Pronunciation uses the app's Japanese browser voice when no recording is bundled.
All 101 Katakana words have AI-generated Japanese pronunciation recordings in
`audio/foundry/`, generated with Microsoft Foundry using the app's existing
speech deployment. These are INKY recordings, not upstream dictionary audio.

## Study example sentences

`sentence-examples-data.js` contains Japanese/English sentence pairs by
[Tatoeba contributors](https://tatoeba.org/), selected from EDRDG's
[JMdict with examples](https://www.edrdg.org/pub/Nihongo/JMdict_e_examp.gz)
and its [sentence index](https://www.edrdg.org/pub/Nihongo/examples.utf.gz).
These sentences are provided under [Creative Commons Attribution 2.0 France](https://creativecommons.org/licenses/by/2.0/fr/).
Each imported example retains its Japanese Tatoeba sentence ID; the study card
links to the original sentence, translations, and contributor attribution.
Japanese and English text is preserved. Target highlights and spaced romaji are
Ink Run additions. Source-file SHA-256 hashes are retained in the generated file.

Romaji is generated at development time using [Kuromoji.js](https://github.com/takuyaa/kuromoji.js)
(Apache-2.0) and its bundled IPADIC dictionary, with context readings from the
EDRDG sentence index where available. It is machine-generated and can contain
reading errors. The tokenizer and dictionary are not shipped with the app.
`src/curated-sentence-examples.js` contains original Ink Run examples with
manually specified romaji; these override corpus examples for common words.

`audio/foundry-sentences/` contains AI-generated Japanese readings of the same
sentence examples, produced using the user's Microsoft Foundry text-to-speech
deployment. Shared sentences reuse one recording. The per-card text attribution
and original Tatoeba sentence links also identify the source of the recorded
sentences; generation does not imply Tatoeba reviewed the audio.

## Korean graded vocabulary

`scripts/korean-topik-source.json` records the 10,635 vocabulary entries from the
National Institute of Korean Language's **International Standard Curriculum for
Korean Language (2017)**, using its corrected November 17, 2020 workbook.
The [original workbook and report](https://www.korean.go.kr/front/reportData/reportDataView.do?mn_id=45&report_seq=932)
are offered under **KOGL Type 1 (attribution)**. The source snapshot retains the
workbook SHA-256, original row numbers, homograph notation, parts of speech,
guide phrases, and curriculum grades. Ink Run removes homograph numbers and
duplicate spellings from displayed headwords while preserving row identities.

English glosses and definitions come from the National Institute of Korean
Language's [Korean-English Learners’ Dictionary](https://krdict.korean.go.kr/eng/mainAction),
under [Creative Commons Attribution-ShareAlike 2.0 Korea](https://creativecommons.org/licenses/by-sa/2.0/kr/).
The dictionary text snapshot was obtained from
[spellcheck-ko/korean-dict-nikl](https://github.com/spellcheck-ko/korean-dict-nikl)
at revision `42c0d01889f34536e9cf94fe57f62bd2055b1bde`. Dictionary-derived text
and its adaptations in the Korean data files are distributed under the same
CC BY-SA 2.0 KR terms. Original dictionary entry and sense IDs are retained on
each matched card, and the app links directly to the corresponding entry.
Unmatched cards link to a dictionary search.

`src/korean/topik-data.json` adds Foundry-generated Revised Romanization guides,
English translations of the curriculum's guide phrases, dictionary sense
selection, and supplementary glosses where no matching dictionary sense was
selected. Each card records whether its meaning is dictionary text or generated
text. These additions can contain errors; they do not change the source grades.
No dictionary audio, images, or dictionary example sentences are redistributed.
Korean pronunciation MP3s are generated separately with the user's Foundry
speech deployment; repeated headwords share one recording.

The UI calls these **TOPIK vocabulary study cards**. The six numeric grades are
NIKL curriculum grades, not a claimed official or exhaustive TOPIK exam syllabus.
