Skip to content

Commit

Permalink
Fix: UserDict.to_mecab_formatが2重に改行していたのを修正 (#684)
Browse files Browse the repository at this point in the history
  • Loading branch information
sevenc-nanashi authored Nov 20, 2023
1 parent ae4a45d commit e41d900
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/voicevox_core/src/user_dict/word.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -270,7 +270,7 @@ mod tests {
.unwrap();
assert_eq!(
word.to_mecab_format(),
"単語,1348,1348,8609,名詞,固有名詞,一般,*,*,*,*,ヨミ,ヨミ,0/2,*\n"
"単語,1348,1348,8609,名詞,固有名詞,一般,*,*,*,*,ヨミ,ヨミ,0/2,*"
);
}

Expand Down

0 comments on commit e41d900

Please sign in to comment.