From: MORIOKA Tomohiko Date: Fri, 31 Oct 2014 12:51:10 +0000 (+0900) Subject: (concord-kanbun-allocated-morpheme-id-max): New variable. X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0e92001b0a7faeba19b775c2486896958d3f28cd;p=chise%2Fconcord-kanbun.git (concord-kanbun-allocated-morpheme-id-max): New variable. (concord-kanbun-add-morpheme): Add `=number' to morpheme objects. --- diff --git a/concord-kanbun-dic.el b/concord-kanbun-dic.el index 91e2172..f2fe8de 100644 --- a/concord-kanbun-dic.el +++ b/concord-kanbun-dic.el @@ -4,6 +4,8 @@ (concord-assign-genre 'sentence@zh-classical "/usr/local/var/kanbun/db") (mount-char-attribute-table '*instance@morpheme-entry/zh-classical) +(defvar concord-kanbun-allocated-morpheme-id-max 0) + (defun concord-kanbun-word-class-canonical-p (word-class) (memq 'mkwcs (concord-object-get word-class 'sources))) @@ -137,8 +139,13 @@ (unless (setq mjc-cobj (concord-decode-object '=name mjc-name 'morpheme@zh-classical)) (setq mjc-id (intern (concord-kanbun-encode-name-as-id mjc-name))) + (setq concord-kanbun-allocated-morpheme-id-max + (1+ concord-kanbun-allocated-morpheme-id-max)) + ;; (setq mjc-id concord-kanbun-allocated-morpheme-id-max) (setq mjc-cobj (concord-make-object 'morpheme@zh-classical mjc-id)) (concord-object-put mjc-cobj '=name mjc-name) + (concord-object-put mjc-cobj + '=number concord-kanbun-allocated-morpheme-id-max) (setq entry-cobj (concord-kanbun-add-morpheme-entry entry)) (setq wc-cobj (concord-kanbun-add-word-class word-superclass word-class