spiegel-keyman/common/models/wordbreakers
2023-04-18 08:26:19 +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 fix(common): CI test-build issues for lm-layer config, other configs 2023-04-17 12:24:37 +07:00
package.json fix(common/models): build script fix for models/templates ci test 2023-04-18 08:26:19 +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', '!' ]