Nonstop Perpetual Motion
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

wordcut

0.8.2 • Public • Published

wordcut

Thai word breaker for Node.js

Installation

npm install wordcut

Usage

var wordcut = require("wordcut");
 
wordcut.init();
console.log(wordcut.cut("กากา"));

With additional custom dictionary

//see test/test_customdict.js
wordcut.init([customdict/*.txt],true);

Command line interface

npm install -g wordcut
echo 'กากากา' | wordcut

Options

  • --delim
  • --dict

Web API

node server.js

Trying Web API

curl -X POST --data-binary '{"line":"กากา"}' http://localhost:8882/segment

Development

install

npm i wordcut

Downloadsweekly downloads

44

version

0.8.2

license

none

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar