;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!\210\303\304\305\306\307\310%\207" [require cl-lib pyim-pymap custom-declare-group pyim-pinyin nil "Pinyin libs for pyim." :group pyim] 6) (defvar pyim-pinyin-shenmu '("b" "p" "m" "f" "d" "t" "n" "l" "g" "k" "h" "j" "q" "x" "z" "c" "s" "zh" "ch" "sh" "r" "y" "w")) (defvar pyim-pinyin-yunmu '("a" "o" "e" "i" "u" "v" "ai" "ei" "ui" "ao" "ou" "iu" "ie" "ia" "ua" "ve" "er" "an" "en" "in" "un" "vn" "ang" "iong" "eng" "ing" "ong" "uan" "uang" "ian" "iang" "iao" "ue" "uai" "uo")) (defvar pyim-pinyin-valid-yunmu '("a" "o" "e" "ai" "ei" "ui" "ao" "ou" "er" "an" "en" "ang" "eng")) (byte-code "\300\301\302\303#\210\304\301\302\305#\210\306\302\307\310\311DD\312\313\314%\207" [defalias pyim-fuzzy-pinyin-alist pyim-pinyin-fuzzy-alist nil make-obsolete "4.0" custom-declare-variable funcall function #[0 "\300\207" [(("en" "eng") ("in" "ing") ("un" "ong"))] 1] "设定模糊音." :type sexp] 6) #@239 双拼可能自动产生的无效拼音. 例如输入 kk 得到有效拼音 kuai . 但同时产生了无效拼音 king . 用户手动输入的无效拼音无需考虑. 因为用户有即时界面反馈,不可能连续输入无效拼音. (defconst pyim-pinyin-shuangpin-invalid-pinyin-regexp (byte-code "\300\301\302\303\304\305#\"\207" [format "^\\(%s\\)$" mapconcat identity ("[qtghkzcsdn]o" "[ypfbmw]uo" "[qj]ong" "[rtysdghklzcn]iong" "[qtypdjlxbnm]uai" "[ghk]ing?" "[qjlxn]uang" "[dgh]iang" "[qjlx]ua" "[hkg]ia" "[rtsdghkzc]v" "[jl]ui") "\\|"] 6) (#$ . 1334)) #@297 从 PINYIN 构建一个 regexp,用于搜索联想词, 比如:ni-hao-si-j --> ^ni-hao[a-z]*-si[a-z]*-j[a-z]* , when FIRST-EQUAL set to `t' --> ^ni[a-z]*-hao[a-z]*-si[a-z]*-j[a-z]* , when FIRST-EQUAL set to `nil' (fn PINYIN &optional MATCH-BEGINNING FIRST-EQUAL ALL-EQUAL) (defalias 'pyim-pinyin-build-regexp #[1025 "\2050;\2050\300\301\"\302C\203\303\202\304\305\306\307\310\311\312\n\n #\313\"\314\315%\301#P\266\202\207" [split-string "-" 0 "^" "" mapconcat make-byte-code 257 "\302\211\242T\240\210\300\203\302\242\303V\203\301\203\207\211\304P\207\207" vconcat vector [1 "[a-z]*"] 3 "\n\n(fn X)"] 16 (#$ . 1905)]) #@74 从一个拼音字符串 PINYIN 中提出第一个声母。 (fn PINYIN) (defalias 'pyim-pinyin-get-shenmu #[257 "\211G\301^\302\303V\203'\303O\262\211\235\203\303\262\202S\262\304\262\202\211G\302OB\207" [pyim-pinyin-shenmu 2 nil 0 ""] 7 (#$ . 2573)]) #@81 将拼音字符串 PINYIN 分解成声母,韵母和剩余部分. (fn PINYIN) (defalias 'pyim-pinyin-get-charpy #[257 "\302!\211@A\211G\303^\304\211\305\306V\203\204\306O\262\304O\262\235\203z\211\"\2048S\262\307\262\202\307\231\203t\302!@\307\232\203t\310\304O \235\203t\306\310O\235\203t\211\306\310O\"\204j\306\262\202S\262\307\262\202\306\262\202S\262\307\262\202\210FG\304OB\207" [pyim-pinyin-yunmu pyim-pinyin-shenmu pyim-pinyin-get-shenmu 5 nil #[514 "\300\301\302\303\304F!\"\"\207" [cl-some #[257 "\300\301\"\207" [pyim-pymap-py2cchar-get t] 4 "\n\n(fn CHAR-PINYIN)"] mapcar #[257 "\211@A@P\207" [] 3 "\n\n(fn X)"] pyim-pinyin-find-fuzzy] 11 "\n\n(fn SHENMU YUNMU)"] 0 "" -1] 13 (#$ . 2850)]) #@86 Find all fuzzy pinyins. INFO is a list like: (shenmu yunmu shenmu yunmu) (fn INFO) (defalias 'pyim-pinyin-find-fuzzy #[257 "\301\302\262@\"A@\"\301\211\203:\211@\211\2032\211@ AABBB\262A\266\202\202\210A\266\202\202\210\303!\266\204\207" [pyim-pinyin-fuzzy-alist nil #[514 "\300\211\203!\211@\235\203\300\262\301\302!B!\262A\266\202\202\210\211\206(C\207" [nil delete-dups cl-copy-list] 9 "\n\n(fn STR LIST)"] reverse] 13 (#$ . 3628)]) #@252 将一个代表拼音的字符串 PINYIN, 分解为声母韵母对组成的列表. 这个过程通过循环的调用 `pyim-pinyin-get-charpy' 来实现,整个过程 类似用菜刀切黄瓜片,将一个拼音字符串逐渐切开。 (fn PINYIN) (defalias 'pyim-pinyin-split #[257 "\211\300\211\301\231\2039\302!\262@@\301\232\203)@A@\301\232\203)\300\262\301\211\262\2026\303@C\"\262A\211\262\204\211\206C\301\301FC\207" [nil "" pyim-pinyin-get-charpy append] 8 (#$ . 4112)]) (provide 'pyim-pinyin)