# wordcut

> Thai word breaker for Node.js

Latest version **0.9.1** (published 2020-09-18) · 4.6K weekly downloads

## Install

```sh
npm install wordcut
pnpm add wordcut
yarn add wordcut
bun add wordcut
```

Provides the command `wordcut`.

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.9.1 |
| Published | 2020-09-18 |
| First published | 2014-02-02 |
| Weekly downloads | 4.6K |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 0.10.0 |
| Dependencies | 3 |
| Unpacked size | 476.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 153 |
| Author | Vee Satayamas |
| Maintainers | kobkrit, veer66 |
| Keywords | word, thai, segmentation, break, boundary |

## Links

- npm: https://www.npmjs.com/package/wordcut
- Repository: https://github.com/veer66/wordcut
- Issues: https://github.com/veer66/wordcut/issues
- npm.io page: https://npm.io/package/wordcut

## Dependencies (3)

- [body](https://npm.io/package/body.md) *
- [glob](https://npm.io/package/glob.md) ^5.0.14
- [underscore](https://npm.io/package/underscore.md) *

## Recent versions

- 0.9.1 (latest) — 2020-09-18
- 0.9.0 — 2018-12-03
- 0.8.2 — 2018-05-23
- 0.8.1 — 2016-03-15
- 0.7.5 — 2015-05-05
- 0.7.4 — 2014-05-19
- 0.7.1 — 2014-02-25
- 0.7.0 — 2014-02-25
- 0.6.5 — 2014-02-22
- 0.6.4 — 2014-02-22
- 0.6.3 — 2014-02-22
- 0.6.2 — 2014-02-21
- 0.6.1 — 2014-02-21
- 0.0.8 — 2014-02-21
- 0.0.7 — 2014-02-21
- … 5 more at https://npm.io/package/wordcut/versions

## README

wordcut
=======

Thai word breaker for Node.js


Installation
------------

```
npm install wordcut
```


Usage
-----

```javascript
var wordcut = require("wordcut");

wordcut.init();
console.log(wordcut.cut("กากา"));
```

With additional custom dictionary

```javascript
//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
-----------

* Explanation in Thai about version 0.0.3 http://veer66.wordpress.com/2014/02/19/wordcut2014/

---
_Source: https://npm.io/package/wordcut · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
