Comparing version 2.3.5 to 2.4.0
# NodeJieba ChangeLog | ||
## v2.4.0 | ||
+ revert commit-6600629 to be compatiable with cppjieba. | ||
+ upgrade deps/limonp -> v0.6.2 | ||
+ upgrade deps/cppjieba -> v5.0.2 | ||
## v2.3.5 | ||
@@ -4,0 +10,0 @@ |
13
index.js
@@ -27,3 +27,3 @@ var binary = require('node-pre-gyp'); | ||
return someFunct.call(this, dict, hmmDict, userDict, idfDict, stopWordDict); | ||
}; | ||
} | ||
@@ -47,16 +47,5 @@ function wrapWithDictLoad(obj, functName) { | ||
wrapWithDictLoad(nodejieba, "extract"); | ||
wrapWithDictLoad(nodejieba, "extractWithWords"); | ||
wrapWithDictLoad(nodejieba, "textRankExtract"); | ||
wrapWithDictLoad(nodejieba, "textRankExtractWithWords"); | ||
wrapWithDictLoad(nodejieba, "insertWord"); | ||
nodejieba.tagWordsToStr = function(words) { | ||
var result = ''; | ||
for (var i = 0; i < words.length; i++) { | ||
result += words[i].word + '/' + words[i].tag + ' '; | ||
} | ||
return result.trim(); | ||
}; | ||
module.exports = nodejieba; | ||
{ | ||
"name": "nodejieba", | ||
"description": "chinese word segmentation for node", | ||
"version": "2.3.5", | ||
"version": "2.4.0", | ||
"author": "Yanyi Wu <i@yanyiwu.com>", | ||
@@ -6,0 +6,0 @@ "maintainers": [ |
@@ -27,9 +27,3 @@ var nodejieba = require("../index.js"); | ||
console.log(result); | ||
console.log('======='); | ||
console.log(nodejieba.extractWithWords(nodejieba.tagWordsToStr(result), 5)); | ||
console.log(nodejieba.extract(sentence, 5)); | ||
console.log(nodejieba.textRankExtractWithWords(nodejieba.tagWordsToStr(result), 5)); | ||
console.log(nodejieba.textRankExtract(sentence, 5)); | ||
console.log('======='); | ||
var topN = 5; | ||
@@ -47,4 +41,1 @@ result = nodejieba.extract(sentence, topN); | ||
console.log(result); | ||
@@ -8,8 +8,5 @@ declare module "nodejieba" { | ||
export function tag(sentence: string): any; | ||
export function extract(sentence: string, threshold: number, allowedPOS?:string): any; | ||
export function extract(sentence: string, threshold: number): any; | ||
export function insertWord(sentence: string): any; | ||
export function cutSmall(sentence: string, small: number): any; | ||
export function textRankExtract(sentence: string, threshold:number, allowedPOS?:string): any; | ||
export function extractWithWords(wordsStr:string, threshold:number, allowedPOS?:string): any; | ||
export function textRankExtractWithWords(wordsStr:string, threshold:number, allowedPOS?:string): any; | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
11753184
60
501