kaorism / wordcut

Thai word breaker for Node.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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
worcut < input_file > output_file

Options

  • --delim
  • --dict

Web API

node server.js

Trying Web API

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

Development

About

Thai word breaker for Node.js

License:GNU Lesser General Public License v3.0


Languages

Language:JavaScript 100.0%