dadeum-gec-base

A small Korean spelling, spacing and grammar corrector that fixes only what is wrong and leaves the rest of the sentence alone. It comes from dadeum, a grammar checker that runs on the user's own Mac, and is trained only on openly licensed text: no training pair was annotated by an AI provider.

ํ‹€๋ฆฐ ๊ณณ๋งŒ ๊ณ ์น˜๊ณ  ๋‚˜๋จธ์ง€๋Š” ๊ทธ๋Œ€๋กœ ๋‘๋Š” ์ž‘์€ ํ•œ๊ตญ์–ด ๋งž์ถค๋ฒ• ยท ๋„์–ด์“ฐ๊ธฐ ยท ๋ฌธ๋ฒ• ๊ต์ • ๋ชจ๋ธ์ž…๋‹ˆ๋‹ค. ๊ธฐ๊ธฐ ์•ˆ์—์„œ ๋„๋Š” ๋งž์ถค๋ฒ• ๊ฒ€์‚ฌ๊ธฐ ๋‹ค๋“ฌ์—์„œ ๋‚˜์™”๊ณ , ๊ณต๊ฐœ ๋ผ์ด์„ ์Šค ๊ธ€๊ณผ ์ •๋‹ต๋งŒ์œผ๋กœ ํ•™์Šตํ–ˆ์Šต๋‹ˆ๋‹ค(AI ๊ฐ€ ๋‹จ ์ •๋‹ต์€ ์“ฐ์ง€ ์•Š์•˜์Šต๋‹ˆ๋‹ค). ์•ฑ์ด ์“ฐ๋Š” ๊ทœ์น™ ์—”์ง„๋ณด๋‹ค๋Š” ๋‚ฎ๊ณ , ์•„๋ž˜ ๋น„๊ตํ‘œ๋Š” ๋‹ค๋“ฌ์— ์œ ๋ฆฌํ•œ ์šฐ๋ฆฌ ํ‰๊ฐ€์…‹์—์„œ ์žฐ ๊ฒƒ์ž…๋‹ˆ๋‹ค (Limitations ์ฐธ๊ณ ).

The model rewrites a sentence; each change it makes is then judged by its own log-likelihood margin and kept only at or above the margin in gating.json, and guards drop changes that touch non-Hangul, non-ASCII characters, add or remove two or more characters, change a number, or jump three or more jamo to a word absent from the open word list (known_words.bin). Use dadeum_correct.py, which does all of this; plain generate() skips the judgement and the guards.

pip install torch transformers
python dadeum_correct.py "์˜ค๋Š˜์€ ๋‚ ์”จ๊ฐ€ ์ข‹์•„์„œ ์‚ฐ์ฑ…์„ ๊ฐ”๋Š”๋ฐ ์‚ฌ๋žŒ์ด ๋งŽ์•—๋‹ค."
from dadeum_correct import Corrector
corrector = Corrector(".")
corrector.correct("ํšŒ์˜๋Š” ๋‹ค์Œ์ฃผ ํ™”์š”์ผ์— ํ•˜๊ธฐ๋กœ ํ–ˆ์–ด์š”.")
corrector.edits("...")   # [(start, end, replacement), ...]

Model

BART, 6 encoder and 6 decoder layers, width 768, 123.9M parameters, started from KoBART (gogamza/kobart-base-v2).

Training data

Openly licensed text and targets only - no pair was annotated by an AI provider.

Pairs Source text Target
Rule-engine corrections nsmc (CC0), unlabeled kocohub comments, Korean Wikipedia and Wikinews (CC BY-SA 4.0), ์ •์ฑ…๋ธŒ๋ฆฌํ•‘ (KOGL Type 1) the dadeum rule engine, with its parts fitted to AI-annotated data switched off
Wikipedia editors' corrections Korean Wikipedia page history (CC BY-SA 4.0) the editor's corrected sentence, filtered (no evaluation sentences, no content swaps, no foreign-script or number changes)

Training steps, from the base: clean_full (legacy_clean:60, wiki_edits:7)

Evaluation

Measured against gold that AI annotators wrote (not distributed); F0.5 over character edits, touching edits merged. That gold trained nothing, but its val split chose the training checkpoint and the margin in gating.json, so the val scores are slightly optimistic.

Measure Value
Blind half of val (1,196 sentences), F0.5 (P / R) .890 (.964 / .682); the dadeum rule engine: .899 (.946 / .750)
Development, 300 sentences, F0.5 .918; rule engine .950
In-domain test, 350, F0.5 .904; rule engine .927
Sealed domains (reviews, comments, policy, requests), 870, F0.5 .820; rule engine .863
Confirmation domains, 600, F0.5 .803; rule engine .831
News, business and comments (single annotator), 799, F0.5 .788; rule engine .820
Kor-Lang8 rebuild (learners), 2,000, F0.5 .089; rule engine .088
Correct workplace email (27 sentences and the whole email), sentences changed 0
Clean Wikipedia sentences (19,759), sentences changed 694, 602 of them spacing only; rule engine 424
CPU latency per sentence, Apple M4 Pro, 4 threads 120 ms median, 325 ms p95

Next to other Korean correctors

The same sentences and scorer, F0.5. This model runs at its margin; the other open correctors as their cards say; the LLMs with the same annotation guideline in the prompt. The gold rewards minimal edits; on learners' writing (Kor-Lang8), where the reference corrections rewrite more, KoBART gec_kr leads. No public Korean leaderboard for this task was found, so this is our table, not a third-party ranking.

System Sealed domains (870) Confirmation domains (600) Kor-Lang8 (2,000)
this model (dadeum-gec-base) .820 .803 .089
dadeum rule engine (the app) .863 .831 .088
Claude Sonnet 5.5 with an annotation guideline .895 .887 not run
Qwen3-8B .548 .562 .127
KoGrammar distil (theSOL1) .481 .435 .107
KoGrammar base (theSOL1) .476 .439 .104
ET5 typos corrector (j5ng) .408 .347 .102
KoBART gec_kr (Soyoung97) .216 .187 .266

Limitations

  • The benchmark above is ours and favours this model: its gold was written by Claude under our annotation guideline, and it rewards minimal edits, so correctors that rewrite score low on it. No human checked that gold.
  • It learns from the dadeum rule engine's corrections and does not beat that engine, which the dadeum app uses. Its point is an open license and a single file that runs on a CPU.
  • It is a corrector for native writing. On learners' writing corrected by people (Kor-Lang8), where the references rewrite whole phrases, it rarely changes anything and KoBART gec_kr does far better.
  • It shares the rule engine's blind spots; it corrects spelling, spacing and particles far better than word choice or style.
  • One sentence at a time, up to 128 tokens; longer text is split at sentence ends.

License

CC BY-SA 4.0 (LICENSE); attributions in NOTICE. dadeum_correct.py is MIT, like the dadeum repository.

Downloads last month
380
Safetensors
Model size
0.1B params
Tensor type
F32
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for onelastkissforme/dadeum-gec-base

Finetuned
(29)
this model