Comparing version 2.5.1 to 2.5.2
# NodeJieba ChangeLog | ||
## v2.5.2 | ||
+ Merged [pull request 193](https://github.com/yanyiwu/nodejieba/pull/193) | ||
## v2.5.1 | ||
@@ -4,0 +8,0 @@ |
@@ -1,2 +0,2 @@ | ||
var binary = require('node-pre-gyp'); | ||
var binary = require('@mapbox/node-pre-gyp'); | ||
var path = require('path'); | ||
@@ -3,0 +3,0 @@ var binding_path = binary.find(path.resolve(path.join(__dirname,'./package.json'))); |
{ | ||
"name": "nodejieba", | ||
"description": "chinese word segmentation for node", | ||
"version": "2.5.1", | ||
"version": "2.5.2", | ||
"author": "Yanyi Wu <i@yanyiwu.com>", | ||
@@ -27,4 +27,4 @@ "maintainers": [ | ||
"dependencies": { | ||
"node-addon-api": "^3.0.2", | ||
"node-pre-gyp": "^0.14.0" | ||
"@mapbox/node-pre-gyp": "^1.0.4", | ||
"node-addon-api": "^3.0.2" | ||
}, | ||
@@ -31,0 +31,0 @@ "devDependencies": { |
107
README_EN.md
[![Build Status](https://travis-ci.org/yanyiwu/nodejieba.png?branch=master)](https://travis-ci.org/yanyiwu/nodejieba) | ||
[![Author](https://img.shields.io/badge/author-@yanyiwu-blue.svg?style=flat)](http://yanyiwu.com/) | ||
[![Financial Contributors on Open Collective](https://opencollective.com/nodejieba/all/badge.svg?label=financial+contributors)](https://opencollective.com/nodejieba) [![Author](https://img.shields.io/badge/author-@yanyiwu-blue.svg?style=flat)](http://yanyiwu.com/) | ||
[![Donate](https://img.shields.io/badge/donate-eos_gitdeveloper-orange.svg)](https://eosflare.io/account/gitdeveloper) | ||
[![Platform](https://img.shields.io/badge/platform-Linux,%20OS%20X,%20Windows-green.svg?style=flat)](https://github.com/yanyiwu/nodejieba) | ||
[![Performance](https://img.shields.io/badge/performance-excellent-brightgreen.svg?style=flat)](http://yanyiwu.com/work/2015/06/14/jieba-series-performance-test.html) | ||
[![License](https://img.shields.io/badge/license-MIT-yellow.svg?style=flat)](http://yanyiwu.mit-license.org) | ||
[![Dependency Status](https://david-dm.org/yanyiwu/nodejieba.png?theme=shields.io)](https://david-dm.org/yanyiwu/nodejieba) | ||
[![devDependency Status](https://david-dm.org/yanyiwu/nodejieba/dev-status.png?theme=shields.io)](https://david-dm.org/yanyiwu/nodejieba#info=devDependencies) | ||
[![NpmDownload Status](http://img.shields.io/npm/dm/nodejieba.svg)](https://www.npmjs.org/package/nodejieba) | ||
[![NPM Version](https://img.shields.io/npm/v/nodejieba.svg?style=flat)](https://www.npmjs.org/package/nodejieba) | ||
[![Code Climate](https://codeclimate.com/github/yanyiwu/nodejieba/badges/gpa.svg)](https://codeclimate.com/github/yanyiwu/nodejieba) | ||
[![Coverage Status](https://coveralls.io/repos/yanyiwu/nodejieba/badge.svg?branch=master&service=github)](https://coveralls.io/github/yanyiwu/nodejieba?branch=master) | ||
- - - | ||
@@ -14,7 +15,9 @@ | ||
[![logo](http://images.yanyiwu.com/NodeJiebaLogo-v1.png)](https://github.com/yanyiwu/nodejieba) | ||
## Introduction | ||
The Jieba Chinese Word Segmentation Implemented By Node.js . | ||
`NodeJieba` provides chinese word segmentation for Node.js based on [CppJieba]. | ||
## Download | ||
## Install | ||
@@ -28,3 +31,3 @@ ```sh | ||
```sh | ||
npm --registry=http://r.cnpmjs.org install nodejieba | ||
npm install nodejieba --registry=https://registry.npm.taobao.org --nodejieba_binary_host_mirror=https://npm.taobao.org/mirrors/nodejieba | ||
``` | ||
@@ -43,2 +46,34 @@ | ||
### Initialization | ||
Initialization is optional and will be executed once `cut` is called with the default dictionaries. | ||
Loading the default dictionaries can be called explicitly by | ||
```js | ||
nodejieba.load(); | ||
``` | ||
This is similar to the internal call of | ||
```js | ||
nodejieba.load({ | ||
dict: './dict/jieba.dict.utf8', | ||
hmmDict: './dict/hmm_model.utf8', | ||
userDict: './dict/userdict.utf8', | ||
idfDict: './dict/idf.utf8', | ||
stopWordDict: './dict/stop_words.utf8', | ||
}); | ||
``` | ||
If a dictionary parameter is missing, its default value will be uesd. | ||
#### Dictionary description | ||
+ dict: the main dictionary with weight and lexical tags, it's recommended to use the default dictionary | ||
+ hmmDict: hidden markov model, it's recommended to use the default dictionary | ||
+ userDict: user dictionary, it's recommended to modify it to your use case | ||
+ idfDict: idf information for keyword extraction | ||
+ stopWordDict: list of stop words for keyword extraction | ||
### POS Tagging | ||
@@ -58,3 +93,3 @@ | ||
``` | ||
```js | ||
var nodejieba = require("nodejieba"); | ||
@@ -75,9 +110,8 @@ var topN = 4; | ||
+ `node v0.10.2` | ||
+ `node v0.12.1` | ||
+ `iojs v1.3.0` | ||
+ `iojs v2.2.1` | ||
+ `node v4.0.0` | ||
+ `node v10` | ||
+ `node v12` | ||
+ `node v14` | ||
+ `node v15` | ||
## Cases | ||
## Use Cases | ||
@@ -87,5 +121,9 @@ + [gitbook-plugin-search-pro] | ||
## Similar projects | ||
+ [@node-rs/jieba](https://github.com/Brooooooklyn/node-rs/tree/master/packages/jieba) | ||
## Performance | ||
It is supposed to be the best in the angle of high performance, because its basic foundation is powered by C++. | ||
It is supposed to have the best performance out of all available Node.js modules. There is a post available in mandarin [Jieba中文分词系列性能评测]. | ||
@@ -100,14 +138,3 @@ ## Online Demo | ||
Email: `i@yanyiwu.com` | ||
QQ: 64162451 | ||
![image](http://7viirv.com1.z0.glb.clouddn.com/5a7d1b5c0d_yanyiwu_personal_qrcodes.jpg) | ||
## Licens | ||
MIT http://yanyiwu.mit-license.org | ||
## Thanks | ||
- [Jieba] | ||
## Author | ||
@@ -129,1 +156,31 @@ | ||
[pinyin]:https://github.com/hotoo/pinyin | ||
## Contributors | ||
### Code Contributors | ||
This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)]. | ||
<a href="https://github.com/yanyiwu/nodejieba/graphs/contributors"><img src="https://opencollective.com/nodejieba/contributors.svg?width=890&button=false" /></a> | ||
### Financial Contributors | ||
Become a financial contributor and help us sustain our community. [[Contribute](https://opencollective.com/nodejieba/contribute)] | ||
#### Individuals | ||
<a href="https://opencollective.com/nodejieba"><img src="https://opencollective.com/nodejieba/individuals.svg?width=890"></a> | ||
#### Organizations | ||
Support this project with your organization. Your logo will show up here with a link to your website. [[Contribute](https://opencollective.com/nodejieba/contribute)] | ||
<a href="https://opencollective.com/nodejieba/organization/0/website"><img src="https://opencollective.com/nodejieba/organization/0/avatar.svg"></a> | ||
<a href="https://opencollective.com/nodejieba/organization/1/website"><img src="https://opencollective.com/nodejieba/organization/1/avatar.svg"></a> | ||
<a href="https://opencollective.com/nodejieba/organization/2/website"><img src="https://opencollective.com/nodejieba/organization/2/avatar.svg"></a> | ||
<a href="https://opencollective.com/nodejieba/organization/3/website"><img src="https://opencollective.com/nodejieba/organization/3/avatar.svg"></a> | ||
<a href="https://opencollective.com/nodejieba/organization/4/website"><img src="https://opencollective.com/nodejieba/organization/4/avatar.svg"></a> | ||
<a href="https://opencollective.com/nodejieba/organization/5/website"><img src="https://opencollective.com/nodejieba/organization/5/avatar.svg"></a> | ||
<a href="https://opencollective.com/nodejieba/organization/6/website"><img src="https://opencollective.com/nodejieba/organization/6/avatar.svg"></a> | ||
<a href="https://opencollective.com/nodejieba/organization/7/website"><img src="https://opencollective.com/nodejieba/organization/7/avatar.svg"></a> | ||
<a href="https://opencollective.com/nodejieba/organization/8/website"><img src="https://opencollective.com/nodejieba/organization/8/avatar.svg"></a> | ||
<a href="https://opencollective.com/nodejieba/organization/9/website"><img src="https://opencollective.com/nodejieba/organization/9/avatar.svg"></a> |
@@ -44,3 +44,3 @@ [![Build Status](https://travis-ci.org/yanyiwu/nodejieba.png?branch=master)](https://travis-ci.org/yanyiwu/nodejieba) | ||
```sh | ||
npm --registry=http://r.cnpmjs.org install nodejieba | ||
npm install nodejieba --registry=https://registry.npm.taobao.org --nodejieba_binary_host_mirror=https://npm.taobao.org/mirrors/nodejieba | ||
``` | ||
@@ -66,3 +66,3 @@ | ||
``` | ||
```js | ||
nodejieba.load(); | ||
@@ -75,3 +75,3 @@ ``` | ||
``` | ||
```js | ||
nodejieba.load({ | ||
@@ -86,3 +86,3 @@ userDict: './test/testdata/userdict.utf8', | ||
``` | ||
```js | ||
nodejieba.load({ | ||
@@ -97,3 +97,3 @@ dict: nodejieba.DEFAULT_DICT, | ||
【词典说明】 | ||
#### 词典说明 | ||
@@ -120,3 +120,3 @@ + dict: 主词典,带权重和词性标签,建议使用默认词典。 | ||
``` | ||
```js | ||
var nodejieba = require("nodejieba"); | ||
@@ -137,8 +137,6 @@ var topN = 4; | ||
+ `node v0.10.2` | ||
+ `node v0.12.1` | ||
+ `iojs v1.3.0` | ||
+ `iojs v2.2.1` | ||
+ `node v4.0.0` | ||
+ `node v5.7.0` | ||
+ `node v10` | ||
+ `node v12` | ||
+ `node v14` | ||
+ `node v15` | ||
@@ -192,5 +190,2 @@ ## 应用 | ||
## Contributors | ||
@@ -197,0 +192,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11759984
63
212
+ Added@mapbox/node-pre-gyp@^1.0.4
+ Added@mapbox/node-pre-gyp@1.0.11(transitive)
+ Addedagent-base@6.0.2(transitive)
+ Addedansi-regex@5.0.1(transitive)
+ Addedaproba@2.0.0(transitive)
+ Addedare-we-there-yet@2.0.0(transitive)
+ Addedchownr@2.0.0(transitive)
+ Addedcolor-support@1.1.3(transitive)
+ Addeddebug@4.3.7(transitive)
+ Addeddetect-libc@2.0.3(transitive)
+ Addedemoji-regex@8.0.0(transitive)
+ Addedfs-minipass@2.1.0(transitive)
+ Addedgauge@3.0.2(transitive)
+ Addedhttps-proxy-agent@5.0.1(transitive)
+ Addedis-fullwidth-code-point@3.0.0(transitive)
+ Addedmake-dir@3.1.0(transitive)
+ Addedminipass@3.3.65.0.0(transitive)
+ Addedminizlib@2.1.2(transitive)
+ Addedmkdirp@1.0.4(transitive)
+ Addednode-fetch@2.7.0(transitive)
+ Addednopt@5.0.0(transitive)
+ Addednpmlog@5.0.1(transitive)
+ Addedreadable-stream@3.6.2(transitive)
+ Addedrimraf@3.0.2(transitive)
+ Addedsemver@6.3.17.6.3(transitive)
+ Addedstring-width@4.2.3(transitive)
+ Addedstring_decoder@1.3.0(transitive)
+ Addedstrip-ansi@6.0.1(transitive)
+ Addedtar@6.2.1(transitive)
+ Addedtr46@0.0.3(transitive)
+ Addedwebidl-conversions@3.0.1(transitive)
+ Addedwhatwg-url@5.0.0(transitive)
+ Addedyallist@4.0.0(transitive)
- Removednode-pre-gyp@^0.14.0
- Removedansi-regex@2.1.1(transitive)
- Removedaproba@1.2.0(transitive)
- Removedare-we-there-yet@1.1.7(transitive)
- Removedchownr@1.1.4(transitive)
- Removedcode-point-at@1.1.0(transitive)
- Removedcore-util-is@1.0.3(transitive)
- Removeddebug@3.2.7(transitive)
- Removeddeep-extend@0.6.0(transitive)
- Removeddetect-libc@1.0.3(transitive)
- Removedfs-minipass@1.2.7(transitive)
- Removedgauge@2.7.4(transitive)
- Removediconv-lite@0.4.24(transitive)
- Removedignore-walk@3.0.4(transitive)
- Removedini@1.3.8(transitive)
- Removedis-fullwidth-code-point@1.0.0(transitive)
- Removedisarray@1.0.0(transitive)
- Removedminimist@1.2.8(transitive)
- Removedminipass@2.9.0(transitive)
- Removedminizlib@1.3.3(transitive)
- Removedmkdirp@0.5.6(transitive)
- Removedneedle@2.9.1(transitive)
- Removednode-pre-gyp@0.14.0(transitive)
- Removednopt@4.0.3(transitive)
- Removednpm-bundled@1.1.2(transitive)
- Removednpm-normalize-package-bin@1.0.1(transitive)
- Removednpm-packlist@1.4.8(transitive)
- Removednpmlog@4.1.2(transitive)
- Removednumber-is-nan@1.0.1(transitive)
- Removedos-homedir@1.0.2(transitive)
- Removedos-tmpdir@1.0.2(transitive)
- Removedosenv@0.1.5(transitive)
- Removedprocess-nextick-args@2.0.1(transitive)
- Removedrc@1.2.8(transitive)
- Removedreadable-stream@2.3.8(transitive)
- Removedrimraf@2.7.1(transitive)
- Removedsafe-buffer@5.1.2(transitive)
- Removedsafer-buffer@2.1.2(transitive)
- Removedsax@1.4.1(transitive)
- Removedsemver@5.7.2(transitive)
- Removedstring-width@1.0.2(transitive)
- Removedstring_decoder@1.1.1(transitive)
- Removedstrip-ansi@3.0.1(transitive)
- Removedstrip-json-comments@2.0.1(transitive)
- Removedtar@4.4.19(transitive)
- Removedyallist@3.1.1(transitive)