spiegel-keyman/common/models/wordbreakers
2023-02-16 16:05:45 +07:00
..
src chore(common/models): lm-worker import path cleanup 2023-02-03 14:52:12 +07:00
test chore(common/models): models-wordbreakers import pathing 2023-02-03 14:03:30 +07:00
.gitignore chore(web): make build paths consistent 2022-05-04 10:13:44 +10:00
build-bundler.js change(common/models): wordbreaker .d.ts bundling 2023-01-31 12:24:04 +07:00
build.sh chore(common/models): cleanup in branch-introduced ./build.sh scripts 2023-02-02 14:10:59 +07:00
package.json chore(common/web): Merge branch 'feature-esmodule-web-engine' into change/common/web/early-import-path-cleanup 2023-02-16 15:52:25 +07:00
README.md docs(common/models): Apply suggestions from code review 2020-05-19 15:30:43 -06:00
tsconfig.json chore(common/web): TS import cleanup via subpaths 2023-02-16 16:05:45 +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', '!' ]