type Locale = 'en' | 'es' | 'pt' | 'fr' | 'de' | 'it' | 'ja'; type ClicheCategory = 'dead-giveaway' | 'throat-clearing' | 'mechanical-transition' | 'corporate-filler'; type ClicheSeverity = 'high' | 'medium' | 'low'; interface ClicheEntry { phrase: string; category: ClicheCategory; severity: ClicheSeverity; weight: number; explanation: string; replacements: string[]; safeReplacement?: string; actionableAdvice?: string; isMultiWord?: boolean; } interface ClicheMatch { id: string; phrase: string; matchedText: string; startIndex: number; endIndex: number; category: ClicheCategory; severity: ClicheSeverity; weight: number; explanation: string; replacements: string[]; actionableAdvice?: string; } type NaturalnessGrade = 'Natural Human Voice' | 'Mildly Formulaic' | 'Noticeable AI Patterns' | 'Heavy AI Lexical Fingerprint'; interface ClicheAnalysisResult { matches: ClicheMatch[]; totalMatches: number; naturalnessScore: number; grade: NaturalnessGrade; densityPer100Words: number; categoryCounts: Record; severityCounts: Record; wordCount: number; } type ClicheScanResult = ClicheAnalysisResult; interface CompiledPattern { entry: ClicheEntry; regex: RegExp; } interface AutoHumanizeOptions { seed?: number; mode?: 'stochastic' | 'deterministic'; avoidDuplicatesInSentence?: boolean; locale?: Locale; } interface AutoHumanizeResult { humanizedText: string; totalReplaced: number; totalOpenersRemoved: number; scoreBefore: number; scoreAfter: number; variationSeed: number; replacementsSummary: Array<{ original: string; replacement: string; category: ClicheCategory; }>; } type HumanizeResult = AutoHumanizeResult; declare const AI_CLICHE_SLUG = "ai-cliche-scanner"; declare const SAFE_REPLACEMENTS: Record; declare const AI_CLICHES_DATA: ClicheEntry[]; declare const CATEGORY_LABELS: Record; interface ClicheCategoryInfo { id: ClicheCategory | 'hyperbolic-superlative'; name: string; penalty: string; badgeClass: string; description: string; examples: string[]; } declare const CORE_CLICHE_CATEGORIES: ClicheCategoryInfo[]; interface ClicheBenchmarkRow { marker: string; category: string; surge: string; alternatives: string; severity: 'Critical' | 'High' | 'Medium'; } declare const CLICHE_BENCHMARK_ROWS: ClicheBenchmarkRow[]; interface ArchitecturalBentoCard { tag: string; title: string; desc: string; note: string; } declare const ARCHITECTURAL_BENTO_CARDS: ArchitecturalBentoCard[]; interface HumanizationRule { number: number; title: string; instruction: string; badExample: string; goodExample: string; } declare const EDITORIAL_HUMANIZATION_RULES: HumanizationRule[]; interface ClicheCheatSheetGroup { category: string; words: string[]; } declare const TOP_40_CLICHE_WORDS: ClicheCheatSheetGroup[]; interface ClicheFaqItem { q: string; a: string; } declare const AI_CLICHE_FAQS: ClicheFaqItem[]; declare const SPANISH_CLICHES_DATA: ClicheEntry[]; declare const PORTUGUESE_CLICHES_DATA: ClicheEntry[]; declare const FRENCH_CLICHES_DATA: ClicheEntry[]; declare const GERMAN_CLICHES_DATA: ClicheEntry[]; declare const ITALIAN_CLICHES_DATA: ClicheEntry[]; declare const JAPANESE_CLICHES_DATA: ClicheEntry[]; declare const SPANISH_SAFE_REPLACEMENTS: Record; declare const PORTUGUESE_SAFE_REPLACEMENTS: Record; declare const FRENCH_SAFE_REPLACEMENTS: Record; declare const GERMAN_SAFE_REPLACEMENTS: Record; declare const ITALIAN_SAFE_REPLACEMENTS: Record; declare const JAPANESE_SAFE_REPLACEMENTS: Record; declare const LOCALIZED_CLICHES_DATA: Record; declare const LOCALIZED_SAFE_REPLACEMENTS: Record>; /** * Returns registered cliché entries for the target locale (defaults to English). */ declare function getClicheDataForLocale(locale: Locale): ClicheEntry[]; /** * Returns safe 1-to-1 replacement map for the target locale (defaults to English). */ declare function getSafeReplacementsForLocale(locale: Locale): Record; /** * Detects the predominant language of the input text using character scripts, * orthographic markers (inverted marks, umlauts, eszett, tildes, ligatures), * and high-frequency grammatical function tokens across all 7 supported locales. */ declare function detectTextLocale(text: string, fallback?: Locale): Locale; /** * Pre-compiled regular expression patterns mapped per locale. * Instant zero-latency lookups on every keystroke. */ declare const COMPILED_PATTERNS_MAP: Map; /** * High-performance, zero-latency scanner for AI clichés and robotic fillers. * Runs 100% in-browser in < 4ms. */ declare function scanTextForCliches(text: string, locale?: Locale): ClicheAnalysisResult; /** * Replaces a flagged match in the text with a chosen human alternative. */ declare function applyClicheReplacement(text: string, startIndex: number, endIndex: number, replacement: string): string; /** * Clean all throat-clearing openers from the document in one click. */ declare function cleanAllThroatClearingOpeners(text: string, locale?: Locale): { cleanedText: string; removedCount: number; }; /** * Intelligently transfers grammatical inflections (gender/number agreements, verbal tenses, * German capitalization, Japanese conjugation endings and particles) from the matched text * to the chosen base replacement so sentence meaning and grammar remain 100% natural and uncorrupted. */ declare function inflectReplacement(matchedText: string, baseReplacement: string, locale?: Locale): string; declare const LOCALIZED_STOP_STEMS: Record>; declare const COMMON_STOP_STEMS: Set; declare function isStopStem(stem: string, locale?: Locale): boolean; /** * Extracts a normalized word stem for in-sentence duplicate collision detection across all 7 locales. */ declare function getWordStem(word: string, locale?: Locale): string; /** * Returns default fallback replacement word for a given locale. */ declare function getDefaultFallbackReplacement(locale?: Locale): string; /** * Retrieves all valid replacement candidates for a given cliché phrase. */ declare function getCandidateReplacements(phrase: string, locale?: Locale): string[]; /** * 1-Click Auto-Humanize engine: Replaces robotic AI clichés with natural human synonyms * and cleans empty filler preambles while guaranteeing semantic meaning is 100% preserved. * Supports stochastic combinatorial variation sampling for infinite unique outputs. */ declare function autoHumanizeText(text: string, options?: AutoHumanizeOptions): AutoHumanizeResult; /** * Scan text for AI clichés, corporate buzzwords, and formulaic transitions. */ declare function scanCliches(text: string, locale?: Locale): ClicheScanResult; /** * Calculate the human prose naturalness score (0–100%) for input text. */ declare function calculateNaturalness(text: string, locale?: Locale): number; /** * Contextually humanize AI-generated text by replacing formulaic clichés with natural synonyms. */ declare function humanizeText(text: string, options?: AutoHumanizeOptions): HumanizeResult; /** * Remove formulaic throat-clearing preambles from beginning of paragraphs. */ declare function removeThroatClearing(text: string, locale?: Locale): string; /** * The 40+ most prominent AI buzzwords, dead giveaways, and mechanical transitions. */ declare const TOP_AI_CLICHES: readonly string[]; export { AI_CLICHES_DATA, AI_CLICHE_FAQS, AI_CLICHE_SLUG, ARCHITECTURAL_BENTO_CARDS, CATEGORY_LABELS, CLICHE_BENCHMARK_ROWS, COMMON_STOP_STEMS, COMPILED_PATTERNS_MAP, CORE_CLICHE_CATEGORIES, EDITORIAL_HUMANIZATION_RULES, FRENCH_CLICHES_DATA, FRENCH_SAFE_REPLACEMENTS, GERMAN_CLICHES_DATA, GERMAN_SAFE_REPLACEMENTS, ITALIAN_CLICHES_DATA, ITALIAN_SAFE_REPLACEMENTS, JAPANESE_CLICHES_DATA, JAPANESE_SAFE_REPLACEMENTS, LOCALIZED_CLICHES_DATA, LOCALIZED_SAFE_REPLACEMENTS, LOCALIZED_STOP_STEMS, PORTUGUESE_CLICHES_DATA, PORTUGUESE_SAFE_REPLACEMENTS, SAFE_REPLACEMENTS, SPANISH_CLICHES_DATA, SPANISH_SAFE_REPLACEMENTS, TOP_40_CLICHE_WORDS, TOP_AI_CLICHES, applyClicheReplacement, autoHumanizeText, calculateNaturalness, cleanAllThroatClearingOpeners, detectTextLocale, getCandidateReplacements, getClicheDataForLocale, getDefaultFallbackReplacement, getSafeReplacementsForLocale, getWordStem, humanizeText, inflectReplacement, isStopStem, removeThroatClearing, scanCliches, scanTextForCliches }; export type { ArchitecturalBentoCard, AutoHumanizeOptions, AutoHumanizeResult, ClicheAnalysisResult, ClicheBenchmarkRow, ClicheCategory, ClicheCategoryInfo, ClicheCheatSheetGroup, ClicheEntry, ClicheFaqItem, ClicheMatch, ClicheScanResult, ClicheSeverity, CompiledPattern, HumanizationRule, HumanizeResult, Locale, NaturalnessGrade };