import type { Spec } from '../types/index.js';
import type { SearchInput, SearchResponse, SearchScore, SuggestionInput, SuggestionResponse } from '../types/search.js';
/**
 * Tokenizes text: lowercase, split on non-alphanumeric, remove stopwords and single chars.
 */
export declare function tokenize(text: string): string[];
/**
 * SPEC-514: Compute token-overlap semantic score for a spec against a query.
 * Weights: title (3x) > tags (2x) > slug (0.5x). Normalized to [0,1].
 */
export declare function computeSemanticScore(query: string, spec: Spec): SearchScore;
/**
 * SPEC-514: Find specs semantically similar to query above threshold.
 * Zero external dependencies — pure token overlap (Jaccard).
 */
export declare function findSimilarSpecs(query: string, specs: Spec[], options?: {
    threshold?: number;
    topN?: number;
}): SearchScore[];
/**
 * Returns a score 0-1 for how well `query` matches `text`.
 * Exact substring → 1.0. Subsequence match → query.length / text.length.
 * No match → 0.
 */
export declare function fuzzyMatch(text: string, query: string): number;
/**
 * Returns true if spec matches ALL provided filters.
 * Within each array filter, any match is sufficient (OR logic).
 * Across filters, all must match (AND logic).
 */
export declare function matchesFilters(spec: Spec, input: SearchInput): boolean;
/**
 * Computes a relevance score [0-1] for a spec against a query.
 * Higher weight given to: exact id match, then title, then tags.
 */
export declare function computeMatchScore(spec: Spec, query: string): {
    score: number;
    matchedFields: string[];
};
/**
 * Filter, score, sort, and paginate specs according to SearchInput.
 */
export declare function searchSpecs(specs: Spec[], input: SearchInput): SearchResponse;
/**
 * Returns unique field values from all specs that partially match the query.
 */
export declare function getSuggestions(specs: Spec[], input: SuggestionInput): SuggestionResponse;
//# sourceMappingURL=spec-searcher.d.ts.map