1 |
|
2 |
|
3 |
|
4 | import { IWord } from '../segment/types';
|
5 | import { IDictRow } from 'segment-dict/lib/loader/segment';
|
6 | import AbstractTableDictCore, { IDICT, IDICT2, IOptions } from './core';
|
7 | export declare type ITableDictRow = {
|
8 | p: number;
|
9 | f: number;
|
10 | s?: boolean;
|
11 | };
|
12 | export { IDICT, IDICT2, IOptions };
|
13 |
|
14 |
|
15 |
|
16 | export declare class TableDict extends AbstractTableDictCore<ITableDictRow> {
|
17 | type: string;
|
18 | TABLE: IDICT<ITableDictRow>;
|
19 | TABLE2: IDICT2<ITableDictRow>;
|
20 | options: IOptions;
|
21 | exists(data: IWord | IDictRow | string): ITableDictRow;
|
22 | protected __handleInput(data: IWord | IDictRow | string): {
|
23 | data: {
|
24 | w: string;
|
25 | p: number;
|
26 | f: number;
|
27 | };
|
28 | plus: (string | number)[];
|
29 | };
|
30 | add(data: IWord | IDictRow | string, skipExists?: boolean): this;
|
31 | protected _add({ w, p, f, s }: {
|
32 | w: string;
|
33 | p: number;
|
34 | f: number;
|
35 | s?: boolean;
|
36 | }): void;
|
37 | remove(target: IWord | IDictRow | string): this;
|
38 | protected _remove({ w, p, f, s }: IWord): this;
|
39 | json(): IDICT<ITableDictRow>;
|
40 | |
41 |
|
42 |
|
43 | stringify(LF?: string): string;
|
44 | }
|
45 | export default TableDict;
|