Skip to content

fix: add Dapu 33+33 to 35 tone sandhi rule - #240

Open
Aiuanyu wants to merge 1 commit into
mainfrom
jules-17932127947538961153-331a944d
Open

Aiuanyu wants to merge 1 commit into
mainfrom
jules-17932127947538961153-331a944d

Conversation

@Aiuanyu

@Aiuanyu Aiuanyu commented Aug 11, 2026

Copy link
Copy Markdown
Owner

Add the missing Dapu 33+33 -> 35 tone sandhi rule in sandhi_rules.json and a corresponding test case in tests/sandhi_fixture_test.js.

Fixes #239


PR created automatically by Jules for task 17932127947538961153 started by @Aiuanyu

This commit adds the missing tone sandhi rule for the Dapu dialect (da)
in sandhi_rules.json, where two consecutive 33 (陰平) tones trigger
the first tone to change to 35 (陰上). A corresponding unit test case is
also added in tests/sandhi_fixture_test.js to verify the change.

Co-authored-by: Aiuanyu <93833368+Aiuanyu@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 11, 2026 •

Copy link
Copy Markdown

Deploying hakspring with  Cloudflare Pages  Cloudflare Pages

Latest commit: d534ba5
Status: ✅  Deploy successful!
Preview URL: https://a3f7f999.hakspring.pages.dev
Branch Preview URL: https://jules-17932127947538961153-3.hakspring.pages.dev

View logs

@claude

claude Bot commented Aug 11, 2026

Copy link
Copy Markdown

Review

Clean, minimal, data-only fix — nice work.

Correctness

  • The new "33": "35" entry under da.33.when is correct: in reverse_tone_mapping.json, the macron vowel (ā) maps to tone 33 for the da dialect, so sān sān classifies both syllables as 33, and the rule now correctly promotes the front syllable to 35 — matching the audio evidence described in [sandhi] 大埔 33 + 33 發現未變調 #239.
  • Traced through getSandhiHtml/classifyTone/applySandhiRule in main.js: the rule lookup is fully data-driven (rule.when[nextTone]), so this addition can't collide with or shadow any other dialect/tone combination. No code changes were needed, which is the right scope for this fix.

Test coverage

  • The new fixture (sān sān → sandhi-t35) is placed correctly under the 大埔 (da) section and follows the existing fixture format/style exactly.
  • Since this is a when-only rule (no always/else fallback for this case beyond null), it might be worth a follow-up fixture for a da 33 + some untriggering tone case to confirm else: null still leaves it unmodified — but that's arguably already covered generically by other dialects' fixtures, so not blocking.

Other

  • No security, performance, or style concerns — this is a tiny, well-scoped JSON data change plus a matching test, and CI (sandhi-test.yml) will exercise it automatically.

Looks good to merge once CI passes.

This branch has not been deployed

No deployments
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.

[sandhi] 大埔 33 + 33 發現未變調

1 participant