X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=isd-turtle.el;h=4d345e657bab004ef1b8914c7543c0df2a49100b;hb=95f02b6260aa4dc5d9f6b8edd114f3c6b17cb1cd;hp=c3df592aa78b6b64f607981e3c8b0d63095a697d;hpb=886af806ddcfd1abfba7841f11ffe2579cc52459;p=chise%2Fisd.git diff --git a/isd-turtle.el b/isd-turtle.el index c3df592..4d345e6 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 @@ -293,7 +293,7 @@ (setq prefix "")) (let ((indent (make-string (* level 4) ?\ )) char - idc + idc idc-str p1 p2 p3 c1 c2 c3 ret) @@ -345,11 +345,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 @@ -361,7 +387,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) @@ -375,7 +401,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" @@ -386,7 +412,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