Why '텍스트를' and '텍스트가' Count as Different Words — The Limits of a Tool Built for Languages Without Particles
If you paste in a blog post and check keyword frequency, and a word you know you used many times shows up scattered across several similar-looking entries with a low count each — the tool isn't broken. What you're seeing is a collision between the structure of Korean particles (조사, 助詞) and a word-splitting method that was designed around English. This guide explains why that happens, and why a lightweight browser tool doesn't fundamentally solve it.
1. English and Korean End Words Differently
In English, a noun keeps essentially the same form no matter what role it plays in a sentence. "text" is "text" whether it's a subject ("The text is long") or an object ("I read the text"). Korean, however, attaches a particle directly after a noun — with no space — to mark its grammatical role. "텍스트를" (object marker), "텍스트가" (subject marker), "텍스트는" (topic marker), "텍스트와" (conjunction marker) — all four refer to the same noun "텍스트" ("text"), but as literal strings they are all different.
2. What This Tool Actually Does
Looking at the keyword extractor's actual code, it processes text with text.replace(/[^\p{L}\p{N}\s'-]/gu,' ').split(/\s+/) — keeping only letters, numbers, apostrophes, and hyphens, turning everything else into a space, then splitting on whitespace. That works well for English, where spacing lines up almost exactly with word boundaries. But in Korean, an entire string like "텍스트를" gets recognized as a single "word." The tool has no way of knowing that "텍스트를" and "텍스트가" are the same noun — as plain strings, they're simply two different values.
3. How Frequency Counts End Up Fragmented
As a result, a word that actually appeared 10 times can end up split into 4-5 separate entries in the list, depending on which particle happens to be attached each time. Each entry's count reads lower than the word's true frequency, and a genuinely important keyword can get pushed out of the top ranks.
4. Solving This Properly Requires Morphological Analysis
Fixing this correctly requires morphological analysis (형태소 분석, 形態素 分析) — splitting a word into its smallest meaningful unit (the stem) and its grammatical elements (particles, endings), so that just the stem "텍스트" gets extracted from "텍스트를". Libraries like KoNLPy (Python) wrap morphological analyzers such as Mecab, Komoran, and Okt to provide this. Whether it's dictionary-based or model-based, it's a fairly sophisticated NLP task that requires substantial data and computation.
5. Why This Tool Doesn't Do Morphological Analysis
For a lightweight utility that runs as pure JS in the browser, building a Korean morphological analyzer from scratch — or bundling and running a full one — isn't a realistic trade-off. Morphological analysis models and dictionaries tend to be large, and the computational cost of running them client-side isn't negligible either. Most lightweight text tools skip that burden and use simple regex-based splitting instead, which genuinely is accurate for languages without particles, like English.
6. How to Use It in Practice
- With Korean text: Don't take the frequency numbers at face value — scan the list for near-duplicate words that differ only by particle, and mentally combine them as a correction step.
- With English or other particle-free text: The tool works exactly as designed, so you can trust the results without any correction.
- If you need precise Korean analysis: It's more accurate to run a morphological analysis library like KoNLPy directly in code, or to find a dedicated Korean text-analysis tool that explicitly supports morphological analysis.
Frequently Asked Questions
Q. Is this a bug?
A. No. This tool was designed from the start around whitespace-based word splitting, and that approach is accurate for English and other languages without particles. This is a structural limitation that only shows up in languages like Korean, where particles attach directly to words.
Q. Does turning on the "ignore case" option fix this?
A. No. That option only merges case differences like "Apple" and "apple" — it has no effect on cases like "텍스트를" and "텍스트가", which are already different strings because of the attached particle.
Q. Does adjusting the minimum character length help?
A. It can help filter out short particles and pronouns, but it won't filter a word like "텍스트를" that already exceeds the minimum length with a particle attached. It isn't a fundamental fix.
Q. Are other languages, like Chinese and Japanese, fine?
A. Chinese doesn't use spacing between words at all, so this tool's whitespace-splitting approach barely works there either. Japanese has a particle structure (助詞) similar to Korean's, attached directly to words, so it runs into the same problem.