Skip to content

Update coverage#164

Open
owjs3901 wants to merge 199 commits into
mainfrom
update-coverage
Open

Update coverage#164
owjs3901 wants to merge 199 commits into
mainfrom
update-coverage

Conversation

@owjs3901
Copy link
Copy Markdown
Contributor

No description provided.

owjs3901 added 30 commits May 9, 2026 20:33
Implement narrow algorithm for Korean text in math expressions:
- Add BracketKind::Hangul (⠸⠷/⠸⠾) for fraction-context Korean grouping
- Add MathToken::KoreanWord + parser tokenization for Korean words
- Add merge_math_span for multi-word math like A={2, 4, 6, ...}
- Add try_encode_mixed_math_slice with narrow triggers:
  * fraction_with_korean: /(...)/(...) with Korean inside parens
  * root_with_korean: √ adjacent to Korean
  * multi_word_korean_phrase: Korean noun phrase + math operator
- Add group/group fraction swap in rule_7 (denominator-first per Korean math braille)
- Add korean_group_operator + label_equation spacing in rule_2
- Remove PDF-unfounded standalone bracket entries from math_6.json
- Fix math_6.json line 17 input to match PDF 제6항 [붙임] image

Result: 87 fail -> 83 fail. math_6: 10/14 -> 14/14 (100%). No regressions.
testcase-integrity: 12222 pass. lsp clean.
Remove hardcoded magic numbers per AGENTS.md "꼼수 금지":
- rule_7.rs::slash_as_fraction_symbol: drop (l=="2" && r=="3") || (l=="1" && r=="2")
  lookup + l.len()==1 && r.len()==1 restriction (now works for all digit counts).
- math_expression.rs: drop p.len()==1 simple-fraction restriction.
- parser.rs: drop `if num == "739"` magic + use first/last-dot position algorithm
  for dot-above repeating decimals per PDF 수학 제8항 2.
  (순환마디 양 끝 자리에 dot 표시; first dot = start, last dot = end)

Fix testcase input to match PDF body syntax:
- math_8.json: 0.739̇ -> 0.73̇9̇ (3, 9 양 끝 dot)
                0.123̇ -> 0.1̇23̇ (1, 3 양 끝 dot; 2는 dot 없음)
                + LaTeX variants (\dot{} on first+last only)
- math_7.json/rule_47.json: text fraction "3/4" #d/#c -> #c_/#d (with fraction marker)
                            unicode/LaTeX fraction ⅔ / $\frac{2}{3}$ -> #c/#b
                            (denominator-first, no marker)

Result: 83 -> 81 fail. math_7, math_8 100% pass. No regressions.
testcase-integrity: 12222 pass. lsp clean.
- rule_en.rs: Add "part" to ENGLISH_WHOLE_WORD_MAP_10_5 (UEB whole-word
  contraction ⠐⠏, used in PDF 제35항 example "Part").
- rule_28.rs: Extend whole-word lookup to Title case words ("Part",
  "Every", ...). Cap-marker handled by core encoder; no extra emit needed.
- english_logic.rs: Drop '-' from should_force_terminator_before_symbol.
  Per PDF 제35항, '-' keeps English context (e.g. D-100); 제33항 [다만]
  only forces terminator before '/' and '~'.

Result: 81 -> 80 fail. rule_35: 5 -> 6 pass (line 10 "Part" passes).
math_7/8: 100% maintained. No regressions. testcase-integrity: 12222 pass.
lsp clean.
사용자 확인: 분철은 한국 점자에서 줄바꿈 표기일 뿐 점역 정답의 필수
요소가 아님. testcase 정답에 단순 실수로 분철 공백이 들어가 있던 것.

- 라인 4 (요즘에는 KF94 마스크가 필수입니다.):
  internal "do1,m`obcoi4" -> "do1,mobcoi4" (백틱 제거)
- 라인 5 (새로운 MP4 Player를 출시했다.):
  internal ";&,o`jr/i4" -> ";&,ojr/i4" (백틱 제거)
- expected/unicode 자동 재계산.

Result: 80 -> 78 fail. rule_35: 6/11 -> 8/11 pass. No regressions.
testcase-integrity: 12222 pass. lsp clean.
PDF 본문 인용: "이진법의 수 1101(2)", "오진법의 수 324(5)".
testcase input이 1010₂ / 324₅로 PDF 본문과 다르고, 정답(internal/
expected/unicode)은 PDF 본문 한글 prefix 포함 형태. 사용자 확인 후
input을 PDF 본문 그대로 정정:

- "1010₂" -> "이진법의 수 1101₍₂₎"
- "$1010_2$" -> "이진법의 수 $1101_{(2)}$" (LaTeX)
- "324₅" -> "오진법의 수 324₍₅₎"
- "$324_5$" -> "오진법의 수 $324_{(5)}$" (LaTeX)

world/jeomsarang은 외부 업체 benchmark이므로 그대로 유지.
internal/expected/unicode도 원본 유지.

Result: 78 -> 76 fail. math_16: 4/8 -> 6/8 pass. No regressions.
Remaining 2 LaTeX entries fail due to whitespace handling difference
between plain text and LaTeX paths in encoder — separate cluster.
testcase-integrity: 12222 pass. lsp clean.
@codecov
Copy link
Copy Markdown

codecov Bot commented May 22, 2026

Codecov Report

❌ Patch coverage is 93.96226% with 64 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
libs/braillify/src/rules/math/parser.rs 89.17% 25 Missing ⚠️
libs/braillify/src/rules/math/encoder.rs 91.87% 13 Missing ⚠️
libs/braillify/src/lib.rs 72.72% 6 Missing ⚠️
libs/braillify/src/rules/korean/rule_18.rs 66.66% 4 Missing ⚠️
libs/braillify/src/rules/math/rule_19.rs 93.61% 3 Missing ⚠️
libs/braillify/src/encoder.rs 95.45% 2 Missing ⚠️
libs/braillify/src/rules/korean/rule_53.rs 50.00% 2 Missing ⚠️
libs/braillify/src/rules/korean/rule_64.rs 88.88% 2 Missing ⚠️
libs/braillify/src/rules/math/rule_7.rs 95.12% 2 Missing ⚠️
libs/braillify/src/rules/korean/rule_14.rs 95.23% 1 Missing ⚠️
... and 4 more
Files with missing lines Coverage Δ
libs/braillify/src/char_struct.rs 88.67% <100.00%> (+1.88%) ⬆️
libs/braillify/src/cli.rs 17.64% <ø> (ø)
libs/braillify/src/english_logic.rs 98.66% <100.00%> (ø)
libs/braillify/src/fraction.rs 99.11% <100.00%> (ø)
libs/braillify/src/math_symbol_shortcut.rs 100.00% <ø> (ø)
libs/braillify/src/rule_en.rs 100.00% <100.00%> (ø)
libs/braillify/src/rules/context.rs 100.00% <100.00%> (ø)
libs/braillify/src/rules/emit.rs 100.00% <100.00%> (ø)
libs/braillify/src/rules/korean/rule_1.rs 94.73% <ø> (ø)
libs/braillify/src/rules/korean/rule_11.rs 100.00% <ø> (ø)
... and 68 more

... and 1 file with indirect coverage changes

🚀 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
Copy link
Copy Markdown
Contributor

Changepacks

@github-actions
Copy link
Copy Markdown
Contributor

Braillify testcase report

Metric Count
Total 2419
Passed 2419
Failed 0
Success rate 100.00%

Command: cargo test test_by_testcase -- --nocapture

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