Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/veer66/wordcut
Thai word breaker for Node.js
https://github.com/veer66/wordcut
Last synced: about 2 months 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 (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2021-08-04T13:57:03.000Z (over 3 years ago)
- Last Synced: 2024-05-20T07:34:28.060Z (8 months ago)
- Language: JavaScript
- Size: 188 KB
- Stars: 139
- Watchers: 21
- Forks: 39
- Open Issues: 7
-
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/