core: add segmentation plugin host for non-builtin segmenters#1091
core: add segmentation plugin host for non-builtin segmenters#1091frankslin merged 6 commits intoBYVoid:masterfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3c419343e8
ℹ️ 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".
3c41934 to
ecdeeea
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ecdeeeac8b
ℹ️ 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".
ecdeeea to
6cfb393
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6cfb393673
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0df0b5403f
ℹ️ 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".
0df0b54 to
bf03aa0
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bf03aa04c6
ℹ️ 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".
Keep built-in segmentation behavior unchanged, including mmseg and existing official configs. Introduce a small C ABI for segmentation plugins with struct_size-based extensibility plus a runtime loader that resolves non-builtin segmentation.type values through shared libraries. Update the core config path so plugin-backed segmenters receive raw string properties from JSON, while preserving existing Bazel and CMake behavior for current users. Add a minimal plugins/ CMake directory so configuration succeeds before any concrete plugin subtree is added, and include the plugins tree in MANIFEST.in for sdist-based wheel builds.
Replace the remaining bare segment output parameters with an extensible token array struct so the v1 plugin ABI is uniformly size-based. Also define stable plugin error codes and update the jieba plugin to report structured failures for invalid arguments, missing resources, and runtime errors. Keep the exported interface at v1 while improving forward compatibility before the ABI is published.
bf03aa0 to
3819555
Compare
Declare WinUtil.hpp in //src:plugin_segmentation so Bazel Windows builds can compile PluginSegmentation.cpp without undeclared inclusion errors. This fixes the windows-latest build-and-test failure introduced by the plugin host implementation.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7e22190bec
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: eebfbfb243
ℹ️ 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".
Keep built-in segmentation behavior unchanged, including mmseg and existing official configs.
Introduce a small C ABI for segmentation plugins plus a runtime loader that resolves non-builtin segmentation.type values through shared libraries.
Update the core config path so plugin-backed segmenters receive raw string properties from JSON, while preserving existing Bazel and CMake behavior for current users.