UNPKG

584 BTypeScriptView Raw
1/**
2 * 日期时间优化模块
3 *
4 * @author 老雷<leizongmin@gmail.com>
5 */
6import Segment, { IWord } from '../Segment';
7/** 模块类型 */
8export declare const type = "optimizer";
9export declare let segment: Segment;
10/**
11 * 模块初始化
12 *
13 * @param {Segment} segment 分词接口
14 */
15export declare function init(_segment: any): void;
16/**
17 * 日期时间优化
18 *
19 * @param {array} words 单词数组
20 * @param {bool} is_not_first 是否为管理器调用的
21 * @return {array}
22 */
23export declare function doOptimize(words: IWord[], is_not_first?: boolean): Segment.IWord[];