Skip to content

opencc: enable jieba segmentation plugin#291396

Open
frankslin wants to merge 1 commit into
Homebrew:mainfrom
frankslin:main
Open

opencc: enable jieba segmentation plugin#291396
frankslin wants to merge 1 commit into
Homebrew:mainfrom
frankslin:main

Conversation

@frankslin

Copy link
Copy Markdown

OpenCC has shipped BUILD_OPENCC_JIEBA_PLUGIN since ver.1.3.0. When enabled, the build produces libopencc-jieba as a loadable plugin that replaces the default mmseg segmenter with cppjieba for configs such as s2twp_jieba.json, yielding more accurate phrase-boundary detection on Simplified Chinese input.

The tradeoff is roughly 18 MB of additional installed data under share/opencc/jieba_dict/ (merged trie, HMM model, IDF weights, and raw dictionary files). No new formula dependency is required; cppjieba is bundled in the OpenCC source tree and licensed under MIT.


  • Have you followed the guidelines for contributing?
  • Have you ensured that your commits follow the commit style guide?
  • Have you checked that there aren't other open pull requests for the same formula update/change?
  • Have you built your formula locally with HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>?
  • Is your test running fine brew test <formula>?
  • Does your build pass brew audit --strict <formula> (after doing HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>)? If this is a new formula, does it pass brew audit --new <formula>?

  • AI was used to generate or assist with generating this PR. Please specify below how you used AI to help you, and what steps you have taken to manually verify the changes.

I used Claude Code to draft this PR and I did a round of manual check and revision to the diff.

  • Built from source locally using HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source opencc to confirm the plugin compiles and installs correctly, and the CLI functions correctly
  • Ran brew test opencc to confirm both the existing s2t test and the new jieba test (城堡里的士兵 → 城堡裡的士兵) pass
  • Ran brew audit --strict opencc and brew style opencc with all offenses addressed, now no offences detected
  • Confirmed lib/opencc/plugins/libopencc-jieba.dylib is present in the installed prefix

@github-actions github-actions Bot added the autosquash Automatically squash pull request commits according to Homebrew style. label Jul 5, 2026
OpenCC has shipped `BUILD_OPENCC_JIEBA_PLUGIN` since ver.1.3.0. When enabled,
the build produces libopencc-jieba as a loadable plugin that replaces the
default mmseg segmenter with cppjieba for configs such as s2twp_jieba.json,
yielding more accurate phrase-boundary detection on Simplified Chinese input.
The tradeoff is roughly 18 MB of additional installed data under
`share/opencc/jieba_dict/` (merged trie, HMM model, IDF weights, and raw
dictionary files). No new formula dependency is required; cppjieba is bundled
in the OpenCC source tree and licensed under MIT.
@github-actions github-actions Bot removed the autosquash Automatically squash pull request commits according to Homebrew style. label Jul 5, 2026
@frankslin frankslin changed the title OpenCC: Enable "jieba" segmenter feature for more accurate word segmentation opencc: enable jieba segmentation plugin Jul 5, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5b9395292e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread Formula/o/opencc.rb
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.

2 participants