Skip to content

제11항 두 칸 경계 — 대문자 짝을 단서 없이 수식으로 보지 않는다 - #197

Merged
owjs3901 merged 5 commits into
mainfrom
owjs3901/math-detection-blanks
Sep 11, 2026
Merged

owjs3901 merged 5 commits into
mainfrom
owjs3901/math-detection-blanks

Conversation

@owjs3901

Copy link
Copy Markdown
Contributor

요약

수학 제11항의 두 칸 경계가 수식이 아닌 어절에도 붙던 것을 좁혔습니다.

말뭉치 완전 일치
이전 454,990 / 467,121 (97.40%)
이번 455,024 / 467,121 (97.41%)

규정 fixture 는 5,141 / 5,141 그대로입니다.

무엇이 문제였나

제11항은 국어 문장 안의 수식 앞뒤를 두 칸씩 띄우라고 합니다. 그러므로 그 두 칸은
"이 어절은 수식이다"라는 선언입니다. 그런데 알파벳이 이어지는 대문자 짝이면
그것만으로 수학 식별자로 보고 있었습니다.

광명 GH의 주파수
이전   ⠈⠧⠶⠑⠻ ⎵⎵ ⠠⠠⠛⠓ ⎵⎵ ⠺ ⠨⠍⠙⠠⠍      ← 수식 취급
이번   ⠈⠧⠶⠑⠻ ⠴⠠⠠⠛⠓⠲⠺ ⠨⠍⠙⠠⠍           ← 제37항 로마자 구간

GH, AB 처럼 알파벳이 이어지는 짝은 산문의 약어에도 흔합니다. 소문자 쪽은
이미 문장이 주는 수학 단서(, )를 요구하고 있었는데, 대문자 쪽만 그 요구가
빠져 있었습니다.

근거

다섯 판본을 전수 대조하면 우리가 두 칸을 더 넣은 문장이 1,243건, 반대 방향은
0건
입니다. 그 가운데 대문자+ 꼴만 따로 세면 2024 판본 495문장 전부가 참조에
두 칸이 없습니다
(있음 0 : 없음 495).

규정 fixture 에서 이 경로로 두 칸을 받는 유일한 예는 다음이며, 뒤에 값을 이라는
단서가 있습니다.

행렬 A와 B에 대하여 AB의 값을 구하여라.
⠚⠗⠶⠐⠳ ⠴⠠⠁⠲⠧ ⠴⠠⠃⠲⠝ ⠊⠗⠚⠣⠱ ⎵⎵ ⠠⠁⠠⠃ ⎵⎵ ⠺ ⠫⠃⠄⠮ ⠈⠍⠚⠣⠱⠐⠣⠲

고친 방법

대문자에도 소문자와 같은 단서를 요구하고, 그 단서 탐색이 식별자를 나열한 어절을
건너뛰도록
했습니다. 나열은 단서를 뒤로 미룰 뿐이므로 AB와 CD의 값을 은 두 항이
함께 수식으로 남고, 나열이 끝나도록 단서가 없으면 수식이 아닙니다.

기존 단위 테스트 세 건은 단서 없이도 수식이 되던 옛 동작을 담고 있어 새 근거에
맞추어 갱신했습니다.

남은 같은 계열

이번에 고친 것은 1,243건 가운데 대문자 식별자 갈래입니다. 같은 성격의 오탐이 남아
있고, 모양별로 분류해 두었습니다.

건수 모양
401 괄호 있는 로마자·숫자 HD(1280×800), A(9.77)
232 로마자 섞임 (단위 표기) mg/dl, km/h, -49kg
75 괄호 안에 한글 A(45.여), C(33·국악인)씨를
60 숫자·기호만 [3], 22:00, 1-①

검증

  • cargo test --release -p braillify — 4,939 + 541 통과, 실패 0
  • 규정 fixture 5,141 / 5,141
  • cargo clippy --release -p braillify --all-targets -- -D warnings 통과
  • 새 분기에 단위 테스트 추가 (단서 유무 · 조사 종류 · 대소문자 · 나열)

Article 11 writes two blanks around an expression inside Korean prose, so the
boundary says the word is an expression. A run of consecutive capitals was
taken as proof on its own, which made ordinary abbreviations into expressions:
`GH의` came out with the two-blank boundary although no reference in the five
corpus editions writes one there.

Require the same cue the lowercase branch already required — a following
`값`/`곱`, or a preceding product — and let that search step over further
identifier words, so a list keeps its members together (`AB와 CD의 값을`).
The rule example `행렬 A와 B에 대하여 AB의 값을` carries the cue and is
unchanged.

Corpus 454,990 -> 455,024.
@codecov

codecov Bot commented Sep 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
...ify/src/rules/token_rules/math_expression/apply.rs 100.00% <100.00%> (ø)
...y/src/rules/token_rules/math_expression/helpers.rs 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

github-actions Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Braillify testcase report

Suite Passed Total Failed Success rate
Standard testcases 5141 5141 0 100.00%
NIKL 2021 corpus 91016 93115 2099 97.75%
NIKL 2022 corpus 107813 108795 982 99.10%
NIKL 2023 corpus 122539 126693 4154 96.72%
NIKL 2024 corpus 53453 54990 1537 97.20%
NIKL 2025 corpus 80574 83528 2954 96.46%
NIKL corpus (all years) 455395 467121 11726 97.49%

