Skip to content

newebug/nodejieba

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status Dependency Status devDependency Status NpmDownload Status


NodeJieba "结巴"分词的Node.js版本

Introduction

NodeJieba只是CppJieba简单包装而成的node扩展,用来进行中文分词。

详见NodeJiebaBlog

Example

npm install nodejieba

因为npm速度很慢而且经常因为墙的原因出现莫名其妙的问题,在此强烈建议使用cnpm,命令如下:

npm --registry=http://r.cnpmjs.org install nodejieba

demo.js示例

var segment = require("nodejieba");
segment.loadDict("./node_modules/nodejieba/dict/jieba.dict.utf8", "./node_modules/nodejieba/dict/hmm_model.utf8");
console.log(segment.cut("南京市长江大桥"));

Testing

node v0.10.2下测试通过

Demo

http://cppjieba-webdemo.herokuapp.com/ (chrome is suggested)

Thanks

Jieba中文分词

Contact

wuyanyi09@gmail.com

About

"结巴"中文分词的Node.js版本

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 99.5%
  • Other 0.5%