1 | import { SubSModuleTokenizer } from '../mod';
|
2 | import { IWord } from '../Segment';
|
3 | /**
|
4 | * 单字切分模块
|
5 | * 此模組不包含模組列表內 需要手動指定
|
6 | *
|
7 | * @author 老雷<leizongmin@gmail.com>
|
8 | */
|
9 | export declare class SingleTokenizer extends SubSModuleTokenizer {
|
10 | /**
|
11 | * 对未识别的单词进行分词
|
12 | *
|
13 | * @param {array} words 单词数组
|
14 | * @return {array}
|
15 | */
|
16 | split(words: IWord[]): IWord[];
|
17 | /**
|
18 | * 单字切分
|
19 | *
|
20 | * @param {string} text 要切分的文本
|
21 | * @param {int} cur 开始位置
|
22 | * @return {array}
|
23 | */
|
24 | splitSingle(text: any, cur?: number): IWord[];
|
25 | }
|
26 | export declare const init: typeof SubSModuleTokenizer.init;
|
27 | export default SingleTokenizer;
|