mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-13 20:29:24 +00:00
1.3 KiB
1.3 KiB
Language Modelling Layer (LMLayer)
Provide predictions and corrections while you type!
See Worker Communication Protocol for a semi-formal specification on how the Worker and the main thread communicate.
System dependencies
You will need Bash and Node.js >= 10.0.
Build
Run build.sh. This will also automatically install dependencies with npm.
./build.sh configure build
Two-stage compilation process
TODO: this is well and truly out of date...
Since the primary LMLayer code runs within a Web Worker, build.sh compiles the
LMLayer in two stages:
-
Compile the inner worker code
- Compile the TypeScript sources for only the Worker code.
- Wrap the Worker code as
embedded_worker.js
-
Compile the top-level code
- Include
embedded_worker.jsverbatim using a TypeScript directive. - Compile the top-level TypeScript code.
- Unwrap the Worker code at runtime.
- Include
Test
This will run both headless unit tests, and in-browser unit tests and integration tests:
./build.sh test