/**
 * @file Base class for all rule-based scorers
 * Provides common functionality for rule evaluation
 */
import type { RuleResult, RuleScorer, RuleScorerConfig, ScoreResult, ScorerInput, ScorerMetadata, ScorerRule } from "../../../types/index.js";
import { BaseScorer } from "../baseScorer.js";
/**
 * Default rule scorer configuration
 */
export declare const DEFAULT_RULE_SCORER_CONFIG: RuleScorerConfig;
/**
 * Abstract base class for rule-based scorers
 */
export declare abstract class BaseRuleScorer extends BaseScorer implements RuleScorer {
    protected _ruleConfig: RuleScorerConfig;
    constructor(metadata: ScorerMetadata, config?: RuleScorerConfig);
    /**
     * Get rule-specific configuration
     */
    get ruleConfig(): RuleScorerConfig;
    /**
     * Get all rules for this scorer - must be implemented by subclasses
     */
    abstract getRules(): ScorerRule[];
    /**
     * Evaluate a single rule - must be implemented by subclasses
     */
    abstract evaluateRule(rule: ScorerRule, input: ScorerInput): {
        passed: boolean;
        score: number;
    };
    /**
     * Main scoring method
     */
    score(input: ScorerInput): Promise<ScoreResult>;
    /**
     * Combine rule results based on configuration
     */
    protected combineRuleResults(results: RuleResult[], rules: ScorerRule[]): number;
    /**
     * Generate reasoning from rule results
     */
    protected generateReasoning(results: Array<{
        rule: ScorerRule;
        result: {
            passed: boolean;
            score: number;
        };
    }>): string;
    /**
     * Helper: Check if text matches a regex pattern
     */
    protected matchesRegex(text: string, pattern: string, flags?: string): boolean;
    /**
     * Helper: Check if text contains keyword with word boundaries
     */
    protected containsKeyword(text: string, keyword: string, caseInsensitive?: boolean): boolean;
    /**
     * Helper: Count occurrences of a pattern
     */
    protected countOccurrences(text: string, pattern: string, caseInsensitive?: boolean): number;
    /**
     * Helper: Get word count
     */
    protected getWordCount(text: string): number;
    /**
     * Helper: Get character count (excluding whitespace)
     */
    protected getCharacterCount(text: string, includeWhitespace?: boolean): number;
    /**
     * Helper: Check text length is within bounds
     */
    protected isWithinLengthBounds(text: string, minWords?: number, maxWords?: number, minChars?: number, maxChars?: number): {
        passed: boolean;
        reason: string;
    };
}
