From 86fdf9edbb5d894179a8484c8caa1eedbcf510ef Mon Sep 17 00:00:00 2001 From: jiro4989 Date: Mon, 27 Jun 2022 00:56:25 +0900 Subject: [PATCH] =?UTF-8?q?:sparkles:=20=E4=BA=8C=E4=BA=BA=E7=A7=B0?= =?UTF-8?q?=E3=81=AE=E5=A4=89=E6=8F=9B=E3=83=AB=E3=83=BC=E3=83=AB=E3=82=92?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0=E3=81=84=E3=81=9F=E3=81=97=E3=81=BE=E3=81=97?= =?UTF-8?q?=E3=81=9F=E3=82=8F=E2=9D=97=20(close=20#51)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- convert_rule.go | 9 +++++++++ ojosama_test.go | 6 +++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/convert_rule.go b/convert_rule.go index 0363779..d6a2ef7 100644 --- a/convert_rule.go +++ b/convert_rule.go @@ -311,6 +311,15 @@ var ( // 二人称 newRulePronounGeneral("あなた", "貴方"), + newRulePronounGeneral("あんた", "貴方"), + newRulePronounGeneral("おまえ", "貴方"), + newRulePronounGeneral("お前", "貴方"), + newRulePronounGeneral("てめぇ", "貴方"), + newRulePronounGeneral("てめえ", "貴方"), + newRuleNounsGeneral("貴様", "貴方").disablePrefix(true), + // newRulePronounGeneral("きさま", "貴方"), + // newRulePronounGeneral("そなた", "貴方"), + newRulePronounGeneral("君", "貴方"), // 三人称 // TODO: AfterIgnore系も簡単に定義できるようにしたい diff --git a/ojosama_test.go b/ojosama_test.go index cec429e..9d32469 100644 --- a/ojosama_test.go +++ b/ojosama_test.go @@ -37,9 +37,9 @@ func TestConvert(t *testing.T) { wantErr: false, }, { - desc: "正常系: あなたは貴方に変換いたしますわ", - src: "あなた", - want: "貴方", + desc: "正常系: 二人称はすべて「貴方」に変換いたしますわ", + src: "あなたは。あんたは。おまえは。お前は。てめぇは。てめえは。貴様は。君は。", + want: "貴方は。貴方は。貴方は。貴方は。貴方は。貴方は。貴方は。貴方は。", opt: nil, wantErr: false, },