X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=isd-turtle.el;h=93fea228af0962a12cc55d38aeb6cf2b0bf17539;hb=a11ac7bd359659dd0f6f41b9bb733ca066324377;hp=a4f100122201ba5d1cbc10fc1d627c2a15481396;hpb=222a0abe8e62cbf93c23cc08833d0124ad315cd2;p=chise%2Fisd.git diff --git a/isd-turtle.el b/isd-turtle.el index a4f1001..93fea22 100644 --- a/isd-turtle.el +++ b/isd-turtle.el @@ -1,6 +1,6 @@ ;;; isd-turtle.el --- Utility to dump ideographic-structure as Turtle files -;; Copyright (C) 2017 MORIOKA Tomohiko +;; Copyright (C) 2017, 2018 MORIOKA Tomohiko ;; Author: MORIOKA Tomohiko ;; Keywords: Ideographic Structures (漢字構造、解字), IDS, CHISE, RDF, Turtle @@ -62,6 +62,7 @@ =ucs-var-002 =ucs-var-003 =ucs-var-004 + =ucs-var-005 =cns11643-1 =cns11643-2 =cns11643-3 =cns11643-4 =cns11643-5 =cns11643-6 =cns11643-7 =gb2312 @@ -140,6 +141,7 @@ =>ucs-itaiji-005 =>ucs-itaiji-006 =>ucs-itaiji-007 + =>ucs-itaiji-009 ==>ucs@bucs =big5 =>cbeta @@ -292,7 +294,7 @@ (setq prefix "")) (let ((indent (make-string (* level 4) ?\ )) char - idc + idc idc-str p1 p2 p3 c1 c2 c3 ret) @@ -344,11 +346,37 @@ ((eq idc ?⿻) (setq p1 'underlying p2 'overlaying) - )) + ) + ((and idc (eq (encode-char idc '=ucs-itaiji-001) #x2FF6)) + (setq idc-str "SLR") + (setq p1 'surround + p2 'filling) + ) + ((and idc (eq (encode-char idc '=ucs-var-001) #x2FF0)) + (setq idc-str "⿰・SLR") + (setq p1 'left + p2 'right) + ) + ((and idc (eq (encode-char idc '=>iwds-1) 307)) + (setq idc-str "⿰・⿺") + (setq p1 'left + p2 'right) + ) + ((and idc (eq (encode-char idc '=>iwds-1) 305)) + (setq idc-str "⿱・⿸") + (setq p1 'above + p2 'below) + ) + ((and idc (eq (encode-char idc '=>ucs@component) #x2FF5)) + (setq idc-str "⿱・⿵") + (setq p1 'above + p2 'below) + ) + ) (cond (p3 (format "%s -%s %s:structure [ a idc:%c ; +%s %s:structure [ a idc:%s ; %s %s:%-8s %s %s %s:%-8s %s %s %s:%-8s %s @@ -360,7 +388,7 @@ (chise-turtle-format-ccs-code-point ccs code-point) char) "[")) - indent prefix idc + indent prefix (or idc-str (char-to-string idc)) indent prefix p1 (isd-turtle-format-component c1 ?\; (1+ level) prefix) indent prefix p2 (isd-turtle-format-component c2 ?\; (1+ level) prefix) indent prefix p3 (isd-turtle-format-component c3 ?\ (1+ level) prefix) @@ -374,7 +402,7 @@ ) (idc (format "%s -%s %s:structure [ a idc:%c ; +%s %s:structure [ a idc:%s ; %s %s:%-8s %s %s %s:%-8s %s %s ]%s" @@ -385,7 +413,7 @@ (chise-turtle-format-ccs-code-point ccs code-point) char) "[")) - indent prefix idc + indent prefix (or idc-str (char-to-string idc)) indent prefix p1 (isd-turtle-format-component c1 ?\; (1+ level) prefix) indent prefix p2 (isd-turtle-format-component c2 ?\ (1+ level) prefix) indent