diff -u -r1.140 -r1.142 --- ChangeLog 30 Jul 2003 16:06:57 -0000 1.140 +++ ChangeLog 3 Aug 2003 16:25:46 -0000 1.142 @@ -1,3 +1,13 @@ +2003-08-04 TAKAOKA Kazuma + + * lib/print.c (cha_printf_mrph): Fix bug with stem-less readings + and pronunciations. + +2003-08-03 TAKAOKA Kazuma + + * lib/print.c (print_mrph): Fix bug with the last morpheme of a + compound word. + 2003-07-31 TAKAOKA Kazuma * Use Darts version 0.2. diff -u -r1.48 -r1.50 --- lib/print.c 28 Jul 2003 06:35:22 -0000 1.48 +++ lib/print.c 3 Aug 2003 16:25:46 -0000 1.50 @@ -27,7 +27,7 @@ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: print.c,v 1.48 2003/07/28 06:35:22 kazuma-t Exp $ + * $Id: print.c,v 1.50 2003/08/03 16:25:46 kazuma-t Exp $ */ #include @@ -725,7 +725,8 @@ case 'y': /* Japanese Reading (surface form) */ case 'Y': /* Japanese Reading (base form) */ case 'r': - if (mrph->stem_len < 0 || mrph->reading[0]) { + if (mrph->inf_type || + mrph->stem_len < 0 || mrph->reading[0]) { if (s[0] != 'r' && s[1] != '0') extract_yomi1(word_str, mrph->reading); else @@ -767,7 +768,8 @@ break; case 'a': /* Japanese pronunciation (surface form) */ case 'A': /* Japanese pronunciation (base form) */ - if (mrph->stem_len < 0 || mrph->pron[0]) { + if (mrph->inf_type || + mrph->stem_len < 0 || mrph->pron[0]) { if (s[1] != '0') extract_yomi1(word_str, mrph->pron); else @@ -1038,8 +1040,10 @@ has_next = get_compound(&data, headword, mrph->darts, index); if (!has_next) { data.inf_form = mrph->inf_form; - data.headword_len += - strlen(Cha_form[mrph->inf_type][mrph->inf_form].gobi); + if (mrph->inf_form) { + data.headword_len += + strlen(Cha_form[mrph->inf_type][mrph->inf_form].gobi); + } data.con_tbl = mrph->con_tbl; } cha_printf_mrph(path_num, &data, format); diff -u -r1.3 -r1.4 --- tests/test.vch 18 Jul 2003 15:15:57 -0000 1.3 +++ tests/test.vch 3 Aug 2003 16:25:46 -0000 1.4 @@ -1,20 +1,20 @@ * 0 0 0 0 BOS/EOS NIL 0 0 0 0 * 1 0 6 100 うにゃ ウニャ ウニャ うにゃ うにゃ詞 NIL 0 0 ID=1 100 0 0 * 5 6 10 300 うが ウガ ウガ うが うが詞 NIL ほえほえ が形 ID=3 100 1 100 - 6 6 10 300 うが うガ うガ うが うが詞 NIL ほえほえ が形 ID=8 100 1 100 + 6 6 10 300 うが ガ ガ うが うが詞 NIL ほえほえ が形 ID=8 100 1 100 * 9 10 10 300 BOS/EOS NIL 0 0 0 0 5,6 0,0 EOS * 0 0 0 0 BOS/EOS NIL 0 0 0 0 1 0 6 400 うにょ ウニョ ウニョ うにょ うにゃ詞 NIL 0 0 ID=2 400 0 0 * 2 0 6 120 うにょ ウニョ ウニョ うが うが詞 NIL ほげ にょ形 ID=7 120 0 0 * 6 6 10 520 うう ウウ ウー うが うが詞 NIL ほえほえ う形 ID=3 100 1,2 100,300 - 7 6 10 520 うう うウ うー うが うが詞 NIL ほえほえ う形 ID=8 100 1,2 100,300 + 7 6 10 520 うう ウ ー うが うが詞 NIL ほえほえ う形 ID=8 100 1,2 100,300 * 12 10 16 720 うにゃ ウニャ ウニャ うにゃ うにゃ詞 NIL 0 0 ID=1 100 6,7 100,100 * 16 16 16 720 BOS/EOS NIL 0 0 0 0 12 0 EOS * 0 0 0 0 BOS/EOS NIL 0 0 0 0 * 1 0 4 100 うご ウゴ ウゴ うが うが詞 NIL ほえほえ ご形 ID=3 100 0 0 - 2 0 4 100 うご うゴ うゴ うが うが詞 NIL ほえほえ ご形 ID=8 100 0 0 + 2 0 4 100 うご ゴ ゴ うが うが詞 NIL ほえほえ ご形 ID=8 100 0 0 * 7 4 6 3200 う 未知語 未知語 未知語 NIL 0 0 0 3000 1,2 100,100 * 8 6 12 3600 うにゃ ウニャ ウニャ うにゃ うにゃ詞 NIL 0 0 ID=1 100 7 300 * 12 12 12 3600 BOS/EOS NIL 0 0 0 0 8 0