Repository navigation
Deduplicate sub-compound keywords and tighten auto-extraction limits - #38
Conversation
- Suppress sub-compound splitting of 4-character kanji compounds - Trim suffix stopwords and filter '~時' temporal suffixes - Expand JP_STOP_WORDS with common procedural and state terms - Deduplicate substrings (longest-match priority) in auto-extracted keywords - Reduce MAX_AUTO_KEYWORDS from 15 to 8 and update regen default threshold
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughChangesKeyword processing
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix Sequence Diagram(s)sequenceDiagram
participant Laya
participant KeywordFilter
participant CandidateExtractor
Laya->>KeywordFilter: provide ranked keyword terms
KeywordFilter->>KeywordFilter: filter scores and deduplicate substrings
KeywordFilter->>CandidateExtractor: use fallback candidates when needed
CandidateExtractor-->>KeywordFilter: return trimmed and deduplicated terms
Merge Risk: ⚪ Minimal · up to Keyword generation now returns fewer, deduplicated terms with stricter Japanese filtering; no concrete correctness, data-integrity, or availability issue is identified, so the change is merge-ready with normal checks. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
What
Addresses an issue in auto-keyword extraction where multiple sub-compounds of the same compound phrase (e.g.
排他/制御/排他制御,自動/自動更新/自動更新処理,トークン/アクセストークン) were redundantly selected, unnecessarily exhausting the keyword cap.This PR introduces longest-match priority deduplication, suppresses over-splitting of kanji compound candidates, trims uninformative suffix stop words, expands Japanese general stop words, and tightens the automatic keyword extraction cap from 15 to 8.
Changes
src/keywords.rs:〜時(e.g.発生時-> skipped because発生is a stop word;失効時-> trimmed to stem失効).自動更新処理->自動更新,排他制御手順->排他制御).JP_STOP_WORDSwith common procedural and relational terms (自動,手動,検討,概要,目的,方法,方針,結果,注意,内容,前提,実施,導入,参照,共有,反映,保存,調査,動作,連携,提供,定義,考慮,適用,部分,全体,自身,以降,以前,程度,通常,以下,以上,未満,各種,複数,一覧).is_subwordanddeduplicate_substringsto remove shorter sub-compounds when a longer compound exists (longest-match priority), with safeguards against false positives on ASCII terms (e.g. avoiding matchingformatinsideinformation).MAX_AUTO_KEYWORDSfrom 15 to 8.test_is_subword,test_deduplicate_substrings, andtest_user_example_candidate_extraction.src/main.rs:--thresholdforlk keywords --regenfrom 15 to 8 to align with the new cap.Tests
cargo test: 237 unit / 135 integration (372 passed, 1 pre-existing ignored).cargo clippy --all-targets: clean.cargo fmt --check: clean.Summary by CodeRabbit