Commit Graph

6 Commits

Author SHA1 Message Date
c7718ece52 data: one trie for maps and dictionaries, one loader
The hash map served a single exact-match lookup that the trie already
answers, at the price of a second container, a second file loader with
its own drift, and a Str-to-UTF-8 conversion on every chain probe. The
files are small (kanji.dict is 7.5k lines), so the trie holds both.
trieopen validates keys and each space-separated value word against Str
and reports path:line; trielookup takes the Str every caller holds and
treats a nil trie as an unloaded map; trienew/trieput exist for tests.
The overflow guards on growth, Trie.root (always 0) and the per-language
init loop written twice are gone.
2026-08-16 15:56:32 +09:00
bfe83d0119 fix(data): reject partial and malformed map data 2026-08-14 23:09:55 +09:00
8d68e00f2b data: simplify and validate Japanese imports 2026-08-12 17:32:28 +09:00
103f2ec448 fix: harden small core containers 2026-08-12 15:54:16 +09:00
e70278a3d2 fix core text and map ownership 2026-08-11 19:32:58 +09:00
5653298bb1 use trie for map lookup 2026-02-08 16:36:59 +09:00