From 493fe895a505f827671d105ebb574e8a6348bcfa Mon Sep 17 00:00:00 2001 From: Yuuki Toriyama Date: Sat, 16 Nov 2024 17:56:57 +0900 Subject: [PATCH] =?UTF-8?q?update:=20#451:=20=E3=80=8C=E9=B7=8F=E5=92=8C?= =?UTF-8?q?=E3=80=8D=E3=81=A8=E3=80=8C=E9=B7=86=E5=92=8C=E3=80=8D=E3=81=AE?= =?UTF-8?q?=E8=A1=A8=E8=A8=98=E3=82=86=E3=82=8C=E3=81=AB=E5=AF=BE=E5=BF=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/src/adapter/orthographical_variant_adapter.rs | 2 ++ core/src/tokenizer/read_town.rs | 1 + ...75\223\343\201\270\343\201\256\345\257\276\345\277\234.csv" | 3 +++ 3 files changed, 6 insertions(+) diff --git a/core/src/adapter/orthographical_variant_adapter.rs b/core/src/adapter/orthographical_variant_adapter.rs index 2dbef93..1e51c4d 100644 --- a/core/src/adapter/orthographical_variant_adapter.rs +++ b/core/src/adapter/orthographical_variant_adapter.rs @@ -30,6 +30,7 @@ pub enum OrthographicalVariant { 曾, 國, 鉋, + 鷆, } impl OrthographicalVariant { @@ -65,6 +66,7 @@ impl OrthographicalVariant { OrthographicalVariant::曾 => &['曾', '曽'], OrthographicalVariant::國 => &['國', '国'], OrthographicalVariant::鉋 => &['鉋', '飽'], + OrthographicalVariant::鷆 => &['鷆', '鷏'], } } diff --git a/core/src/tokenizer/read_town.rs b/core/src/tokenizer/read_town.rs index 564e273..a10d4c7 100644 --- a/core/src/tokenizer/read_town.rs +++ b/core/src/tokenizer/read_town.rs @@ -92,6 +92,7 @@ fn find_town(input: &str, candidates: &Vec) -> Option<(String, String)> OrthographicalVariant::曾, OrthographicalVariant::國, OrthographicalVariant::鉋, + OrthographicalVariant::鷆, ], }; if let Some(result) = adapter.apply(input, candidate) { diff --git "a/tests/test_data/\347\225\260\345\255\227\344\275\223\346\227\247\345\255\227\344\275\223\343\201\270\343\201\256\345\257\276\345\277\234.csv" "b/tests/test_data/\347\225\260\345\255\227\344\275\223\346\227\247\345\255\227\344\275\223\343\201\270\343\201\256\345\257\276\345\277\234.csv" index de962e2..e4d86a7 100644 --- "a/tests/test_data/\347\225\260\345\255\227\344\275\223\346\227\247\345\255\227\344\275\223\343\201\270\343\201\256\345\257\276\345\277\234.csv" +++ "b/tests/test_data/\347\225\260\345\255\227\344\275\223\346\227\247\345\255\227\344\275\223\343\201\270\343\201\256\345\257\276\345\277\234.csv" @@ -87,3 +87,6 @@ address,prefecture,city,town,rest # 「神代國衙」と「神代国衙」の表記揺れへの対応 兵庫県南あわじ市神代國衙1680,兵庫県,南あわじ市,神代國衙,1680 兵庫県南あわじ市神代国衙1680,兵庫県,南あわじ市,神代國衙,1680 +# 「鷏和」と「鷆和」の表記揺れへの対応 +兵庫県赤穂市鷏和422,兵庫県,赤穂市,鷏和,422 +兵庫県赤穂市鷆和422,兵庫県,赤穂市,鷏和,422