mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-07 09:25:33 +00:00
Note: there is a bit of potential confusion about the difference between /resources/builder.inc.sh (the full implementation for builder scripts), and /resources/build/builder.inc.sh (the source script that builder scripts should always use). This allows us to make assumptions that will always be true for builder scripts that may not be true for other scripts, such as setting base folder. |
||
|---|---|---|
| .. | ||
| src | ||
| test | ||
| .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', '!' ]