Correction rules for the initial-sound rule, jamo errors, and punctuation
Bareun corrects conjugation errors, word spelling errors, and punctuation errors according to Korean grammar rules.
These corrections are classified under GRAMMER (grammar and spelling rules) and WORD (word rules) of RevisionCategory,
and each correction carries a rule source (rule_article) that shows "which rule it was corrected by."
GRAMMER: conjugation, particle combination, and punctuation
GRAMMER deals with grammar errors that arise when words change form or combine within a sentence.
| Type | Example | Description |
|---|---|---|
| Predicate conjugation | 벼르고 벼러 → 벼르고 별러 | When -아/-어 is attached after a stem ending in 르, ㅡ drops and ㄹ is added |
| Particle combination | 을/를 and 이/가 adjustment by final consonant | Correct the particle form to match the final consonant of the preceding word |
| Punctuation | Tidying periods, commas, and quotation marks | Correcting punctuation errors |
Example of a conjugation error correction: 르-irregular
벼르고 벼러 → 벼르고 별러
"When the ending '-아/-어' is attached after a stem ending in '르' so that 'ㅡ' drops and 'ㄹ' is added, write it as it has changed."
WORD: sai-siot, the initial-sound rule, and Sino-Korean combinations
WORD deals with spelling rules for words themselves. A typical one is the initial-sound rule (dueum beopchik).
| Type | Example | Description |
|---|---|---|
| Initial-sound rule | 로인 → 노인 | The rule by which ㄹ or ㄴ at the start of a Sino-Korean word changes at the first sound of the word |
| Sai-siot (inserted ㅅ) | Correcting sai-siot spelling in compound words | The final consonant ㅅ written when two words combine |
| Sino-Korean combination | Correcting Sino-Korean word spelling | Spelling by the composition rules of Sino-Korean words |
What is the initial-sound rule?
The initial-sound rule (dueum beopchik) is the rule that when a Sino-Korean word begins with the sound ㄹ or ㄴ, it is written as ㄴ or ㅇ.
For example, the Chinese character '老' is 로 inside a word (경로) but is written 노 at the start (노인).
Bareun corrects spellings such as 로인 to 노인.
Building an NFD dictionary: searching rules by phoneme
Bareun finds correction targets by searching Hangul spelling and standard language rules based on actual dictionary data, not human intuition. To do this, it builds the dictionary in NFD (decomposed into initial, medial, and final jamo) phoneme units.
In Hangul, the visible syllable form (NFC) and its decomposed phoneme form (NFD) differ in length.
| Spelling | NFC (syllable) length | NFD (phoneme) length |
|---|---|---|
아름다운 | 4 characters | 10 characters (ㅇㅏㄹㅡㅁㄷㅏㅇㅜㄴ) |
When the dictionary is decomposed into phonemes, you can search for words a rule applies to by jamo pattern, such as "stems whose medial vowel is ㅗ/ㅜ."
Bareun applies a pattern search (regexp_like(nfd, ...)) to the dictionary column decomposed in NFD and extracts the set of words covered by a given spelling rule.
| Spelling rule | Example targets |
|---|---|
Stem with vowel ㅗ/ㅜ + -아/-어 → ㅘ/ㅝ | Words with such stems |
[Addendum 2] After ㅚ, -어/-었- is written as contracted | 괴다, 꾀다, 되다, 뵈다, 쇠다, 외다, 죄다, 쬐다 … |
Based on the extracted word set, Bareun generates error data and trains the correction model with those error rules. Because the rule is applied to the entire dictionary rather than to examples in someone's head, every word the same rule applies to can be covered without omission.
Careful analysis of the Hangul Spelling Rules and the Standard Language Rules
Bareun's correction rules are built from expert Korean-language knowledge and a careful analysis of the standard regulations of the Ministry of Culture, Sports and Tourism (Hangul Spelling Rules / 한글 맞춤법 and Standard Language Rules / 표준어 규정). The NFD search above is a device for applying those rules mechanically on top of dictionary data.
14 morphological error types caught at the segmentation stage
Morphological errors such as conjugation and contraction are identified in advance at the segmentation stage of morphological analysis, before entering the correction pipeline. Of Bareun's 115 segmentation labels, 14 are labels for error detection (spell checking), and eojeols with segmentation errors are restored to the correct form.
| ID | Error type |
|---|---|
| 021 | Conjugation: ㅂ-irregular special, ㄴ/ㄹ with 우 elision error |
| 022 | Conjugation: ㅂ-irregular special, 아/어 contraction error |
| 023 | Conjugation: ㅂ-irregular special, 고은/고아라 |
| 026 | Conjugation: ㅅ-irregular stem, ㅅ addition error |
| 031 | Conjugation: ㄹ-irregular, 으 addition error |
| 034 | Conjugation: 러-irregular, ending 어 error |
| 038 | Conjugation: 르-irregular, ending 아/어/았/었 error |
| 039 | Conjugation: 르-irregular, stem error |
| 040 | Conjugation: 르-irregular, stem error |
| 041 | Conjugation: 르-irregular, stem ㄹ addition error |
| 074 | Contraction: 외 → 어/었, 왜/왰 error |
| 109 | Conjugation: copula ending 었 error |
| 111 | Conjugation: ending segmentation 아/어 error |
| 113 | Conjugation: 이 vowel progressive assimilation 요/여 error |
Segmentation errors are caught at the segmentation stage
The 14 types above are identified at the segmentation stage of morphological analysis, not in a separate correction stage. The segmentation model detects morphological errors while segmenting eojeols, and restores eojeols with errors to the correct form.
Jamo error correction
Jamo-level errors, where an initial, medial, or final jamo is mistyped or missing while typing, are also correction targets. Bareun uses jamo-level edit distance to find a correct spelling close to the original text, and rejects changes that move too far from the original to prevent over-correction.
graph TD
A[Eojeol to correct] --> B{Which rule is violated?};
B -- Conjugation, particle, punctuation --> C[GRAMMER];
B -- Sai-siot, initial-sound rule, Sino-Korean --> D[WORD];
C --> E[Attach ReviseHelp<br>comment + rule_article];
D --> E;
E --> F[Correction result + rule source];
The rule source is provided in ReviseHelp
The key to grammar and word rule corrections is the basis. ReviseHelp in the response's helps provides the following.
| Field | Content |
|---|---|
category | Correction category (GRAMMER / WORD, and so on) |
comment | Explanation of the reason for the correction |
examples | Other examples of the same rule |
rule_article | Rule source (for example, an article of the Hangul Spelling Rules) |
For example, a word spacing correction carries "Hangul Spelling Rules Article 2: each word of a sentence is, in principle, written separated by spaces" in rule_article,
and a standard word correction carries "Standard Language Rules principle of determination, Article 22."
Corrections with a basis
Bareun does not just fix; it also presents the source in the official language regulations, such as the Hangul Spelling Rules and the Standard Language Rules. This lets users confirm that a correction is not arbitrary and use it for learning too.
Frequently asked questions
Q. Does it also fix initial-sound rule errors?
Yes. The initial-sound rule is corrected under the WORD (word rule) category. For example, 로인 is corrected to 노인,
and the rule source is provided in rule_article.
Q. How are conjugation errors and word spelling errors told apart?
Grammar errors such as conjugation, particle combination, and punctuation are classified as GRAMMER, and word spelling rules such as sai-siot, the initial-sound rule,
and Sino-Korean combination are classified as WORD.
Q. Where can I check the rule basis of a correction?
You can check the rule source in rule_article of the ReviseHelp in the response's helps.
The reason for the correction (comment) and additional examples (examples) are provided too.
Q. What is the NFD dictionary, and why search by phoneme?
The NFD dictionary is a dictionary indexed in phoneme units by decomposing Hangul into initial, medial, and final jamo. For example, 아름다운 is
4 characters as syllables (NFC) but 10 characters as phonemes (NFD). When decomposed this way, you can search the dictionary directly by jamo pattern, such as "stems whose medial vowel is ㅗ/ㅜ,"
for words covered by a spelling rule, and extract them as correction and training targets.
Q. How many error types are caught at the segmentation stage?
Of Bareun's 115 segmentation labels, 14 are labels for error detection. Morphological errors such as ㅂ, ㅅ, ㄹ, 러, and 르 irregular conjugation errors, 외 contraction errors, copula ending errors, and vowel progressive assimilation errors are identified at the segmentation stage, and eojeols with errors are restored to the correct form.