spiegel-keyman/web/src/engine/predictive-text/wordbreakers
Joshua Horton 155c1a2b12 maint: update mocha
Some of the npm audit warnings left after #13897 require an updated `mocha` version to remedy.  As we only really use `mocha` to do unit-testing, it should be safe to update if all of our existing tests pass with the new version.

Test-bot: skip
2025-05-13 14:02:02 +07:00
..
src/main refactor(common): move all lexical model types into LexicalModelTypes container 2024-11-27 09:46:09 +07:00
tests chore(web): rename test files and folders 2024-11-26 17:10:19 +01:00
tools/data-compiler chore: use explicit node: prefix on more module imports 2025-04-03 08:10:50 +07:00
.c8rc.json chore(web): fix coverage-reporting artifact 2025-02-12 15:56:54 +07:00
.gitignore refactor(web): move common/models to web/src/engine/predictive-text 2024-09-10 17:45:22 +02:00
build.sh chore(web): replace --ci flag with builder_is_ci_build 2025-05-02 09:39:39 +07:00
package.json maint: update mocha 2025-05-13 14:02:02 +07:00
README.md refactor(web): move common/models to web/src/engine/predictive-text 2024-09-10 17:45:22 +02:00
tsconfig.json refactor(web): move common/models to web/src/engine/predictive-text 2024-09-10 17:45:22 +02: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', '!' ]