
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
jieba-js A JavaScript Chinese word segmentation tool in pure javascript, based on Python Jieba
npm install jieba-js
import jieba, { cut } from 'jieba-js';
const jieba = require("jieba-js");
const jieba = require("jieba-js").jieba;
//------------
const Jieba = require("jieba").Jieba;
const jieba = new Jieba();
console.log(jieba);
jieba.cut("我爸新学会了一项解决日常烦闷的活动,就是把以前的照片抱回办公室扫描保存,弄成电子版的。更无法接受的是,还居然放到网上来,时不时给我两张。\n这些积尘的化石居然突然重现,简直是招架不住。这个怀旧的阀门一旦打开,那就直到意识模糊都没停下来。")
.then(function (ret)
{
//console.log(ret);
})
;
cut('我的中文東西。', function (ret)
{
//console.log(ret);
});
cut('我的中文東西。 2222222222').then(function (ret)
{
console.log(ret);
});
this method only work before first time call
jieba.cut
orjieba.init
jieba.useDict('path of dict file')
let dict = [
['xxx', 0, 'x'],
];
jieba.useDict(dict)
FAQs
jieba-js chinese word segmentation for node in pure javascript.
The npm package jieba-js receives a total of 79 weekly downloads. As such, jieba-js popularity was classified as not popular.
We found that jieba-js demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.