https://github.com/7c00/zhseg.js
A browser-side Chinese word segmenter written in javascript.
https://github.com/7c00/zhseg.js
Last synced: 3 months ago
JSON representation
A browser-side Chinese word segmenter written in javascript.
- Host: GitHub
- URL: https://github.com/7c00/zhseg.js
- Owner: 7c00
- Created: 2014-06-04T12:06:57.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2014-06-10T13:35:29.000Z (almost 11 years ago)
- Last Synced: 2025-01-18T18:54:55.734Z (5 months ago)
- Language: JavaScript
- Homepage: http://7c00.github.io/zhseg.js/
- Size: 2.53 MB
- Stars: 3
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# zhseg.js
A browser-side Chinese word segmenter written in javascript. The forward maximum match (FMM) algorithm is implemented, and other algorithms might come later. Some HTML5 features, web worker for example, are used, as well as some code from [mikedboer's trie](https://github.com/mikedeboer/trie). Test the project on http://t09def.github.io/zhseg.js/test/ with Chrome (latest versions are better, and other browsers are not tested).
To run the code on your own machine, Python 2.7.x is required, and then
```bash
# pull the code
git clone https://github.com/t09def/zhseg.js.git
# (optional) generate word.v2.js
python ./zhseg.js/dict/dict.py
# launch a local http server
python -m SimpleHTTPServer
# open http://localhost:8000/zhseg.js/test/ in your Chrome
```