X-Git-Url: http://git.chise.org/gitweb/?p=chise%2Fest.git;a=blobdiff_plain;f=est-eval.el;fp=est-eval.el;h=f4d693dc3232203638d829e1947d3de5cfe51095;hp=10ff991fd0f87b1934f8a5c6fad9e2f8aa8e35fe;hb=56afce8243db34dcb7e956b171f0d81949d40dfa;hpb=82eb64e1cddf64dc796eb03a8d3e52fde57c9f9d diff --git a/est-eval.el b/est-eval.el index 10ff991..f4d693d 100644 --- a/est-eval.el +++ b/est-eval.el @@ -388,6 +388,27 @@ (mapconcat #'char-to-string ret "")) (est-eval-value-as-object value)))) +(defun est-eval-value-as-object-with-description (value + object feature-name + &optional lang uri-object list-props) + (let (ret) + (cond + ((characterp value) + (setq ret (or (get-char-attribute value 'description) + (get-char-attribute value 'hdic-syp-description) + (get-char-attribute value 'hdic-ktb-description))) + ) + ((concord-object-p value) + (setq ret (concord-object-get value 'description)) + )) + (if ret + (list 'list nil + (est-eval-value-as-object value) + (est-eval-list ret + object feature-name + lang uri-object list-props)) + (est-eval-value-as-object value)))) + (defun est-eval-value-as-location (value) (let (ret) (if (and (concord-object-p value) @@ -605,6 +626,28 @@ (error (format "%s" value))) (format "%s" value))) +(defun est-eval-value-as-entry-character-list (value + object feature-name + &optional separator subtype + lang uri-object list-props) + (if (and (listp value) + (listp (cdr value))) + (condition-case nil + (let (props) + (if separator + (setq props (list :separator separator))) + (if subtype + (setq props (list* :subtype subtype props))) + (list* 'list props + (mapcar (lambda (cell) + (est-eval-value-as-object-with-description + cell + object feature-name + lang uri-object list-props)) + value))) + (error (format "%s" value))) + (format "%s" value))) + ;; (defun est-eval-value-as-ids (value) ;; (if (listp value) ;; (list 'ids nil (ideographic-structure-to-ids value)) @@ -1010,6 +1053,18 @@ (est-eval-value-as-object-list value nil 'unordered-list)) ((eq format 'unordered-composition-list) (est-eval-value-as-composition-list value nil 'unordered-list)) + ((eq format 'entry-character-list) + (est-eval-value-as-entry-character-list + value + object feature-name + nil nil + lang uri-object list-props)) + ((eq format 'unordered-entry-character-list) + (est-eval-value-as-entry-character-list + value + object feature-name + nil 'unordered-list + lang uri-object list-props)) ((eq format 'space-separated-ids) (est-eval-value-as-space-separated-ids value)) ((eq format 'space-separated-domain-list)