RevisionCategory at a glance
When Bareun corrects spelling, it also returns a RevisionCategory that classifies what kind of correction each one is.
From this category you can tell "why, and from which language rule's point of view, the text was corrected," which is the key when you show users the basis for a correction.
This article puts all the values of RevisionCategory in one table.
Full list of categories
Each Revision in a correction result carries a category field. The value is one of the following.
| Category | Meaning | Example |
|---|---|---|
UNKNOWN | Not classified | — |
GRAMMER | Spelling and grammar rules (conjugation, particle combination, punctuation) | 벼르고 벼러 → 벼르고 별러 |
WORD | Word rules (sai-siot, initial sound law (dueum), Sino-Korean combination) | 로인 → 노인 |
SPACING | Word spacing (spacing and joining) | 아름다운강산 → 아름다운 강산 |
STANDARD | Standard language (non-standard word → standard word) | 글장이 → 글쟁이, 알타리무 → 총각무 |
TYPO | Typos | 스빈다 → 습니다 |
FOREIGN_WORD | Loanword transcription rules | 쵸콜릿 → 초콜릿 |
CONFUSABLE_WORDS | Confusable words | Pairs of words that are easy to mix up because of similar sounds or spellings |
SENTENCE | Sentence-level check | Corrections from the viewpoint of the whole sentence |
CONFIRM | Needs confirmation | Hard to settle automatically, so user confirmation is recommended |
THINKING | Post-processing in progress | Shows an intermediate state during streaming |
What is the difference between GRAMMER and WORD?
GRAMMER (spelling and grammar rules) covers rules by which words change or combine within a sentence, such as conjugation, particle combination, and punctuation
(for example, 르 irregular conjugation 벼러 → 별러). WORD (word rules) covers the spelling rules of the word itself, such as
sai-siot, the initial sound law, and Sino-Korean combination (for example, the initial sound law 로인 → 노인). Both are based on the Hangul orthography (Hangul Matchumbeop), but they apply at different levels.
Where the category is carried
In the hierarchy of a correction result, the category is attached to each Revision, and its basis links to ReviseHelp.
classDiagram
CorrectErrorResponse *-- RevisedBlock
RevisedBlock *-- Revision
Revision --> ReviseHelp : help_id
class RevisedBlock {
TextSpan origin
String revised
list~Revision~ revisions
}
class Revision {
String revised
float score
RevisionCategory category
String help_id
}
class ReviseHelp {
String id
RevisionCategory category
String comment
list~String~ examples
String rule_article
}
Revision.category— What kind of correction this is (RevisionCategory).Revision.help_id— The key that points to the explanation of the basis (ReviseHelp).ReviseHelp.comment/examples/rule_article— The reason for the correction, examples, and the source of the rule.
Rule-based and LLM corrections share the same categories
The same kind of error is unified under the same category whether it is fixed by a rule or by an LLM.
For example, NONSTANDARD returned by the LLM fallback is mapped to STANDARD, TYPO to TYPO, and SPACING to SPACING.
As a result, users see a consistent classification regardless of which path the correction took.
CONFIRM and THINKING are status-type categories
CONFIRM is used for corrections that are hard to settle automatically and where user confirmation is recommended, and THINKING is used during streaming (StreamCorrectError)
to signal that post-processing is still in progress. They differ somewhat in nature from the regular grammar categories.
How responses map to error causes
The RevisionCategory above is the classification value in code that is carried in the result. Separately, when designing the Bareun corrector, errors were
divided by cause, each with its own way of handling, and that view connects to the categories as follows.
| Error cause | Typical response | Related category |
|---|---|---|
| Grammatical errors | Rule-based correction of conjugation, particle combination, and punctuation | GRAMMER |
| Non-standard word errors | A non-standard word dictionary based on the rule system of the Standard Korean Language Dictionary | STANDARD |
| Loanword spelling | Applying the loanword transcription rules | FOREIGN_WORD |
| Confusable words | An LLM picks among similar-sounding words using context | CONFUSABLE_WORDS |
| Pronunciation-related errors | Correcting spellings written wrongly as they sound | GRAMMER / STANDARD, and so on |
(Planned) Sentence-level error correction
While the cause-based responses above work at the eojeol (a space-delimited word unit) and word level, sentence-level error correction, which looks at the whole sentence, is planned to be implemented with an LLM.
Under consideration are semantic redundancy, ambiguity, excessive omission, overuse of the passive, overuse of the causative, subject-predicate agreement problems, overuse of loanwords, subject-object agreement,
inappropriate vocabulary, punctuation, and so on, and these results will be classified under the SENTENCE category.
Frequently asked questions
Q. What values does RevisionCategory have?
UNKNOWN, GRAMMER, WORD, SPACING, STANDARD, TYPO, FOREIGN_WORD, CONFUSABLE_WORDS,
SENTENCE, CONFIRM, and THINKING. They stand for spelling and grammar, word rules, word spacing, standard language, typos, loanwords, confusable words, and so on.
Q. What is the difference between GRAMMER and WORD?
GRAMMER covers grammar rules such as conjugation, particle combination, and punctuation, and WORD covers the spelling rules of the word itself, such as sai-siot, the initial sound law,
and Sino-Korean combination.
Q. How do I check the basis for a correction?
The help_id of each Revision points to a ReviseHelp, which contains the reason for the correction (comment), examples (examples),
and the source of the rule (rule_article).
Q. How does Bareun handle errors by cause?
Grammatical errors map to GRAMMER, non-standard word errors to STANDARD, loanword spelling to FOREIGN_WORD, and similar-sounding
confusable words to CONFUSABLE_WORDS. Pronunciation-related errors are classified as GRAMMER, STANDARD, and so on depending on how the spelling goes wrong.
Q. Is there sentence-level error correction too?
Sentence-level error corrections such as semantic redundancy, ambiguity, excessive omission, overuse of the passive and causative, subject-predicate agreement, overuse of loanwords, and punctuation are
planned to be implemented with an LLM, and their results will be classified under the SENTENCE category.