segmentit
segmentit copied to clipboard
建议出个像nodejieba和node-segment差不多的关键词提取模式
建议出个像nodejieba和node-segment差不多的关键词提取模式
通过不同词的权重来对关键词进行提取 nodejieba关键词提取:
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 } ]
好主意,不过我最近在开发别的开源项目,这个排期排到明年去了(