spiegel-keyman/common/models/wordbreakers
2022-09-08 09:11:26 +07:00
..
src feat(web): more default-breaker unit tests 2022-09-06 14:52:16 +07:00
test change(common/models): tweak to flag-emoji test for clarity 2022-09-08 09:11:26 +07:00
.gitignore chore(web): make build paths consistent 2022-05-04 10:13:44 +10:00
package.json fix(common/models): models/templates unit tests 2022-09-06 09:48:52 +07:00
README.md docs(common/models): Apply suggestions from code review 2020-05-19 15:30:43 -06:00
tsconfig.json chore(web): make build paths consistent 2022-05-04 10:13:44 +10: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', '!' ]