[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/pyim 0cb60ff 2/2: 让五笔输入法调整词频。
From: |
ELPA Syncer |
Subject: |
[elpa] externals/pyim 0cb60ff 2/2: 让五笔输入法调整词频。 |
Date: |
Wed, 5 May 2021 02:57:14 -0400 (EDT) |
branch: externals/pyim
commit 0cb60ff27474de33a533ee0777993f9b94aa41c5
Author: Feng Shu <tumashu@163.com>
Commit: Feng Shu <tumashu@163.com>
让五笔输入法调整词频。
---
pyim-candidates.el | 2 +-
pyim.el | 8 +++++---
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/pyim-candidates.el b/pyim-candidates.el
index 8057a04..b2ea757 100644
--- a/pyim-candidates.el
+++ b/pyim-candidates.el
@@ -78,7 +78,7 @@ IMOBJS 获得候选词条。"
(setq output3
(remove "" (or (mapcar (lambda (x)
(concat str x))
- (pyim-dcache-get output1 '(code2word
shortcode2word icode2word)))
+ (pyim-dcache-get output1 '(icode2word
code2word shortcode2word)))
(list str))))
(setq result (append result output3))))
(when (car result)
diff --git a/pyim.el b/pyim.el
index 652866e..445226d 100644
--- a/pyim.el
+++ b/pyim.el
@@ -686,9 +686,11 @@ FILE 的格式与 `pyim-dcache-export' 生成的文件格式相同,
;; 字符串里面剪掉。
(delete-region (point-min) (point)))
(pyim-entered-refresh))
- (when (string-empty-p (pyim-code-search (pyim-outcome-get)
- (pyim-scheme-name)))
- (pyim-create-pyim-word (pyim-outcome-get) t))
+ ;; 型码输入法,只考虑将词条保存到个人词库,用于调整词频,单字不保存。
+ (when (> (length (pyim-outcome-get)) 1)
+ (if (member (pyim-outcome-get) pyim-candidates)
+ (pyim-create-pyim-word (pyim-outcome-get) t)
+ (pyim-create-pyim-word (pyim-outcome-get))))
(pyim-terminate-translation)
;; pyim 使用这个 hook 来处理联想词。
(run-hooks 'pyim-select-finish-hook)))