@node-rs/jieba
Advanced tools
+6
-1
@@ -11,4 +11,9 @@ export function load(): void | ||
| export interface Keyword { | ||
| keyword: string | ||
| weight: number | ||
| } | ||
| export function tag(sentence: string | Buffer, hmm?: boolean): TagResult[] | ||
| export function extract(sentence: string | Buffer, topn: number, allowedPos?: string[]): string[] | ||
| export function extract(sentence: string | Buffer, topn: number, allowedPos?: string[]): Keyword[] |
+1
-2
@@ -29,5 +29,4 @@ const { loadBinding } = require('@node-rs/helper') | ||
| const input = Buffer.isBuffer(sentence) ? sentence : Buffer.from(sentence) | ||
| const output = native.extract(input, topn, allowedPos.join(',')) | ||
| return output.split(',') | ||
| return native.extract(input, topn, allowedPos.join(',')) | ||
| }, | ||
| } |
+6
-6
| { | ||
| "name": "@node-rs/jieba", | ||
| "version": "0.3.0", | ||
| "version": "0.4.0-alpha.0", | ||
| "description": "Fastest Chinese word segmentation in NodeJS", | ||
@@ -14,3 +14,3 @@ "keywords": [ | ||
| "author": "LongYinan <lynweklm@gmail.com>", | ||
| "homepage": "https://github.com/Brooooooklyn/node-rs", | ||
| "homepage": "https://github.com/napi-rs/node-rs", | ||
| "license": "MIT", | ||
@@ -39,3 +39,3 @@ "main": "index.js", | ||
| "type": "git", | ||
| "url": "git+https://github.com/Brooooooklyn/node-rs.git" | ||
| "url": "git+https://github.com/napi-rs/node-rs.git" | ||
| }, | ||
@@ -48,6 +48,6 @@ "scripts": { | ||
| "bugs": { | ||
| "url": "https://github.com/Brooooooklyn/node-rs/issues" | ||
| "url": "https://github.com/napi-rs/node-rs/issues" | ||
| }, | ||
| "dependencies": { | ||
| "@node-rs/helper": "^0.2.0" | ||
| "@node-rs/helper": "^0.2.1" | ||
| }, | ||
@@ -57,3 +57,3 @@ "devDependencies": { | ||
| }, | ||
| "gitHead": "07d4d0fccdb52c2ebaab2180819969593b625422" | ||
| "gitHead": "87069a906b5b086d8c94d0928534eea562819233" | ||
| } |
+1
-1
| # `@node-rs/jieba` | ||
|  | ||
|  | ||
@@ -5,0 +5,0 @@ [jieba-rs](https://github.com/messense/jieba-rs) binding to NodeJS |
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
63199052
1.07%42
7.69%Updated