spiegel-keyman/common/models/wordbreakers
Marc Durdin cd8121ef65 chore(common): builder scripts now use /resources/build/builder.inc.sh
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.
2024-05-02 15:54:31 +07:00
..
src feat(common/models): tslib use, treeshaking in lm-worker 2023-06-08 14:39:55 +07:00
test chore(common/models): models-wordbreakers import pathing 2023-02-03 14:03:30 +07:00
.c8rc.json fix(common/web): fixed sourcemap path rooting issues, dropped unused worker products 2023-06-12 14:45:48 +07:00
.gitignore chore(web): make build paths consistent 2022-05-04 10:13:44 +10:00
build.sh chore(common): builder scripts now use /resources/build/builder.inc.sh 2024-05-02 15:54:31 +07:00
package.json feat(web): lm-worker es6-bundling 2023-12-18 10:32:36 +07:00
README.md docs(common/models): Apply suggestions from code review 2020-05-19 15:30:43 -06:00
tsconfig.json chore(web): kmw-worker tsconfig -> common/models 2023-06-14 08:16:15 +07:00

@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', '!' ]