@kkeyboard/data-km
v0.3.15
Published
Versioned offline Khmer runtime data for KKeyboard
Readme
@kkeyboard/data-km
Versioned offline Khmer runtime data for KKeyboard.
This package contains only derived client artifacts:
- the compact compiled engine bundle;
- bounded general-language context counts;
- bounded formal-register context counts;
- a release manifest.
It does not contain the SQLite dictionary, raw news articles, raw corpus text, or review files.
import { createEngine, createLocalContextModel, decodeRuntimeBundle } from "@kkeyboard/core";
import { getRuntimeAssets } from "@kkeyboard/data-km";
import { loadCachedResponse } from "@kkeyboard/web";
const assets = getRuntimeAssets();
const bundleResponse = await loadCachedResponse(assets.runtimeBundle, {
cacheName: "my-app-kkeyboard-runtime-v1",
});
const bundle = decodeRuntimeBundle(await bundleResponse.arrayBuffer());
const engine = createEngine({ compiled: bundle });The asset URLs are standard URL objects so browser hosts can pass them to
fetch, Cache Storage, or their own asset loader. Bump the application cache
name when the runtime data package changes.
