DictionaryIndex: JMdict in SQLite, answering Candidate lookups #8
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
mobrule/kurageyomi#8
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Parent
#1
What to build
The plugin gains a dictionary. The
jmdict-engarchive from jmdict-simplified is embedded in the dll as a resource; on first start the plugin expands it and builds a SQLite database under its data dir, keyed to the JMdict version so a restart with an unchanged dictionary skips the build entirely.An authenticated data endpoint takes a batch of Candidate Headwords and returns the Entry for each one that exists: readings, senses, part of speech per sense, misc tags (
sl,col,net-sl,vulg), and priority. It returns them in no particular order and filters nothing — ranking belongs to the browser (ADR 0006).While the build is running the endpoint reports a building state rather than failing, so the phone can say what is happening instead of showing an error.
This slice is server-only and verifiable with curl. Nothing on the phone changes.
Acceptance criteria
jmdict-engships inside the dll; the deploy loop is still just the dll andmeta.jsonBlocked by
None - can start immediately
Merged to
mainin168b131.The
jmdict-eng3.6.2 archive is embedded in the dll and streamed into SQLite under the plugin data dir on first start, keyed to the JMdict version.POST Kurageyomi/api/Entriestakes a batch of Candidate Headwords and returns Entries — readings, senses, per-sense part of speech, misc tags, priority — unordered and unfiltered, per ADR 0006.Measured against the real archive: 4.4s build, 62MB database.
はしreturns 8 Entries;食べるcomes back[v1,vt]with priority. The deploy loop is still just the dll andmeta.json; the dll is now 11.5MB.Covered by
DictionaryIndexTestsandEntriesEndpointTestsagainst a small fixture dictionary — the suite never touches the real 214k-entry build.One acceptance criterion was wrong and was corrected: "returns one Entry each" contradicts "filters nothing", since JMdict holds eight words under
はしand picking one is ranking. It returns all Entries per Headword, flat.Carried to #13:
Microsoft.Data.Sqliteis not shipped in the plugin — it resolves at runtime from Jellyfin's own copy. That is what keeps the deploy to one dll, and it is unverified on a real server.