Clarify Chinese query segmentation scope - #1026
Merged
safishamsi merged 1 commit intoMay 26, 2026
Merged
Conversation
Keep Graphify query segmentation focused on Chinese terms: rename the CJK helpers and extra to Chinese scope, cache the optional jieba import at module load, and keep a bigram fallback when jieba is unavailable. Constraint: Reviewer asked either to broaden Hiragana/Katakana/Hangul support or rename CJK helpers; user chose Chinese-only because Japanese segmentation accuracy is uncertain. Rejected: Broaden to Japanese and Korean segmentation | jieba is Chinese-oriented and the user explicitly limited scope to Chinese. Confidence: high Scope-risk: narrow Directive: Do not label this path as CJK unless Hiragana/Katakana/Hangul segmentation is intentionally supported and tested. Tested: uv run --with pytest pytest tests/test_serve.py tests/test_query_cli.py tests/test_benchmark.py Tested: uv run --with pytest --with jieba pytest tests/test_serve.py -k "chinese or non_chinese" Tested: graphify update . Not-tested: Full test suite. Co-authored-by: OmX <omx@oh-my-codex.dev>
candy-Tong
force-pushed
the
fix/chinese-query-segmentation-cache
branch
from
May 26, 2026 09:32
c525716 to
951eebe
Compare
Contributor
Author
|
Closing this duplicate because the fix has been moved back to #1014. |
This was referenced May 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
v8branch (68863a7).jiebaimport at module level and keep the bigram fallback whenjiebais unavailable.Fixes #962
Supersedes #964
Tests
uv run --with pytest pytest tests/test_serve.py tests/test_query_cli.py tests/test_benchmark.pyuv run --with pytest --with jieba pytest tests/test_serve.py -k "chinese or non_chinese"graphify update .