Skip to content

Commit

Permalink
✨ 二人称の変換ルールを追加いたしましたわ❗ (close #51)
Browse files Browse the repository at this point in the history
  • Loading branch information
jiro4989 committed Jun 26, 2022
1 parent cd70768 commit 86fdf9e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
9 changes: 9 additions & 0 deletions convert_rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,15 @@ var (

// 二人称
newRulePronounGeneral("あなた", "貴方"),
newRulePronounGeneral("あんた", "貴方"),
newRulePronounGeneral("おまえ", "貴方"),
newRulePronounGeneral("お前", "貴方"),
newRulePronounGeneral("てめぇ", "貴方"),
newRulePronounGeneral("てめえ", "貴方"),
newRuleNounsGeneral("貴様", "貴方").disablePrefix(true),
// newRulePronounGeneral("きさま", "貴方"),
// newRulePronounGeneral("そなた", "貴方"),
newRulePronounGeneral("君", "貴方"),

// 三人称
// TODO: AfterIgnore系も簡単に定義できるようにしたい
Expand Down
6 changes: 3 additions & 3 deletions ojosama_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ func TestConvert(t *testing.T) {
wantErr: false,
},
{
desc: "正常系: あなたは貴方に変換いたしますわ",
src: "あなた",
want: "貴方",
desc: "正常系: 二人称はすべて「貴方」に変換いたしますわ",
src: "あなたは。あんたは。おまえは。お前は。てめぇは。てめえは。貴様は。君は。",
want: "貴方は。貴方は。貴方は。貴方は。貴方は。貴方は。貴方は。貴方は。",
opt: nil,
wantErr: false,
},
Expand Down

0 comments on commit 86fdf9e

Please sign in to comment.