Skip to content
Thai word breaker for Node.js
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin package.json recognize all data/tdict-* Sep 8, 2015
data Add new dictionary from libthai And array dictionary file input support Mar 23, 2015
lib
test Use prefix tree Dec 3, 2018
.gitignore Add gulp dependencies and Modify gitignore Sep 28, 2015
LICENSE Initial commit Feb 2, 2014
README.md Update README.md May 23, 2018
gulpfile.js Add gulpfile to automatically compile the code to be runnable on the … Sep 28, 2015
package.json Bump version to 0.9.0 Dec 3, 2018
server.js

README.md

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

You can’t perform that action at this time.