From 6a09d131e57dd7b31d521749d0572e6a8012ccd3 Mon Sep 17 00:00:00 2001 From: MORIOKA Tomohiko Date: Sat, 21 Sep 2013 20:46:58 +0900 Subject: [PATCH] (concord-kanbun-corpus-insert-morpheme): Support comment. --- concord-kanbun-dump.el | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) 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 -- 1.7.10.4