Skip to content

Latest commit

 

History

History
121 lines (85 loc) · 3.51 KB

README_EN.md

File metadata and controls

121 lines (85 loc) · 3.51 KB

Build Status Author Platform Performance License Dependency Status devDependency Status NpmDownload Status NPM Version


NodeJieba 简体中文

Introduction

The Jieba Chinese Word Segmentation Implemented By Node.js .

Download

npm install nodejieba

Or cnpm instead of npm

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

Usage

var nodejieba = require("nodejieba");
var result = nodejieba.cut("南京市长江大桥");
console.log(result);
//["南京市","长江大桥"]

See details in test/demo.js

POS Tagging

var nodejieba = require("nodejieba");
console.log(nodejieba.tag("红掌拨清波"));
//[ { word: '红掌', tag: 'n' },
//  { word: '拨', tag: 'v' },
//  { word: '清波', tag: 'n' } ]

See details in test/demo.js

Keyword Extractor

var nodejieba = require("nodejieba");
var topN = 4;
console.log(nodejieba.extract("升职加薪,当上CEO,走上人生巅峰。", topN));
//[ { word: 'CEO', weight: 11.739204307083542 },
//  { word: '升职', weight: 10.8561552143 },
//  { word: '加薪', weight: 10.642581114 },
//  { word: '巅峰', weight: 9.49395840471 } ]

See details in test/demo.js

Testing

Testing passed in the following version:

  • node v0.10.2
  • node v0.12.1
  • iojs v1.3.0
  • iojs v2.2.1
  • node v4.0.0

Cases

Performance

It is supposed to be the best in the angle of high performance, because its basic foundation is powered by C++.

Online Demo

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

Contact

Email: [email protected] QQ: 64162451

image

Licens

MIT http://yanyiwu.mit-license.org

Thanks

  • [Jieba]

Author