segment-dict
Advanced tools
Comparing version 1.0.4 to 1.0.5
@@ -338,5 +338,9 @@ 鲆|0x0008|101 | ||
捐|0x100000|5574 | ||
女|0x100000|329 | ||
年|0x100000|127 | ||
女|0x100000|329 | ||
日|0x100000|131 | ||
周|0x100000|131 | ||
月|0x100000|127 | ||
入|0x100000|394 | ||
@@ -348,3 +352,2 @@ 缕|0x100000|7214 | ||
锯|0x100000|12388 | ||
月|0x100000|127 | ||
报|0x100000|438 | ||
@@ -514,2 +517,2 @@ 朝|0x100000|993 | ||
二|0x40400000|88 | ||
十|0x40400000|205 | ||
十|0x40400000|205 |
@@ -12,2 +12,15 @@ 這里|0x10000|150 | ||
魔物|0x100000|8535 | ||
惡魔|0x100000|8535 | ||
堕天使|0x100000|8535 | ||
翡翠眼|0x100000|8535 | ||
魔术|0x100000|15634 | ||
魔術|0x100000|8535 | ||
//魔術師|0x100000|8535 | ||
堕天|0x1000|8241 | ||
転生|0x1000|500 | ||
轉生|0x1000|500 | ||
轮廻|0x1000|500 | ||
輪廻|0x1000|500 | ||
異世界|0x100000|720 | ||
异世界|0x100000|720 | ||
//-------------- | ||
@@ -29,2 +42,19 @@ 试图|0x1000|5185 | ||
//--------------- | ||
の|0x2000|1 | ||
の|0x2000|800 | ||
と|0x40000|500 | ||
二度目|0x400000|802 | ||
二周目|0x400000|802 | ||
周目|0x20000|5000 | ||
度目|0x20000|5000 | ||
//--------------- | ||
儂|0x10000|16 | ||
桑|0x10002|100 | ||
様|0x10002|100 | ||
//------------ | ||
崩壊|0x1000|500 | ||
//平和|0x0080|8983 | ||
平和|0x40000000|801 | ||
何時|0x10000|496 | ||
名前|0x100000|500 | ||
//神様|0x100000|500 | ||
神|0x100000|500 |
@@ -100,3 +100,3 @@ /** | ||
_read(size: number) | ||
_read(size: number): Buffer | ||
{ | ||
@@ -125,3 +125,3 @@ let buffers: Buffer[] = []; | ||
__read(size: number) | ||
__read(size: number): Buffer | ||
{ | ||
@@ -128,0 +128,0 @@ let readBuffer = new Buffer(this.options.readChunk); |
@@ -5,2 +5,3 @@ /// <reference types="bluebird" /> | ||
import * as SEGMENT from './segment'; | ||
import * as OPENCC from './opencc'; | ||
import LoaderClass from './_class'; | ||
@@ -10,2 +11,3 @@ export declare function requireDefault<T = any>(id: any, subtype: string): (file: string) => Promise<T>; | ||
export declare function requireDefault(id: 'segment'): typeof SEGMENT.default; | ||
export declare function requireDefault(id: 'opencc'): typeof OPENCC.default; | ||
export declare function requireDefault<T = any>(id: any, subtype?: string): (file: string) => Promise<T>; | ||
@@ -15,4 +17,5 @@ export declare function requireModule<T = any>(id: any, subtype: string): IRequireModule<T>; | ||
export declare function requireModule(id: 'segment'): typeof SEGMENT; | ||
export declare function requireModule(id: 'opencc'): typeof OPENCC; | ||
export declare function requireModule<T = any>(id: any, subtype?: string): IRequireModule<T>; | ||
export declare type IRequireModule<T = any> = LoaderClass<T, any>; | ||
export default requireDefault; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
// @ts-ignore | ||
const path = require("path"); | ||
@@ -9,2 +10,3 @@ function requireDefault(id, subtype) { | ||
function requireModule(id, subtype) { | ||
// @ts-ignore | ||
return require(path.join(__dirname, id, subtype ? subtype : '')); | ||
@@ -11,0 +13,0 @@ } |
import * as Promise from 'bluebird'; | ||
// @ts-ignore | ||
import * as path from "path"; | ||
@@ -7,2 +8,3 @@ import { ROOT } from '../../index'; | ||
import * as SEGMENT from './segment'; | ||
import * as OPENCC from './opencc'; | ||
import LoaderClass from './_class'; | ||
@@ -13,2 +15,3 @@ | ||
export function requireDefault(id: 'segment'): typeof SEGMENT.default | ||
export function requireDefault(id: 'opencc'): typeof OPENCC.default | ||
export function requireDefault<T = any>(id, subtype?: string): (file: string) => Promise<T> | ||
@@ -23,5 +26,7 @@ export function requireDefault<T = any>(id, subtype?: string): (file: string) => Promise<T> | ||
export function requireModule(id: 'segment'): typeof SEGMENT | ||
export function requireModule(id: 'opencc'): typeof OPENCC | ||
export function requireModule<T = any>(id, subtype?: string): IRequireModule<T> | ||
export function requireModule(id, subtype?: string) | ||
{ | ||
// @ts-ignore | ||
return require(path.join(__dirname, id, subtype ? subtype : '')); | ||
@@ -28,0 +33,0 @@ } |
/// <reference types="bluebird" /> | ||
/** | ||
* Created by user on 2018/3/14/014. | ||
*/ | ||
import { IStreamLineWithValue } from '../../fs/line'; | ||
import * as Promise from 'bluebird'; | ||
@@ -18,3 +22,3 @@ import { ICallback } from '../../fs/stream'; | ||
stringifyLine?(data: [string, number, number]): string; | ||
}) => any; | ||
}) => [string, number, number][]; | ||
export declare const loadStream: (file: string, options?: { | ||
@@ -25,3 +29,3 @@ parseLine?(input: string, oldFn?: (input: string) => [string, number, number]): [string, number, number]; | ||
stringifyLine?(data: [string, number, number]): string; | ||
}, callback?: ICallback<[string, number, number][]>) => any; | ||
}, callback?: ICallback<[string, number, number][]>) => IStreamLineWithValue<[string, number, number][]>; | ||
export declare const loadStreamSync: (file: string, options?: { | ||
@@ -32,3 +36,3 @@ parseLine?(input: string, oldFn?: (input: string) => [string, number, number]): [string, number, number]; | ||
stringifyLine?(data: [string, number, number]): string; | ||
}, callback?: ICallback<[string, number, number][]>) => any; | ||
}, callback?: ICallback<[string, number, number][]>) => IStreamLineWithValue<[string, number, number][]>; | ||
export declare const parseLine: (input: string) => [string, number, number]; | ||
@@ -35,0 +39,0 @@ export declare const stringifyLine: (data: [string, number, number]) => string; |
{ | ||
"name": "segment-dict", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "segment data", | ||
@@ -14,3 +14,5 @@ "keywords": [ | ||
"dict", | ||
"dictionary", | ||
"file", | ||
"hanzi", | ||
"jieba", | ||
@@ -24,3 +26,5 @@ "load", | ||
"novel", | ||
"opencc", | ||
"optimizer", | ||
"phrases", | ||
"segment", | ||
@@ -33,2 +37,3 @@ "segmentation", | ||
"tokenizer", | ||
"variant", | ||
"word", | ||
@@ -35,0 +40,0 @@ "word segmentation", |
@@ -26,1 +26,22 @@ # segment-dict | ||
``` | ||
## links | ||
* [node-segment](https://github.com/bluelovers/node-segment) | ||
--- | ||
* [search:jieba](https://www.npmjs.com/search?q=jieba) | ||
* [search:nlp chinese](https://www.npmjs.com/search?q=nlp%20chinese) | ||
* [keywords:中文分词](https://www.npmjs.com/search?q=keywords:%E4%B8%AD%E6%96%87%E5%88%86%E8%AF%8D) | ||
* [keywords:分词](https://www.npmjs.com/search?q=keywords:%E5%88%86%E8%AF%8D) | ||
--- | ||
* [segmentit](https://www.npmjs.com/package/segmentit) | ||
* [node-opencc](https://github.com/compulim/node-opencc) | ||
* [OpenCC](https://github.com/BYVoid/OpenCC) | ||
* [hanzi](https://www.npmjs.com/package/hanzi) | ||
* [jieba-js](https://github.com/bluelovers/jieba-js) | ||
* [nodescws](https://github.com/dotSlashLu/nodescws) | ||
* |
34057177
87
1883
47