Command: cargo test test_by_testcase -- --nocapture

devfive added 4 commits September 11, 2026 23:26
The boundary says the word is an expression, so anything it wraps is read as
one. Four more shapes were being wrapped although no corpus reference writes
the boundary there.

- A number written with separators is Rule 40 notation, not an expression:
  a clock (22:00), a ratio (16:9), a resolution (1280x720), a range
  (150~200). A letter touching a digit marks a unit or a model (5G, F1.2),
  while a letter standing apart from the digits is a variable, so it keeps the
  boundary (2x+3).
- An expression closes every bracket it opens; a lone one belongs to the prose
  around it (LTE), S(PLAN).
- A Roman word joined by a hyphen is Rule 37 text, not subtraction
  (know-how, well-made).
- Rule 34's person label carries a Korean note inside the parenthesis
  (A(37세)씨, A(27·스리랑카)씨). The following person marker still separates it
  from function notation, so A(14)는 stays an expression.

Corpus 455,024 -> 455,083; the two-blank excess falls from 1,243 sentences to
755.
A Korean word followed by nothing but a sign and digits (아세안+3, 리오+20,
스포츠+) is the place where Article 46 puts an operator between Korean and a
number, and that article already sets its one blank. Wrapping it in the
Article 11 boundary wrote two instead, against every corpus reference.

Corpus 455,083 -> 455,112.
A number written with separators was still handed to the math engine, which
drops the number sign the colon requires: 7:30, came out with one sign where
Rule 40 writes two. Route those words to the Korean rules instead.

Three shapes stay with the math engine because they are expressions: a
function name (log2, sin3x), a middle dot between digits (6·9), and a run of
variables after a digit (3ab).

Corpus 455,112 -> 455,395.
CI enforces full line coverage; the arm that refuses the boundary when a
pre-encoded fragment precedes the identifier had no test.
@github-actions

Copy link
Copy Markdown
Contributor

Changepacks

braillify@2.1.2 → 2.2.0 - libs/braillify/Cargo.toml

Minor

  • Raise Korean-braille conversion accuracy on the NIKL parallel corpus from 96.5% to 97.38% across its five editions (454,899 of 467,121 sentences), and read Hanja through its Korean reading. All 5,141 rule fixtures still pass.

Patch

  • Apply the National Institute of Korean Language rulings on Article 51's colon, Article 10's jamo prefix, and Article 46's operator spacing; corpus accuracy 454,990 of 467,121 sentences.

braillify-c@0.1.2 → 0.2.0 - packages/c/Cargo.toml

Minor

  • Raise Korean-braille conversion accuracy on the NIKL parallel corpus from 96.5% to 97.38% across its five editions (454,899 of 467,121 sentences), and read Hanja through its Korean reading. All 5,141 rule fixtures still pass.

Patch

  • Apply the National Institute of Korean Language rulings on Article 51's colon, Article 10's jamo prefix, and Article 46's operator spacing; corpus accuracy 454,990 of 467,121 sentences.

Braillify@2.1.2 → 2.2.0 - packages/dotnet/Braillify/Braillify.csproj

Minor

  • Raise Korean-braille conversion accuracy on the NIKL parallel corpus from 96.5% to 97.38% across its five editions (454,899 of 467,121 sentences), and read Hanja through its Korean reading. All 5,141 rule fixtures still pass.

Patch

  • Apply the National Institute of Korean Language rulings on Article 51's colon, Article 10's jamo prefix, and Article 46's operator spacing; corpus accuracy 454,990 of 467,121 sentences.

BraillifyNet@2.1.2 → 2.2.0 - packages/dotnet/BraillifyNet/BraillifyNet.csproj

Minor

  • Raise Korean-braille conversion accuracy on the NIKL parallel corpus from 96.5% to 97.38% across its five editions (454,899 of 467,121 sentences), and read Hanja through its Korean reading. All 5,141 rule fixtures still pass.

Patch

  • Apply the National Institute of Korean Language rulings on Article 51's colon, Article 10's jamo prefix, and Article 46's operator spacing; corpus accuracy 454,990 of 467,121 sentences.

braillify@2.1.2 → 2.2.0 - packages/node/package.json

Minor

  • Raise Korean-braille conversion accuracy on the NIKL parallel corpus from 96.5% to 97.38% across its five editions (454,899 of 467,121 sentences), and read Hanja through its Korean reading. All 5,141 rule fixtures still pass.

Patch

  • Apply the National Institute of Korean Language rulings on Article 51's colon, Article 10's jamo prefix, and Article 46's operator spacing; corpus accuracy 454,990 of 467,121 sentences.

braillify@2.1.2 → 2.2.0 - packages/python/pyproject.toml

Minor

  • Raise Korean-braille conversion accuracy on the NIKL parallel corpus from 96.5% to 97.38% across its five editions (454,899 of 467,121 sentences), and read Hanja through its Korean reading. All 5,141 rule fixtures still pass.

Patch

  • Apply the National Institute of Korean Language rulings on Article 51's colon, Article 10's jamo prefix, and Article 46's operator spacing; corpus accuracy 454,990 of 467,121 sentences.

@owjs3901
owjs3901 merged commit 8c13e6b into main Sep 11, 2026
44 checks passed
@owjs3901
owjs3901 deleted the owjs3901/math-detection-blanks branch September 11, 2026 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant