Skip to content

Add Dayi smart candidate selection#882

Open
omni624562 wants to merge 2 commits into
EasyIME:masterfrom
omni624562:codex/pime-dayi-smart-selection
Open

Add Dayi smart candidate selection#882
omni624562 wants to merge 2 commits into
EasyIME:masterfrom
omni624562:codex/pime-dayi-smart-selection

Conversation

@omni624562
Copy link
Copy Markdown

Summary / 摘要

中文

新增大易智慧選字,依使用者實際選字記錄調整候選字排序。

主要內容:

  • 大易候選字會依選字次數排序
  • 支援近期選字加權
  • 支援前一字上下文加權
  • cincount.json 支援舊格式相容與壞資料容錯
  • 每個候選字最多保留 32 筆前文上下文,避免長期使用資料無限成長
  • 寫檔有 60 秒節流,停用/釋放時強制保存
  • 大易設定頁加入智慧選字、近期優先、前一字上下文加權開關
  • 新增測試涵蓋資料格式、排序、上下文上限與寫檔節流

English

Adds smart candidate selection for Dayi by learning from the user's actual candidate choices.

Highlights:

  • Reorders Dayi candidates by learned selection frequency
  • Supports recency weighting
  • Supports previous-character context weighting
  • Keeps compatibility with older cincount.json formats and tolerates malformed entries
  • Caps previous-context data at 32 entries per candidate to avoid unbounded long-term growth
  • Throttles writes to once per 60 seconds, with forced save on deactivation/destruction
  • Adds Dayi settings for smart selection, recency weighting, and previous-context weighting
  • Adds tests for data normalization, sorting, context caps, and save throttling

Validation / 驗證

  • git diff --check
  • python -m py_compile python\cinbase\__init__.py python\cinbase\cin.py python\cinbase\config.py python\cinbase\configtool.py python\server.py
  • python -m unittest tests.test_backend_resilience

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.

1 participant