[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/pyim 940a6a6 5/5: Update pyim-pymap.el's Commentary
From: |
Feng Shu |
Subject: |
[elpa] externals/pyim 940a6a6 5/5: Update pyim-pymap.el's Commentary |
Date: |
Mon, 22 Feb 2021 03:48:41 -0500 (EST) |
branch: externals/pyim
commit 940a6a65d974075fd950bfbb3bb12e68d6f837c5
Author: Feng Shu <tumashu@163.com>
Commit: Feng Shu <tumashu@163.com>
Update pyim-pymap.el's Commentary
---
pyim-pymap.el | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++---
1 file changed, 57 insertions(+), 3 deletions(-)
diff --git a/pyim-pymap.el b/pyim-pymap.el
index 7e3f831..ab0bdb9 100644
--- a/pyim-pymap.el
+++ b/pyim-pymap.el
@@ -25,14 +25,68 @@
;;; Commentary:
+;; * 说明文档 :doc:
+
+;; This file is converted from pinyin_simp.dict.yaml of
+;; [[https://github.com/rime/rime-pinyin-simp][rime-pinyin-simp]]
+
+;; rime-pinyin-simp use LGPL-3.0 License, while pinyin_simp.dict.yaml
+;; has the header like below:
+
+;; # Rime dictionary
+;; # encoding: utf-8
+;; #
+;; # A minimal Pinyin dictionary for simplified Chinese script
+;; #
+;; # Derived from android open source project:
+;; #
http://android.git.kernel.org/?p=platform/packages/inputmethods/PinyinIME.git
+;; #
+
;; 这个文件是 pyim 内部使用的 "拼音-汉字" 对照表,
;; 这个对照表用来实现拼音查询功能,即,查询某个汉字对应的拼音代码。
-;; 词库中汉字拼音的信息从 android project 中得到:
-;;
http://android.git.kernel.org/?p=platform/packages/inputmethods/PinyinIME.git
-
;; 注意: 这个文件 *不用于* 输入法自定义词库!!!
+;; (defun pyim-pymap-new nil)
+
+;; (defun pyim-pymap-importer ()
+;; "将格式为:
+
+;; 你 ni
+;; 我 wo
+
+;; 的文件内容,转换为 pyim 的 pymap
+
+;; 注意: 这个文件中词条的词率由低到高排列。"
+;; (interactive)
+;; (let ((hashtable (make-hash-table :size 1000000 :test #'equal))
+;; alist)
+;; (while (not (eobp))
+;; (let* ((begin (line-beginning-position))
+;; (end (line-end-position))
+;; (items (split-string
+;; (buffer-substring-no-properties begin end)
+;; " "))
+;; (word (nth 0 items))
+;; (pinyin (nth 1 items)))
+;; (when (and pinyin word)
+;; (puthash pinyin
+;; (concat word
+;; (replace-regexp-in-string
+;; word ""
+;; (or (gethash pinyin hashtable) "")))
+;; hashtable)))
+;; (forward-line 1))
+;; (maphash
+;; #'(lambda (key value)
+;; (push (list key value) alist))
+;; hashtable)
+;; (setq pyim-pymap-new
+;; (seq-sort
+;; #'(lambda (a b)
+;; (string< (car a) (car b)))
+;; alist))))
+
;;; Code:
;; * 代码 :code:
- [elpa] externals/pyim updated (b774f8f -> 940a6a6), Feng Shu, 2021/02/22
- [elpa] externals/pyim 308cee9 1/5: Remove child-frame, Feng Shu, 2021/02/22
- [elpa] externals/pyim 2dc4df1 3/5: * pyim.el (pyim-page-tooltip): Set default value to 'posframe, for popup is not a GNU elpa package., Feng Shu, 2021/02/22
- [elpa] externals/pyim 940a6a6 5/5: Update pyim-pymap.el's Commentary,
Feng Shu <=
- [elpa] externals/pyim ad3a96c 4/5: * pyim-pymap.el (pyim-pymap): Update docstring., Feng Shu, 2021/02/22
- [elpa] externals/pyim ec75c30 2/5: * pyim.el (pyim-page-tooltip-show): Use minibuffer as fallback, for popup-el is not gnu elpa package., Feng Shu, 2021/02/22