mirror of
https://github.com/keymanapp/keyman.git
synced 2026-10-10 16:07:29 +00:00
Many of the types had very generic names (e.g. `Configuration`), and as
the types are now exported from `@keymanapp/common-types`, this was
unhelpful.
For units with many references, I used TypeScript's import-equals to
reduce the change impact. For units with only a few references, I added
the `LexicalModelTypes.` prefix to the references in source.
(Best reference I could find for import-equals:
|
||
|---|---|---|
| .. | ||
| src/main | ||
| test | ||
| tools/data-compiler | ||
| .c8rc.json | ||
| .gitignore | ||
| build.sh | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
@keymanapp/models-wordbreakers
The word breakers bundled in Keyman's modeling layer (common/models).
Includes:
default— a word breaker based on the Unicode default word boundary specification- deprecated
ascii— an example word breaker - deprecated
placeholder— an example word breaker
Usage
import {wordBreakers} from '@keymanapp/models-wordbreakers';
const breakWords = wordBreakers['default'];
console.log(breakWords('Hello, World!').map(span => span.text));
// prints: [ 'Hello', ',', 'World', '!' ]