import { Token, Tokenizer, TokenizerChainAddCallback } from "./types/tokenizer"; /** * A class providing easy tokenizer chaining. */ export declare class TokenizerChain { private tokenizer; private tokenTokenizerChain; private textTokenizerChain; /** * Create a tokenizer chain. * @param initialTokenizer {Tokenizer} - is the first tokenizer that will be used. */ constructor(initialTokenizer: Tokenizer); /** * Set the tokenizer that will be ran on every token. * @param tokenizer {Tokenizer} - the tokenizer that will be used. * @param callback {TokenizerChainAddCallback} - a function providing a new TokenizerChain that can be used to add further tokenizers to the chain. */ token(tokenizer: Tokenizer, callback?: TokenizerChainAddCallback): TokenizerChain; /** * Set the tokenizer that will be ran on every non-token. * @param tokenizer {Tokenizer} - the tokenizer that will be used. * @param callback {TokenizerChainAddCallback} - a function providing a new TokenizerChain that can be used to add further tokenizers to the chain. */ text(tokenizer: Tokenizer, callback?: TokenizerChainAddCallback): TokenizerChain; /** * Run the tokenizer chain on a text input. * @param input {string} - the input text that will be tokenized by the tokenizer chain. */ run(input: string): Token[]; }