https://github.com/veer66/wordcut
Thai word breaker for Node.js
https://github.com/veer66/wordcut
Last synced: 6 days ago
JSON representation
Thai word breaker for Node.js
- Host: GitHub
- URL: https://github.com/veer66/wordcut
- Owner: veer66
- License: lgpl-3.0
- Created: 2014-02-02T16:58:22.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2021-08-04T13:57:03.000Z (almost 4 years ago)
- Last Synced: 2025-04-18T09:26:11.015Z (28 days ago)
- Language: JavaScript
- Size: 188 KB
- Stars: 146
- Watchers: 20
- Forks: 40
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- nlp_thai_resources - GitHub
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/