(concord-kanbun-allocated-morpheme-id-max): New variable.
authorMORIOKA Tomohiko <tomo.git@chise.org>
Fri, 31 Oct 2014 12:51:10 +0000 (21:51 +0900)
committerMORIOKA Tomohiko <tomo.git@chise.org>
Fri, 31 Oct 2014 12:51:10 +0000 (21:51 +0900)
(concord-kanbun-add-morpheme): Add `=number' to morpheme objects.

concord-kanbun-dic.el

index 91e2172..f2fe8de 100644 (file)
@@ -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)))
 
       (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