How to use the nodejieba.tag function in nodejieba

To help you get started, we’ve selected a few nodejieba examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github feix760 / Chrome_12306 / app / lib / jieba.js View on Github external
exports.uniq = function(str) {
  return _.uniq(jieba.tag(str).sort())
    .filter(function(item) {
      return !item.match(/\s/);
    })
    .map(function(item) {
      item = item.split(':');
      return {
        name: item[0],
        type: item[1]
      }
    });
};

nodejieba

chinese word segmentation for node

MIT
Latest version published 2 years ago

Package Health Score

52 / 100
Full package analysis