(concord-assign-genre 'sentence@zh-classical "/usr/local/var/kanbun/db")
(mount-char-attribute-table '*instance@morpheme-entry/zh-classical)
+(defun concord-kanbun-word-class-canonical-p (word-class)
+ (memq 'mkwcs (concord-object-get word-class 'sources)))
+
(defun concord-kanbun-encode-name-as-id (name)
(let (ucs ret)
(mapconcat (lambda (c)
(apply #'concord-kanbun-add-word-class
(nreverse (cdr r-wcl)))))
(concord-object-put
- wc-cobj '<-subcategory (list parent-wc-cobj)))
+ wc-cobj '<-subcategory@misc (list parent-wc-cobj)))
)
wc-cobj))
comment)
(let* (entry-cobj
canonical-entry-cobj
- wc-cobj wc-name
+ wc-cobj wc-name wc-canonical-flag
mm-name
mj-name
mjc-name mjc-id mjc-cobj)
(setq mjc-id (intern (concord-kanbun-encode-name-as-id mjc-name)))
(setq mjc-cobj (concord-make-object 'morpheme@zh-classical mjc-id))
(concord-object-put mjc-cobj '=name mjc-name)
- (when (setq entry-cobj (concord-kanbun-add-morpheme-entry entry))
- (concord-object-put mjc-cobj '->entry@morpheme (list entry-cobj)))
+ (setq entry-cobj (concord-kanbun-add-morpheme-entry entry))
+ (setq wc-cobj (concord-kanbun-add-word-class
+ word-superclass word-class
+ word-subclass1 word-subclass2
+ word-subclass3))
+ (concord-object-put mjc-cobj '->word-class (list wc-cobj))
+ (setq wc-canonical-flag
+ (concord-kanbun-word-class-canonical-p wc-cobj))
+ (concord-object-put mjc-cobj
+ (if wc-canonical-flag
+ '->entry@morpheme
+ '->entry@morpheme/misc)
+ (list entry-cobj))
(unless (string= entry canonical-form)
(when (setq canonical-entry-cobj
(concord-kanbun-add-morpheme-entry canonical-form))
- (concord-object-put mjc-cobj '->entry@morpheme/canonical
+ (concord-object-put mjc-cobj
+ (if wc-canonical-flag
+ '->entry@morpheme/canonical
+ '->entry@morpheme/canonical/misc)
(list canonical-entry-cobj))))
- (when (setq wc-cobj (concord-kanbun-add-word-class
- word-superclass word-class
- word-subclass1 word-subclass2
- word-subclass3))
- (concord-object-put mjc-cobj '->word-class (list wc-cobj)))
(concord-object-put mjc-cobj 'ja-form ja-form)
(concord-object-put mjc-cobj 'ja-kana ja-kana)
(concord-object-put mjc-cobj 'ja-conjugation-type ja-conj-type))