export declare type TokenType = string; export declare type CurrentTokensType = TokenType[]; export declare type NGramType = { current: CurrentTokensType; next: TokenType; }; export declare type ExperienceType = { [key: string]: { candidates: { [key: string]: { original: TokenType; count: number; }; }; total: number; }; }; export default class NGram { n: number; experience: ExperienceType; constructor(n: number); tokensToKey(tokens: CurrentTokensType): string; getExperience(currentTokens: CurrentTokensType): { candidates: { [key: string]: { original: string; count: number; }; }; total: number; }; addExperience(gram: NGramType): void; getNextToken(currentTokens: CurrentTokensType): string | false; train(str: string): void; guess(starter?: string, length?: number): string[]; }