How word spacing correction works in Bareun
Korean word spacing rules are complex and full of exceptions, so even people often get them wrong.
During morphological analysis, Bareun looks at eojeol (space-delimited word unit) boundaries again and corrects spacing and joining.
It fixes 아름다운강산 to 아름다운 강산, and 떨여 졌는데 to 떨어졌는데.
Corrections in two directions: auto_spacing and auto_jointing
A morphological analysis request has two options related to word spacing correction.
| Option | Direction | Example |
|---|---|---|
auto_spacing | Inserts spaces into run-together text | 아름다운강산 → 아름다운 강산 |
auto_jointing | Joins words that were split | 떨여 졌는데 → 떨어졌는데 |
Both options take part in adjusting eojeol boundaries, and they are corrections meant to raise the accuracy of the morphological analysis result.
graph TD
IN[Input eojeol] --> ANA[Morphological analysis];
ANA --> SP{auto_spacing?};
SP -->|insert spaces| OUT1[아름다운 강산];
ANA --> JO{auto_jointing?};
JO -->|join split words| OUT2[떨어졌는데];
Rules that the correction follows
Word spacing correction covers the following areas of the Korean word spacing rules that often cause trouble.
Main correction targets
- Auxiliary predicates: decides the spacing between a main predicate and an auxiliary predicate.
- Dependent nouns: recognizes dependent nouns that must be written with a space after the preceding word and sets the boundary.
- Compound nouns: recognizes compound noun constructions that read naturally when written closed up.
These rules work from the morphological analysis result (which morpheme is an auxiliary predicate, a dependent noun, and so on), so they make corrections that fit the context better than simple dictionary matching.
refined and modified shown in the result
When a correction happens, two fields tell you where and how the analysis result changed.
| Field | Location | Meaning |
|---|---|---|
refined | Sentence | The result sentence with errors such as word spacing fixed |
modified | Eojeol (Token) | Marks that part of the original text was fixed by joining and then recognized |
The original is preserved, and corrections are shown separately
Bareun does not overwrite the original text arbitrarily. The corrected result goes into refined, and which eojeol were modified is marked with modified. This lets you compare the original and the corrected result side by side and trace what processing took place.
Input: 아름다운강산
refined: 아름다운 강산
Input: 떨여 졌는데
refined: 떨어졌는데 (modified flag set)
Frequently asked questions
Q. How do auto_spacing and auto_jointing differ?
auto_spacing corrects in the direction of inserting spaces into words that are stuck together (아름다운강산 → 아름다운 강산), and auto_jointing corrects in the direction of joining words that were split (떨여 졌는데 → 떨어졌는데).
Q. Where can I see the correction result?
The sentence-level correction result goes into the refined field. An eojeol whose original text was partly fixed by joining gets a modified flag.
Q. What rules does word spacing correction follow?
It corrects areas of the Korean word spacing rules that often cause trouble, such as auxiliary predicates, dependent nouns, and compound nouns, based on the morphological analysis result.