import { DdddOcr } from './DdddOcr.js';
/**
 * Charset range constants that define different character sets for OCR.
 * These constants represent various combinations of character types (lowercase, uppercase, numeric).
 */
declare enum CHARSET_RANGE {
    /**
     * Character set containing only numeric characters.
     */
    NUM_CASE = 0,
    /**
     * Character set containing only lowercase characters.
     */
    LOWER_CASE = 1,
    /**
     * Character set containing only uppercase characters.
     */
    UPPER_CASE = 2,
    /**
     * Character set containing both lowercase and uppercase characters.
     */
    MIX_LOWER_UPPER_CASE = 3,
    /**
     * Character set containing both lowercase and numeric characters.
     */
    MIX_LOWER_NUM_CASE = 4,
    /**
     * Character set containing both uppercase and numeric characters.
     */
    MIX_UPPER_NUM_CASE = 5,
    /**
     * Character set containing lowercase, uppercase, and numeric characters.
     */
    MIX_LOWER_UPPER_NUM_CASE = 6,
    /**
     * Character set containing neither lowercase, uppercase, nor numeric characters.
     */
    NO_LOWER_UPPER_NUM_CASE = 7
}
/**
 * @ignore
 */
declare class OCR extends DdddOcr {
    /**
     * Path to the ONNX model for standard OCR.
     */
    private _ocrOnnxName;
    /**
     * Path to the charset file for standard OCR.
     */
    private _charsetName;
    /**
     * A set of valid characters for OCR recognition.
     */
    private _validCharSet;
    /**
     * A set of invalid characters for OCR recognition.
     */
    private _inValidCharSet;
    private _ocrOrtSessionPending;
    /**
     * Ocr
     */
    constructor(onnxName: string, charsetName: string);
    /**
     * Checks if a character is valid based on the defined valid and invalid character sets.
     */
    private isValidChar;
    /**
     * Parses the given `argmaxData` array into a string using the provided character set.
     *
     * The method iterates through the `argmaxData`, ensuring consecutive repeated items are skipped,
     * and converts the data into valid characters based on the provided `charset`.
     * The valid characters are checked using `isValidChar`, and only valid characters are included in the final result.
     */
    private parseToChar;
    private _preProcessImage;
    private postProcess;
    private _loadOcrOrtSession;
    private _run;
    /**
     * Sets the valid character set.
     */
    setValidCharSet(charset: string): this;
    /**
     * Sets the invalid character set.
     */
    setInValidCharset(charset: string): this;
    /**
     * Sets the range restriction for OCR results.
     *
     * This method restricts the characters returned by OCR based on the input:
     * - For `number` input, it applies a predefined character set. Supported values are:
     *   - `0`: Digits (0-9)
     *   - `1`: Lowercase letters (a-z)
     *   - `2`: Uppercase letters (A-Z)
     *   - `3`: Lowercase + Uppercase letters
     *   - `4`: Lowercase letters + Digits
     *   - `5`: Uppercase letters + Digits
     *   - `6`: Lowercase + Uppercase letters + Digits
     *   - `7`: Default set (a-z, A-Z, 0-9)
     * - For `string` input, each character in the string is treated as a valid OCR result.
     */
    setRanges(charsetRange: number | string): this;
    /**
     * Classifies an image by running it through an OCR model.
     */
    classification(url: string): Promise<string>;
}
export { OCR, CHARSET_RANGE };
//# sourceMappingURL=Ocr.d.ts.map