From 0e92001b0a7faeba19b775c2486896958d3f28cd Mon Sep 17 00:00:00 2001 From: MORIOKA Tomohiko Date: Fri, 31 Oct 2014 21:51:10 +0900 Subject: [PATCH] (concord-kanbun-allocated-morpheme-id-max): New variable. (concord-kanbun-add-morpheme): Add `=number' to morpheme objects. --- concord-kanbun-dic.el | 7 +++++++ 1 file changed, 7 insertions(+) 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 -- 1.7.10.4