Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nodejieba

Package Overview
Dependencies
Maintainers
1
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nodejieba - npm Package Compare versions

Comparing version 2.3.5 to 2.4.0

6

ChangeLog.md
# 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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc