GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - seanghay/split-khmer: Split Khmer sentence into an array of words.

BranchesTags
Open more actions menu

Latest commit

 

History

21 Commits
21 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
src
src
 
 
test
test
 
 
wasm
wasm
 
 
.gitignore
.gitignore
 
 
license
license
 
 
package.json
package.json
 
 
pnpm-lock.yaml
pnpm-lock.yaml
 
 
readme.md
readme.md
 
 
tsconfig.json
tsconfig.json
 
 
tsup.config.ts
tsup.config.ts
 
 
vite.config.ts
vite.config.ts
 
 

Repository files navigation

split-khmer

Split Khmer words

Split Khmer sentence into an array of words.

test version

Installation

npm i split-khmer

Usage

// Node.js 16+ ESM
import { split } from 'split-khmer'

// Browser Module
import { split } from 'https://unpkg.com/split-khmer@latest/dist/index.mjs'

// CommonJS
const { split } = require('split-khmer') 

const values = split('កូនខ្មែរអាចធ្វើបាន');

console.log(values);
// [ 'កូន', 'ខ្មែរ', 'អាច', 'ធ្វើ', 'បាន' ]

⚠️ Note

Intl.Segmenter is available only in Node.js 16 and latest Chrome browser. You need to use a polyfill to make it available to older browsers.

We provided a BreakIterator binary for you in order to create a polyfill for Khmer language. The binary file will be in ./dist/break_iterator_km.wasm.

e.g. The distibuted url will be https://unpkg.com/[email protected]/dist/break_iterator_km.wasm

Use this library as a polyfill: intl-segmenter-polyfill

Browser Supports

https://caniuse.com/mdn-javascript_builtins_intl_segmenter_segment

License

MIT

About

Split Khmer sentence into an array of words.

split-khmer.netlify.app/

Topics

cambodiakhmer

Resources

Readme
MIT license
Activity

Stars

20 stars

Watchers

3 watching

Forks

2 forks
Report repository

Releases

Used by

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.