type Locale = 'en' | 'es' | 'pt' | 'fr' | 'de' | 'it' | 'ja'; interface ReadabilityIndexScore { name: string; shortName: string; score: number; gradeLevel?: number; label: string; description: string; formula: string; status: 'easy' | 'moderate' | 'difficult' | 'dense'; } interface ReadabilityAnalysis { consensusGrade: number; consensusLabel: string; targetAudience: string; audienceDescription: string; audienceTone: string; isWebOptimal: boolean; fleschReadingEase: number; fleschReadingEaseLabel: string; fleschKincaidGrade: number; gunningFog: number; colemanLiau: number; automatedReadabilityIndex: number; smogIndex: number; indexes: ReadabilityIndexScore[]; wordCount: number; sentenceCount: number; avgWordsPerSentence: number; avgSyllablesPerWord: number; avgLettersPerWord: number; complexWordsCount: number; complexWordsPercentage: number; complexWordsList: { word: string; count: number; syllables: number; }[]; hardSentencesCount: number; veryHardSentencesCount: number; hardSentences: { text: string; wordCount: number; severity: 'moderate' | 'hard'; }[]; actionableTips: string[]; nonWsChars: number; kanjiRatio: number; genkoYoshiSheets: number; readingTime: number; speakingTime: number; readingSpeedCPM?: number; readingSpeedWPM?: number; } /** * Master Unicode Word Tokenizer: * 1. Web URLs (excluding trailing sentence punctuation) * 2. Email addresses * 3. Formatted currency, decimals, and thousands (e.g., $100.50, 3.14159, 1,000,000, 10,5%, 50kg) * 4. Hyphenated compound terms without spaces (e.g., state-of-the-art, well-known) * 5. Standard Unicode words and contractions (e.g., don't, it's, résumé) */ declare const MASTER_WORD_REGEX: RegExp; declare const ELISION_REGEX: RegExp; declare const SYLLABLE_OVERRIDES: Record; /** * High-accuracy syllable counter with morphological heuristics and hiatus resolution */ declare function calculateSyllables(rawWord: string): number; /** * Split text into semantic sentences, protecting abbreviations, decimals, and URLs */ declare function extractSentences(text: string, locale?: Locale): string[]; declare const SHORT_VALID_WORDS: Set; declare const KEYBOARD_SPAM_PATTERNS: RegExp[]; /** * Detect unpronounceable strings, gibberish keystrokes, or keyboard mashing */ declare function isGibberishWord(rawWord: string): boolean; /** * Check if the text as a whole contains valid readable words or is keystroke noise */ declare function isGibberishText(text: string): boolean; /** * Research-Backed Multi-Index Readability & Comprehension Engine * Implements Flesch Reading Ease, Flesch-Kincaid Grade Level, Gunning Fog Index, * Coleman-Liau Index, Automated Readability Index (ARI), and SMOG Index. */ /** * Check if a word is complex (3+ syllables, excluding standard proper nouns and basic inflections) */ declare function isComplexWord(word: string): boolean; /** * Comprehensive Readability Analysis across 7 Languages */ declare function analyzeReadability(text: string, locale?: Locale): ReadabilityAnalysis; export { ELISION_REGEX, KEYBOARD_SPAM_PATTERNS, MASTER_WORD_REGEX, SHORT_VALID_WORDS, SYLLABLE_OVERRIDES, analyzeReadability, calculateSyllables, extractSentences, isComplexWord, isGibberishText, isGibberishWord }; export type { Locale, ReadabilityAnalysis, ReadabilityIndexScore };