Namely, Pickled Meatballs
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

wordcut-ts

0.0.3 • Public • Published

Wordcut ported to TypeScript

Thai word breaker library for Node.js

Under development ...

Installation

yarn add wordcut-ts

Usage

import { Wordcut } from "wordcut-ts";
 
var wordcut = new Wordcut(); 
wordcut.initNoDict();
 
console.log(wordcut.cut("กากา"));

With additional custom dictionary

wordcut.init("customdict/*.txt" ,true);

Web API

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

Development

install

npm i wordcut-ts

Downloadsweekly downloads

65

version

0.0.3

license

none

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar