Count exact whitespace-delimited tokens after retaining apostrophes and hyphens but replacing other punctuation with spaces.
Cleaned tokens enter a map under their original or lowercased spelling, then rows sort by descending count and stop at the chosen limit. Each percentage divides the token count by every cleaned token before optional English stop-word removal.
the cat sat on the mat and the cat slept
Word Count Percentage ----- ----- ---------- the 3 30 cat 2 20 sat 1 10 on 1 10 mat 1 10 and 1 10 slept 1 10
Copy editors spot repeated terms in articles, qualitative researchers inspect interview transcripts, and search analysts review keyword concentration in landing-page paragraphs.