segment-dict
Advanced tools
Comparing version 1.0.7 to 1.0.10
@@ -65,3 +65,4 @@ 鲆|0x0008|101 | ||
请|0x1000|308 | ||
说|0x1000|15 | ||
说|0x103000|15 | ||
說|0x103000|15 | ||
诉|0x1000|5691 | ||
@@ -160,3 +161,3 @@ 设|0x1000|1161 | ||
包|0x1000|884 | ||
斗|0x1000|4900 | ||
敢|0x1000|805 | ||
@@ -286,3 +287,3 @@ 敌|0x1000|2139 | ||
场|0x20000|6159 | ||
张|0x20000|124 | ||
张|0x31000|124 | ||
面|0x121000|378 | ||
@@ -410,3 +411,3 @@ 秒|0x20000|2688 | ||
右|0x2000000|1500 | ||
后|0x2000000|43 | ||
旁|0x2000000|1910 | ||
@@ -419,3 +420,3 @@ 上|0x2000000|9 | ||
中|0x2000000|534 | ||
里|0x2000000|53 | ||
下|0x2000000|41 | ||
@@ -441,3 +442,3 @@ 独|0x8000000|2378 | ||
共|0x8000000|358 | ||
未|0x8000000|276 | ||
未|0x8100004|276 | ||
不|0x8000000|5 | ||
@@ -453,3 +454,3 @@ 最|0x8000000|58 | ||
别|0x8000000|40734 | ||
太|0x8000000|237 | ||
太|0x48100000|237 | ||
还|0x8000000|550 | ||
@@ -473,3 +474,3 @@ 才|0x8000000|82 | ||
副|0x20000000|122 | ||
黑|0x40000000|628 | ||
黑|0x40101006|628 | ||
硬|0x40000000|1318 | ||
@@ -476,0 +477,0 @@ 纯|0x40000000|3093 |
@@ -19,8 +19,10 @@ | ||
面包|0x80100000|0 | ||
象征|0x80101000|0 | ||
里所當然|0x81000000|0 | ||
里所当然|0x81000000|0 | ||
里所儅然|0x81000000|0 | ||
戰斗|0x80101000|1422 | ||
复數|0x80300000|0 |
這裡|0x02000000|800 | ||
這裏|0x02000000|800 | ||
這裡面|0x02000000|800 | ||
這裏面|0x02000000|800 | ||
裡面|0x02000000|800 | ||
裏面|0x02000000|800 | ||
那裡|0x02000000|1000 | ||
那裏|0x02000000|800 | ||
那裡面|0x02000000|800 | ||
那裏面|0x02000000|800 | ||
//在那里|0x02000000|835 | ||
//在那裡|0x02000000|800 | ||
//在那裡|0x02000000|800 | ||
//---------- | ||
@@ -73,2 +50,3 @@ 脑|0x100000|2971 | ||
孤|0x10000|16 | ||
君|0x10002|100 | ||
//------------ | ||
@@ -85,3 +63,3 @@ 崩壊|0x1000|500 | ||
視線|0x100000|500 | ||
然後|0x08000000|500 | ||
話雖如此|0x01000000|0 | ||
@@ -101,7 +79,7 @@ 怎麼|0x10000|311 | ||
劍聖|0x100000|0 | ||
最後|0x20000000|265 | ||
劍神|0x100000|0 | ||
聖|0x40101006|0 | ||
違和感|0x101000|0 | ||
後|0x2100002|0 | ||
越早|0x1000|0 | ||
@@ -112,9 +90,2 @@ 越|0x08101000|0 | ||
後方|0x2000000|8909 | ||
之后|0x2100002|247 | ||
之後|0x2100002|247 | ||
後面|0x2100002|247 | ||
前後|0x08200002|0 | ||
鉴定|0x101000|2918 | ||
@@ -124,7 +95,2 @@ 鑑定|0x101000|2918 | ||
复數|0x300000|0 | ||
复数|0x300000|0 | ||
複數|0x300000|0 | ||
複数|0x300000|0 | ||
一兩|0x500000|382 | ||
@@ -166,5 +132,3 @@ //一兩個|0x500000|382 | ||
今|0x100000|0 | ||
今後|0x4000|1052 | ||
再來|0x18000000|766 | ||
@@ -215,1 +179,46 @@ 再来|0x18000000|766 | ||
边|0x40100002|0 | ||
角|0x120004|0 | ||
上角|0x2000000|0 | ||
角角落落|0x00800000|20000 | ||
棒|0x101000|0 | ||
社會人|0x100000|0 | ||
讀|0x101000|0 | ||
未讀|0x101008|0 | ||
索敵|0x101000|0 | ||
內|0x2100002|53 | ||
豚|0x100006|0 | ||
豬|0x100006|0 | ||
豬頭人|0x100008|0 | ||
影狼|0x100008|0 | ||
聞|0x101000|0 | ||
难不成|0x8800000|3 | ||
難不成|0x8800000|3 | ||
發|0x121002|0 | ||
還要|0x8000000|0 | ||
還|0x8001000|0 | ||
還會|0x8000000|0 | ||
販賣機|0x100000|0 | ||
自動販賣機|0x100000|0 | ||
機|0x101006|0 | ||
運動飲料|0x100000|0 | ||
几分鐘|0x210000|500 | ||
鐘|0x110006|0 | ||
染|0x40101004|0 | ||
雙|0x48020000|0 | ||
双|0x48020000|0 |
@@ -50,3 +50,3 @@ "use strict"; | ||
.forEach(function (key) { | ||
if (key.indexOf('on') == 0) { | ||
if (key.indexOf('on') == 0 && options[key]) { | ||
wts.on(key.slice(2), options[key]); | ||
@@ -53,0 +53,0 @@ } |
@@ -89,3 +89,3 @@ /** | ||
{ | ||
if (key.indexOf('on') == 0) | ||
if (key.indexOf('on') == 0 && options[key]) | ||
{ | ||
@@ -92,0 +92,0 @@ wts.on(key.slice(2), options[key]); |
@@ -9,3 +9,4 @@ import { IStreamLineWithValue } from './line'; | ||
callback?: ICallback<T>; | ||
onready?(...argv); | ||
}): IStreamLineWithValue<T>; | ||
export default createLoadStream; |
@@ -5,2 +5,5 @@ "use strict"; | ||
function createLoadStream(file, options = {}) { | ||
options.onready = options.onready || function (src, ...argv) { | ||
this.value = this.value || []; | ||
}; | ||
options.mapper = options.mapper || function (data) { | ||
@@ -10,6 +13,6 @@ return data; | ||
options.ondata = options.ondata || function (data) { | ||
this.value = this.value || []; | ||
this.value.push(data); | ||
}; | ||
let stream = line_1.createStreamLine(file, options.mapper, { | ||
onready: options.onready, | ||
ondata: options.ondata, | ||
@@ -20,3 +23,3 @@ onclose() { | ||
} | ||
} | ||
}, | ||
}); | ||
@@ -23,0 +26,0 @@ return stream; |
@@ -15,5 +15,12 @@ import { createStreamLine, IStreamLineWithValue } from './line'; | ||
onready?(...argv), | ||
} = {}): IStreamLineWithValue<T> | ||
{ | ||
options.onready = options.onready || function (src, ...argv) | ||
{ | ||
this.value = this.value || []; | ||
}; | ||
options.mapper = options.mapper || function (data) | ||
@@ -26,3 +33,2 @@ { | ||
{ | ||
this.value = this.value || []; | ||
this.value.push(data); | ||
@@ -32,3 +38,7 @@ }; | ||
let stream: IStreamLineWithValue<any> = createStreamLine(file, options.mapper, { | ||
onready: options.onready, | ||
ondata: options.ondata, | ||
onclose() | ||
@@ -40,3 +50,3 @@ { | ||
} | ||
} | ||
}, | ||
}); | ||
@@ -43,0 +53,0 @@ |
@@ -12,2 +12,3 @@ /// <reference types="node" /> | ||
callback?: ICallback<T>; | ||
onready?(...argv); | ||
}): IStreamLineWithValue<T>; | ||
@@ -14,0 +15,0 @@ export declare function createStreamLineSync(file: string, options: IOptions): IStreamLine; |
@@ -11,2 +11,5 @@ "use strict"; | ||
function createLoadStreamSync(file, options = {}) { | ||
options.onready = options.onready || function (src, ...argv) { | ||
this.value = this.value || []; | ||
}; | ||
options.mapper = options.mapper || function (data) { | ||
@@ -20,2 +23,3 @@ return data; | ||
let stream = createStreamLineSync(file, options.mapper, { | ||
onready: options.onready, | ||
ondata: options.ondata, | ||
@@ -93,2 +97,3 @@ onclose() { | ||
this.resume(); | ||
this.emit('ready', this); | ||
let i = 0; | ||
@@ -95,0 +100,0 @@ while (!this.fdEnd) { |
@@ -19,4 +19,10 @@ /** | ||
onready?(...argv), | ||
} = {}): IStreamLineWithValue<T> | ||
{ | ||
options.onready = options.onready || function (src, ...argv) | ||
{ | ||
this.value = this.value || []; | ||
}; | ||
@@ -35,2 +41,5 @@ options.mapper = options.mapper || function (data) | ||
let stream: IStreamLineWithValue<any> = createStreamLineSync(file, options.mapper, { | ||
onready: options.onready, | ||
ondata: options.ondata, | ||
@@ -151,2 +160,4 @@ onclose() | ||
this.emit('ready', this); | ||
let i = 0; | ||
@@ -153,0 +164,0 @@ |
@@ -46,3 +46,6 @@ "use strict"; | ||
// @ts-ignore | ||
a[1] = '0x' + a[1].toString(16).padStart(4, '0'); | ||
a[1] = '0x' + a[1] | ||
.toString(16) | ||
.padStart(4, '0') | ||
.toUpperCase(); | ||
} | ||
@@ -49,0 +52,0 @@ if (a.length > 2) { |
@@ -73,3 +73,7 @@ /** | ||
// @ts-ignore | ||
a[1] = '0x' + a[1].toString(16).padStart(4, '0'); | ||
a[1] = '0x' + a[1] | ||
.toString(16) | ||
.padStart(4, '0') | ||
.toUpperCase() | ||
; | ||
} | ||
@@ -76,0 +80,0 @@ |
{ | ||
"name": "segment-dict", | ||
"version": "1.0.7", | ||
"description": "segment data", | ||
"version": "1.0.10", | ||
"description": "novel-segment segment data", | ||
"keywords": [ | ||
"NLP", | ||
"PanGuSegment", | ||
"PoS tagging", | ||
@@ -27,2 +28,3 @@ "analyzer", | ||
"optimizer", | ||
"pangu", | ||
"phrases", | ||
@@ -32,14 +34,18 @@ "segment", | ||
"split", | ||
"stopword", | ||
"stream", | ||
"sync", | ||
"synonym", | ||
"text mining", | ||
"tokenizer", | ||
"variant", | ||
"stopword", | ||
"synonym", | ||
"word", | ||
"word segmentation", | ||
"中文", | ||
"中文分詞", | ||
"中文分词", | ||
"分词" | ||
"分詞", | ||
"分词", | ||
"盘古分词", | ||
"盤古分詞" | ||
], | ||
@@ -69,2 +75,5 @@ "homepage": "https://github.com/bluelovers/node-segment-dict#readme", | ||
"stream-pipe": "^1.0.1", | ||
"core-decorators": "^0.20.0", | ||
"crlf-normalize": "^1.0.1", | ||
"uni-string": "^1.0.1", | ||
"through2": "^2.0.3" | ||
@@ -74,7 +83,4 @@ }, | ||
"@types/bluebird": "^3.5.20", | ||
"@types/node": "^9.6.5", | ||
"core-decorators": "^0.20.0", | ||
"crlf-normalize": "^1.0.1", | ||
"uni-string": "^1.0.1" | ||
"@types/node": "^9.6.5" | ||
} | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
34062378
2
93
1935
7
+ Addedcore-decorators@^0.20.0
+ Addedcrlf-normalize@^1.0.1
+ Addeduni-string@^1.0.1
+ Added@types/node@22.9.3(transitive)
+ Addedclass-proxy@1.1.2(transitive)
+ Addedcore-decorators@0.20.0(transitive)
+ Addedcrlf-normalize@1.0.20(transitive)
+ Addedes6-class-prototype@1.0.4(transitive)
+ Addedrunes2@1.1.4(transitive)
+ Addedts-toolbelt@9.6.0(transitive)
+ Addedts-type@3.0.1(transitive)
+ Addedtypedarray-dts@1.0.0(transitive)
+ Addedundici-types@6.19.8(transitive)
+ Addeduni-string@1.1.17(transitive)