From: MORIOKA Tomohiko Date: Sat, 21 Sep 2013 11:46:58 +0000 (+0900) Subject: (concord-kanbun-corpus-insert-morpheme): Support comment. X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=6a09d131e57dd7b31d521749d0572e6a8012ccd3;p=chise%2Fconcord-kanbun.git (concord-kanbun-corpus-insert-morpheme): Support comment. --- diff --git a/concord-kanbun-dump.el b/concord-kanbun-dump.el index 5866807..2a808ef 100644 --- a/concord-kanbun-dump.el +++ b/concord-kanbun-dump.el @@ -5,7 +5,9 @@ morpheme '->entry@morpheme/canonical)) (ja-form (concord-object-get morpheme 'ja-form)) (ja-kana (concord-object-get morpheme 'ja-kana)) - (ja-conj-type (concord-object-get morpheme 'ja-conjugation-type))) + (ja-conj-type (concord-object-get morpheme 'ja-conjugation-type)) + (name (concord-object-get morpheme '=name)) + comment) (when entry (setq entry (concord-object-get (car entry) '=name))) (when word-class @@ -17,8 +19,11 @@ (if canonical-form (concord-object-get (car canonical-form) '=name) entry)) + (setq comment + (and name + (nth 1 (split-string name "\t;\\s ")))) (insert - (format "%s\t%s,%s,%s,%s,%s,*,%s,%s,%s,%s\n" + (format "%s\t%s,%s,%s,%s,%s,*,%s,%s,%s,%s%s\n" (or entry "*") (or (car word-class) "*") (or (nth 1 word-class) "*") @@ -26,7 +31,10 @@ (or (nth 3 word-class) "*") (or (nth 4 word-class) "*") (or canonical-form "*") - ja-form ja-kana ja-conj-type)))) + ja-form ja-kana ja-conj-type + (if comment + (format "\t; %s" comment) + ""))))) (defun concord-kanbun-dump-file (source dest-dir) (with-temp-buffer