;ELC��� ;;; Compiled ;;; in Emacs version 26.3 ;;; with all optimizations. ;;; This file contains utf-8 non-ASCII characters, ;;; and so cannot be loaded into Emacs 22 or earlier. (and (boundp 'emacs-version) (< (aref emacs-version (1- (length emacs-version))) ?A) (string-lessp emacs-version "23") (error "`%s' was compiled for Emacs 23 or later" #$)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (byte-code "\300\301!\210\300\302!\207" [require pyim-common subr-x] 2) #@97 å°äºŽè¿™ä¸ªæ•°å€¼(å•ä½ä¸ºM)çš„è¯å…¸ä¸éœ€è¦ç”¨åˆ†åŒºç®—æ³•åŠ é€Ÿ.å¯èŠ‚约一åŠçš„内å˜. (defvar pyim-dregcache-partition-minimum-size 32 (#$ . 480)) (defvar pyim-dregcache-cache nil) (defvar pyim-dregcache-icode2word nil) (defvar pyim-dregcache-iword2count nil) (defvar pyim-dregcache-dicts-md5 nil) #@47 Get VARIABLE dcache file path. (fn VARIABLE) (defalias 'pyim-dregcache-variable-file #[257 "\301!\302!P\207" [pyim-dcache-directory file-name-as-directory symbol-name] 4 (#$ . 794)]) #@52 Save VARIABLE with its VALUE. (fn VARIABLE VALUE) (defalias 'pyim-dregcache-save-variable #[514 "\301!\302\303\304!\302\"\210\305\306!r\211q\210\307\310\311\312\313!\314\"\315$\216c\210\316!*\262)\207" [save-silently pyim-dregcache-variable-file t make-directory file-name-directory generate-new-buffer " *temp*" make-byte-code 0 "\301\300!\205 �\302\300!\207" vconcat vector [buffer-name kill-buffer] 2 pyim-dcache-write-file] 10 (#$ . 986)]) #@55 载入 VARIABLE 对应的文件内容. (fn VARIABLE) (defalias 'pyim-dregcache-load-variable #[257 "\300!\211\205)�\301!\205)�\302\303!r\211q\210\304\305\306\307\310!\311\"\312$\216\313!\210\314 *\262\207" [pyim-dregcache-variable-file file-exists-p generate-new-buffer " *temp*" make-byte-code 0 "\301\300!\205 �\302\300!\207" vconcat vector [buffer-name kill-buffer] 2 insert-file-contents buffer-string] 9 (#$ . 1444)]) #@136 对 WORDS-LIST 排åºï¼Œè¯é¢‘大的排在å‰é¢. 排åºä½¿ç”¨ `pyim-dregcache-iword2count' ä¸è®°å½•çš„è¯é¢‘ä¿¡æ¯ (fn WORDS-LIST) (defalias 'pyim-dregcache-sort-words #[257 "\300\301\"\207" [sort #[514 "\301\302\"@\301\302\"@\303\"\206�\304\303\"\206�\304V\207" [pyim-dregcache-iword2count split-string ":" gethash 0] 8 "\n\n(fn A B)"]] 4 (#$ . 1880)]) #@24 对个人è¯åº“排åº. (defalias 'pyim-dregcache-sort-icode2word #[0 "\301\302!r\211q\210\303\304\305\306\307!\310\"\311$\216\312\313\"\211\203T�\211@\314\315\"\203A�\316\317\"\320\312\316\311\"\321\"!\322\323\324\325\321#P\"c\266\202M�\211\326\230\204M�\322\323\"c\210A\266\202\202�\210\327 \211*\207" [pyim-dregcache-icode2word generate-new-buffer " *temp*" make-byte-code 0 "\301\300!\205 �\302\300!\207" vconcat vector [buffer-name kill-buffer] 2 split-string "\n" string-match "^\\([a-z-]+ \\)\\(.*\\)" match-string 1 pyim-dregcache-sort-words " " format "%s\n" mapconcat identity "" buffer-string] 12 (#$ . 2253)]) #@79 å°† RAW-CONTENT 划分æˆå¯ä»¥æ›´é«˜æ•ˆæœç´¢çš„缓冲区. (fn RAW-CONTENT) (defalias 'pyim-dregcache-create-cache-content #[257 "\301G\302_W\203�\303D\262\202r�\304\301\305\301\211\305\301GW\203R�\306\307\234!P\262\310\n#\262\211\203K�\311\312#C\"\262\313\262\211\262T\262\202�\203j�\311\312#C\"\262\303D\262\202p�\303 D\262\266\211\207" [pyim-dregcache-partition-minimum-size nil 1048576 :content "bcdefghjklmnopqrstwxyz" 0 "^" string string-match append substring-no-properties t] 15 (#$ . 2892)]) #@38 READ from DICT-FILE. (fn DICT-FILE) (defalias 'pyim-dregcache-load-dictionary-file #[257 "\301\302!r\211q\210\303\304\305\306\307!\310\"\311$\216\312!\210\313 *\262\314\315!\316!#\211\207" [pyim-dregcache-cache generate-new-buffer " *temp*" make-byte-code 0 "\301\300!\205 �\302\300!\207" vconcat vector [buffer-name kill-buffer] 2 insert-file-contents buffer-string lax-plist-put file-truename pyim-dregcache-create-cache-content] 8 (#$ . 3442)]) #@310 读å–å¹¶åŠ è½½è¯åº“. è¯»å– `pyim-dicts' å’Œ `pyim-extra-dicts' 里é¢çš„è¯åº“文件,生æˆå¯¹åº”çš„ è¯åº“缓冲文件,然åŽåŠ è½½è¯åº“缓å˜ã€‚ DICT-FILES 是è¯åº“文件列表. DICTS-MD5 是è¯åº“çš„MD5æ ¡éªŒç . 如果 FORCE ä¸ºçœŸï¼Œå¼ºåˆ¶åŠ è½½ã€‚ (fn DICT-FILES DICTS-MD5 &optional FORCE) (defalias 'pyim-dregcache-update-code2word #[770 "\211\204�\232?\205!�\211\203�\211@\301!\210A\266\202\202\f�\210\211\207" [pyim-dregcache-dicts-md5 pyim-dregcache-load-dictionary-file] 7 (#$ . 3905) nil]) #@98 å°†å£°æ¯ CHAR 转æ¢ä¸ºé€šç”¨æ£åˆ™è¡¨è¾¾å¼åŒ¹é…所有以该声æ¯å¼€å¤´çš„汉å—. (fn CHAR) (defalias 'pyim-dregcache-shenmu2regexp '(macro . #[257 "\300\301BB\207" [concat ("[a-z]*")] 4 (#$ . 4435)])) #@46 判æ–CODE 是å¦æ˜¯ä¸€ä¸ªå£°æ¯. (fn CODE) (defalias 'pyim-dregcache-is-shenmu '(macro . #[257 "\300\301\302D\303BB\304\305\306BBDE\207" [and eq length (1) not string-match ("aeo")] 7 (#$ . 4649)])) #@151 å°† CODE 转æ¢æˆæ£åˆ™è¡¨è¾¾å¼ç”¨æ¥æœç´¢è¾žå…¸ç¼“å˜ä¸çš„匹é…项目. å•ä¸ªå£°æ¯ä¼šåŒ¹é…所有以æ¤ç”Ÿæ¯å¼€å¤´çš„å•ä¸ªæ±‰å—. (fn CODE) (defalias 'pyim-dregcache-code2regexp #[257 "\300G\301=\203�\302\303\"\204�\304P\202P�\305\306\"\211\262G\301=\203&�\202P�\307\310\306#G\311W\2036�\211\202N�\211GS\234\312=\203K�\211\313GSO\314P\202N�\211\315P\262\207" [nil 1 string-match #1="aeo" #2="[a-z]*" split-string "-" mapconcat #[257 "\211G\300=\203�\301\302\"\204�\211\303P\207\207" [1 string-match #1# #2#] 4 "\n\n(fn E)"] 3 42 0 "?[a-z-]*" "[a-z-]*"] 6 (#$ . 4859)]) #@13 (fn CODE) (defalias 'pyim-dregcache-match-line '(macro . #[257 "\300\301\302D\303BBB\207" [concat "^" pyim-dregcache-code2regexp (" \\(.+\\)")] 5 (#$ . 5460)])) #@21 所有è¯å…¸æ–‡ä»¶. (defalias 'pyim-dregcache-all-dict-files #[0 "\301\211\203�\211@\211;\203�\211B\262A\266\202\202�\210\211\237\207" [pyim-dregcache-cache nil] 5 (#$ . 5630)]) #@106 找到 CODE 对应的å—å…¸å缓冲区. FILE-INFO 是å—典文件的所有信æ¯. (fn CODE FILE-INFO) (defalias 'pyim-dregcache-get-content #[514 "\300\301\"\302\303\234<\2037�\211\304X\203�\211\305Z\262\2022�\211\306X\203+�\307\305\310#\262\2022�\307\305\311#\2628\262\207" [plist-get :content nil 0 104 97 116 - 1 3] 9 (#$ . 5822)]) #@21 (fn CONTENT CODE) (defalias 'pyim-dregcache-get-1 #[514 "\301\302\303\304!\305QG\306\211W\203S�\307 #\211\262\203S�\310\311 \"\262\203E�\307\312\"\203;�B\262\202E�\313\314\315\"\237\"\262\316\317 GG$\262\202�)\207" [case-fold-search t 0 "^" pyim-dregcache-code2regexp " \\(.+\\)" nil string-match match-string-no-properties 1 "^[^ ]+$" append split-string " +" + 2] 13 (#$ . 6179)]) #@90 从 `pyim-dregcache-cache' æœç´¢ CODE, 得到对应的è¯æ¡. (fn CODE &optional FROM) (defalias 'pyim-dregcache-get #[513 "\302>\204\f�\303>\203�\304!\207\305 \306\203�\307\310\"\210\203E�\211\203D�\211@\311 \"\312\"\313\314\n\"\"\262\266A\266\202\202!�\210\211\237\262\313\315\316\211#\"\207" [pyim-debug pyim-dregcache-cache icode2word ishortcode2word pyim-dregcache-get-icode2word-ishortcode2word pyim-dregcache-all-dict-files nil message "pyim-dregcache-get is called. code=%s" lax-plist-get pyim-dregcache-get-content append pyim-dregcache-get-1 pyim-pymap-py2cchar-get t] 12 (#$ . 6596)]) #@123 以 CODE æœç´¢ä¸ªäººè¯å’Œä¸ªäººè”想è¯. æ£åˆ™è¡¨è¾¾å¼æœç´¢è¯åº“,ä¸éœ€è¦ä¸ºè”想è¯å¼€å•ç‹¬ç¼“å˜. (fn CODE) (defalias 'pyim-dregcache-get-icode2word-ishortcode2word #[257 "\203 �\302\303\"\210 \205�\304 \"\237\207" [pyim-debug pyim-dregcache-icode2word message "pyim-dregcache-get-icode2word-ishortcode2word called => %s" pyim-dregcache-get-1] 4 (#$ . 7225)]) #@219 åˆå¹¶ `pyim-dregcache-icode2word' ç£ç›˜æ–‡ä»¶. åŠ è½½æŽ’åºåŽçš„结果. 在这个过程ä¸ä½¿ç”¨äº† `pyim-dregcache-iword2count' ä¸è®°å½•çš„è¯é¢‘ä¿¡æ¯ã€‚ 如果 FORCE ä¸ºçœŸï¼Œå¼ºåˆ¶æŽ’åº (fn &optional FORCE) (defalias 'pyim-dregcache-update-personal-words #[256 "\301\300!\211\203\222�\302\303!r\211q\210\304\305\306\307\310!\311\"\312$\216\313\211\211\211\211\203&�c\210c\210\314\313ed#\210\315ed\313\316\313%\210eb\210\317\320\321 \316#\204G�\322c\210eb\210m\204\213�\323 b\210`\262\324 \262@\262\325y\305U\203J�\324 \262@\262\230\203J�\211\321 |\210\326\327\"!\330\331\332#\266\202c\210\202J�\266\333 *\210\210\211\205\235�\205\235�\334 \207" [pyim-dregcache-icode2word pyim-dregcache-load-variable generate-new-buffer " *temp*" make-byte-code 0 "\301\300!\205 �\302\300!\207" vconcat vector [buffer-name kill-buffer] 2 nil sort-lines delete-duplicate-lines t re-search-forward "utf-8-unix" line-end-position "## -*- coding: utf-8-unix -*-\n" line-beginning-position pyim-dline-parse 1 delete-dups append " " mapconcat identity buffer-string pyim-dregcache-sort-icode2word] 14 (#$ . 7610)]) #@37 åˆå§‹åŒ– cache 缓å˜ç›¸å…³å˜é‡. (defalias 'pyim-dregcache-init-variables #[0 "\301\302\303\304\305!#\210?\205�\306\307!\207" [pyim-dregcache-icode2word pyim-dcache-set-variable pyim-dregcache-iword2count nil pyim-dcache-get-variable pyim-dhashcache-iword2count pyim-dregcache-update-personal-words t] 5 (#$ . 8742)]) #@36 ä¿å˜ç¼“å˜å†…容到默认目录. (defalias 'pyim-dregcache-save-personal-dcache-to-file #[0 "\203�\302\303!\210 \203�\304\301 \"\210\305\306!\207" [pyim-debug pyim-dregcache-icode2word message "pyim-dregcache-save-personal-dcache-to-file called" pyim-dregcache-save-variable pyim-dcache-save-variable pyim-dregcache-iword2count] 3 (#$ . 9071)]) #@6 TODO (defalias 'pyim-dregcache-insert-export-content #[0 "\300\207" ["TODO"] 1 (#$ . 9426)]) #@71 ä¿å˜è¯é¢‘到缓å˜. (fn WORD &optional PREPEND WORDCOUNT-HANDLER) (defalias 'pyim-dregcache-update-iword2count #[769 "\203 �\302\303\"\210\304 \"\305!\203�!\202(�\247\203\"�\202(�\211\206'�\306T\232?\2054�\307 #\207" [pyim-debug pyim-dregcache-iword2count message "pyim-dregcache-update-iword2count. word=%s" gethash functionp 0 puthash] 9 (#$ . 9525)]) #@59 å°†ä¸æ–‡è¯æ¡ WORD 从个人è¯åº“ä¸åˆ 除. (fn WORD) (defalias 'pyim-dregcache-delete-word #[257 "\303\304!r\211q\210\305\306\307\310\311!\312\"\313$\216c\210eb\210\314\315\211\211\316\317\320Q\315\314#\203V�\306\224\262\306\225\262\321\322!\321\313!\321\323!Q\262T|\210\324\325\"G\322V\203�b\210c\210\202�\326 )\266*\210\327\n\"\207" [pyim-dregcache-icode2word case-fold-search pyim-dregcache-iword2count generate-new-buffer " *temp*" make-byte-code 0 "\301\300!\205 �\302\300!\207" vconcat vector [buffer-name kill-buffer] 2 t nil re-search-forward "^\\([a-z-]+\\) \\(.*\\)" "\\(.*\\)$" match-string-no-properties 1 3 split-string " " buffer-string remhash] 9 (#$ . 9902)]) #@106 ä¿å˜ä¸ªäººè¯åˆ°ç¼“å˜,和其他è¯åº“æ ¼å¼ä¸€æ ·ä»¥å…±äº«æ£åˆ™æœç´¢ç®—法. (fn WORD CODE PREPEND) (defalias 'pyim-dregcache-insert-word-into-icode2word #[771 "\203�\303\304$\210\305\306!r\211q\210\307\310\311\312\313!\314\"\315$\216 \203%� c\210eb\210\316\317\211\211\211\211\320\321 \322Q\317\316#\203n�\310\224\262\310\225\262\323\324!\262|\210\325\326\327\"!\262\327\330\331 C\"!\327\332\333#\266\202Q\262\202{�\327\206w�\n\334R\262\206\200�db\210c\210)\266\335 \211*\207" [pyim-debug pyim-dregcache-icode2word case-fold-search message "pyim-dregcache-insert-word-into-icode2word called => %s %s %s" generate-new-buffer " *temp*" make-byte-code 0 "\301\300!\205 �\302\300!\207" vconcat vector [buffer-name kill-buffer] 2 t nil re-search-forward "^" " \\(.*\\)" match-string-no-properties 1 pyim-dregcache-sort-words split-string " " delete-dups append mapconcat identity "\n" buffer-string] 17 (#$ . 10608)]) #@231 å‡çº§ icode2word 缓å˜ã€‚ dregcache åªæ”¯æŒå…¨æ‹¼å’ŒåŒæ‹¼ï¼Œä¸èƒ½ç”¨äºŽäº”笔之类的型ç 输入法,而 update-icode2word ç›®å‰åªè¦æ˜¯ç”¨äºŽæ›´æ–°åž‹ç 输入法的 code-prefix, 所 以ä¸éœ€è¦å…·ä½“实现细节。 (defalias 'pyim-dregcache-upgrade-icode2word #[0 "\300\207" ["å‡çº§ icode2word 缓å˜ã€‚\n\ndregcache åªæ”¯æŒå…¨æ‹¼å’ŒåŒæ‹¼ï¼Œä¸èƒ½ç”¨äºŽäº”笔之类的型ç 输入法,而\nupdate-icode2word ç›®å‰åªè¦æ˜¯ç”¨äºŽæ›´æ–°åž‹ç 输入法的 code-prefix, 所\n以ä¸éœ€è¦å…·ä½“实现细节。"] 1 (#$ . 11566)]) #@21 (fn WORD CONTENT) (defalias 'pyim-dregcache-search-word-code-1 #[514 "\301\302\303\304\305\260\306\"\205�\307\310\")\207" [case-fold-search t "^\\([a-z-]+\\)\\(.*\\) " "\\(" " \\|" "$\\)" string-match match-string-no-properties 1] 8 (#$ . 12117)]) #@105 从 `pyim-dregcache-cache' å’Œ `pyim-dregcache-icode2word' æœç´¢ word, 得到对应的code. (fn WORD) (defalias 'pyim-dregcache-search-word-code #[257 "\203 �\303\304\"\210 \205p�\3052p�\306 \307\n\203(�\310\n\"\262\211\203(�\311\305C\"\210\211\205k�\211@\312 \"\312\313\"\211<\203@�\211\202B�\211C\211\203b�\211@\310 \"\262\203[�\311\305C\"\210A\266\202\202B�\266A\266\202\202)�\262\266\2020\207" [pyim-debug pyim-dregcache-cache pyim-dregcache-icode2word message "pyim-dregcache-search-word-code word=%s" result pyim-dregcache-all-dict-files nil pyim-dregcache-search-word-code-1 throw lax-plist-get :content] 12 (#$ . 12382)]) #@58 将个人è¯åº“å˜å…¥ FILE. (fn FILE &optional CONFIRM) (defalias 'pyim-dregcache-export-personal-words #[513 "\205>�\301 \210\302\303!r\211q\210\304\305\306\307\310!\311\"\312$\216c\210eb\210\313\314\315\316#\2031�\317\320\315\316#\210\202 �\321\315ed#\210\322\"*\262\207" [pyim-dregcache-icode2word pyim-dregcache-sort-icode2word generate-new-buffer " *temp*" make-byte-code 0 "\301\300!\205 �\302\300!\207" vconcat vector [buffer-name kill-buffer] 2 re-search-forward "^[a-z]+ [^a-z]*" nil t replace-match "" sort-lines pyim-dcache-write-file] 9 (#$ . 13039)]) (provide 'pyim-dregcache)