From e41d900938408bb263b7a0e529577c111b05e466 Mon Sep 17 00:00:00 2001 From: Nanashi Date: Mon, 20 Nov 2023 19:24:16 +0900 Subject: [PATCH] =?UTF-8?q?Fix:=20UserDict.to=5Fmecab=5Fformat=E3=81=8C2?= =?UTF-8?q?=E9=87=8D=E3=81=AB=E6=94=B9=E8=A1=8C=E3=81=97=E3=81=A6=E3=81=84?= =?UTF-8?q?=E3=81=9F=E3=81=AE=E3=82=92=E4=BF=AE=E6=AD=A3=20(#684)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/voicevox_core/src/user_dict/word.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/voicevox_core/src/user_dict/word.rs b/crates/voicevox_core/src/user_dict/word.rs index 8a4f46d82..f1e4eef1a 100644 --- a/crates/voicevox_core/src/user_dict/word.rs +++ b/crates/voicevox_core/src/user_dict/word.rs @@ -222,7 +222,7 @@ impl UserDictWord { pub fn to_mecab_format(&self) -> String { let pos = PART_OF_SPEECH_DETAIL.get(&self.word_type).unwrap(); format!( - "{},{},{},{},{},{},{},{},{},{},{},{},{},{}/{},{}\n", + "{},{},{},{},{},{},{},{},{},{},{},{},{},{}/{},{}", self.surface, pos.context_id, pos.context_id, @@ -270,7 +270,7 @@ mod tests { .unwrap(); assert_eq!( word.to_mecab_format(), - "単語,1348,1348,8609,名詞,固有名詞,一般,*,*,*,*,ヨミ,ヨミ,0/2,*\n" + "単語,1348,1348,8609,名詞,固有名詞,一般,*,*,*,*,ヨミ,ヨミ,0/2,*" ); }