Input is checked for unpaired UTF-16 surrogates and measured as Unicode code points and UTF-8 bytes before analysis. Each source is limited to 262,144 characters and 262,144 bytes; similarity also limits both sources together to 262,144 bytes. Work runs in a dedicated browser Worker with cancellation, a 15-second timeout, and a memory estimate.
Character frequency segments the normalized source with Intl.Segmenter granularity grapheme, so combining sequences and joined emoji remain one row. Word modes use granularity word and isWordLike, then apply the selected locale, case policy, NFKC or NFC normalization, numeric-token policy, and minimum grapheme length. Percentages divide by included units only, and no more than 100 rows are rendered.
Keyword density builds contiguous windows over the original segmented sequence and discards any window containing a filtered token or crossing sentence punctuation or a line break. This prevents exclusions and boundaries from joining words that were not a continuous phrase. A typed target may contain one through five tokens. Density is occurrences divided by eligible same-size windows, so it stays bounded and its denominator remains inspectable.
Readability is English-only. One statistic set feeds Flesch Reading Ease, Flesch-Kincaid grade, an explicitly estimated Gunning Fog value, Coleman-Liau, and Automated Readability Index. Syllables use a deterministic spelling heuristic, not pronunciation data; text under 10 words is rejected and text under 100 words receives a stability notice.
Sentiment uses the 3,382 English AFINN-165 labels and emoji labels distributed by the pinned MIT sentiment 5.0.2 package, but replaces its ASCII tokenizer with Intl.Segmenter. A bounded three-token negation window and visible modifiers alter label scores. Similarity uses grapheme arrays, two Uint32Array rows for exact Levenshtein distance, and unique-word Jaccard overlap; it rejects work above 12,000,000 comparison cells before allocation. Analytics receives only mode, safe option categories, byte counts, row counts, notices, duration, and stable error codes, never source text, target phrases, matched words, or output.