feat(dictionary): Japanese cut into words and looked up on the device

Once the person agrees, the device holds MeCab's IPADIC and the
instance's JMdict and cuts lines as Jisho.org does, so their text never
leaves it (ADR 0012). MeCab comes through mecab_for_dart, whose build
hook compiles it; its tokens are grouped by Ve's rules, written anew in
Dart, with に kept a word of its own. Each word is found as it stands or
as a form of a word, else by its dictionary form, else as the longest
words it holds from token to token; longer words over token boundaries
are offered as before.

The curator packs Ubuntu's compiled IPADIC beside the dictionary files
(curate ipadic, and every update run). The server exports its JMdict
from its tables, so the device finds the same keys and keeps the same
versions, and serves both at /device-dictionaries/, named in
dictionary.deviceFiles('ja') with their hashes; Caddy forwards the path.

The app checks each file against its hash, unpacks IPADIC, builds a
SQLite database from the export on an isolate, and asks the instance
for newer files every 30 days, downloading only what changed. The Watch
screen offers the download once per device with its size (34 MB, some
150 MB once set up); Settings downloads and removes them. Without them,
or should cutting on the device fail, lines go to the instance as
before. MeCab's, IPADIC's and Ve's licences join the licence list.

Every build now needs a C++ compiler; mecab_for_dart holds code_assets
at 1.x.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
Tizian 「ティツィアーン」 2026-10-15 21:55:00 +02:00
commit 1d2011a676
Signed by: raisondetredev
GPG key ID: 07F6FCF405488B64

View file

@ -41,6 +41,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.0.0"
android_libcpp_shared:
dependency: transitive
description:
name: android_libcpp_shared
sha256: eefa60d36972d1b12f566ff94431a97f2666a6c28bd6fa6184e81f88968708e5
url: "https://pub.dev"
source: hosted
version: "0.2.1"
animations:
dependency: transitive
description:
@ -246,10 +254,10 @@ packages:
dependency: transitive
description:
name: code_assets
sha256: "828110d598123b5ea96c00c9f3c72105bf79f8ee36c20a39b26209ade421ec57"
sha256: bf394f466ba9205f1812a0433b392d6af280f155f56651eda7c18cc32ed493b8
url: "https://pub.dev"
source: hosted
version: "2.1.0"
version: "1.2.1"
collection:
dependency: transitive
description:
@ -1021,6 +1029,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.5.0"
mecab_for_dart:
dependency: transitive
description:
name: mecab_for_dart
sha256: "2ddbcec4e51e8b5a4bef28592a5c034baa1698cce48394cf3091d569014bb519"
url: "https://pub.dev"
source: hosted
version: "2.0.5"
media_kit:
dependency: transitive
description:
@ -1081,10 +1097,10 @@ packages:
dependency: transitive
description:
name: native_toolchain_c
sha256: "90eaad8059ebc2004a63810a4696ea9acdb02473e47ed3b6b3bafb100ac77e31"
sha256: a1c26117c48cebe5677b0cf0e33a980a79a7c5577effc86f52e5a0d309cdcb60
url: "https://pub.dev"
source: hosted
version: "0.19.5"
version: "0.19.3"
nested:
dependency: transitive
description:
@ -1121,10 +1137,10 @@ packages:
dependency: transitive
description:
name: objective_c
sha256: ad56fd53a78ff6b1472fa59ff2a4e8b8ccabafc586fc263a1dfad0b99b5553e3
sha256: b7fb95a6d9a4f009edd63dc5ac69f07420b23a16161c6dd8660290b59c602e8e
url: "https://pub.dev"
source: hosted
version: "9.6.0"
version: "9.5.0"
package_config:
dependency: transitive
description:
@ -1844,6 +1860,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.4.0"
universal_ffi:
dependency: transitive
description:
name: universal_ffi
sha256: dd2b662d619e10e24532db6e9b80c5bef9da6a09daf1d9b69bba727b2f6c95c6
url: "https://pub.dev"
source: hosted
version: "1.5.1"
universal_html:
dependency: transitive
description:
@ -2052,6 +2076,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.7.0"
wasm_ffi:
dependency: transitive
description:
name: wasm_ffi
sha256: "5a402d5817e3c77e8039f95487a5d8f77d05897c29ce12495b0c5cdd745d5623"
url: "https://pub.dev"
source: hosted
version: "2.4.0"
watcher:
dependency: transitive
description: