From: MORIOKA Tomohiko Date: Thu, 26 Aug 2021 05:16:03 +0000 (+0900) Subject: (ideographic-structure-compare-functional-and-apparent): X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f69905457ea515d12af5a8fcf02cdeda1d7116ea;p=chise%2Fids.git (ideographic-structure-compare-functional-and-apparent): - Implement rule-721: ⿷⿸TNC -> ⿸T⿺NC if N is U+4EBA/U+5165/U+513F/U+51E0/A-{IWDS|comp}U+{4EBA|513F}. - Implement rule-722: ⿷⿸TBM -> ⿸T⿱MB if B is not N. --- diff --git a/ids-find.el b/ids-find.el index 8fe8df7..fa6ee5e 100644 --- a/ids-find.el +++ b/ids-find.el @@ -1604,7 +1604,54 @@ COMPONENT can be a character or char-spec." a-res (list ?⿺ (nth 1 enc-str) new-str-c) 710)) - ))) + ) + ((eq (car enc-str) ?⿸) + (unless conversion-only + (setq f-res (ids-find-chars-including-ids enc-str))) + (cond + ((and (characterp (nth 2 enc-str)) + (or (memq (char-ucs (nth 2 enc-str)) + '(#x4EBA #x5165 #x513F #x51E0)) + (memq (or (encode-char (nth 2 enc-str) '=>ucs@iwds-1) + (encode-char (nth 2 enc-str) '=>ucs@component)) + '(#x4EBA #x513F)))) + (setq new-str (list ?⿺ + (nth 2 enc-str) + (nth 2 structure))) + (setq new-str-c + (if (setq ret (ideographic-structure-find-chars new-str)) + (car ret) + (list (cons 'ideographic-structure new-str)))) + (if conversion-only + (list ?⿸ (nth 1 enc-str) new-str-c) + (setq a-res (ids-find-chars-including-ids new-str)) + (list enc + f-res + new-str-c + a-res + (list ?⿸ (nth 1 enc-str) new-str-c) + 721)) + ) + (t + (setq new-str (list ?⿱ + (nth 2 structure) + (nth 2 enc-str))) + (setq new-str-c + (if (setq ret (ideographic-structure-find-chars new-str)) + (car ret) + (list (cons 'ideographic-structure new-str)))) + (if conversion-only + (list ?⿸ (nth 1 enc-str) new-str-c) + (setq a-res (ids-find-chars-including-ids new-str)) + (list enc + f-res + new-str-c + a-res + (list ?⿸ (nth 1 enc-str) new-str-c) + 722)) + )) + ) + )) ) ((eq (car structure) ?⿺) (setq enc (nth 1 structure))