From 09bc73c2fc04d155b0028dbe50ab97127183960f Mon Sep 17 00:00:00 2001 From: Yuuki Toriyama Date: Sat, 16 Nov 2024 18:45:38 +0900 Subject: [PATCH] =?UTF-8?q?update:=20#452:=20=E3=80=8C=E5=90=89=E5=86=A8?= =?UTF-8?q?=E3=80=8D=E3=81=A8=E3=80=8C=E5=90=89=E5=AF=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 cc73589..05aaf73 100644 --- a/core/src/adapter/orthographical_variant_adapter.rs +++ b/core/src/adapter/orthographical_variant_adapter.rs @@ -34,6 +34,7 @@ pub enum OrthographicalVariant { 斑, 櫻, 櫟, + 冨, } impl OrthographicalVariant { @@ -73,6 +74,7 @@ impl OrthographicalVariant { OrthographicalVariant::斑 => &['斑', '班'], OrthographicalVariant::櫻 => &['櫻', '桜'], OrthographicalVariant::櫟 => &['櫟', '擽'], + OrthographicalVariant::冨 => &['冨', '富'], } } diff --git a/core/src/tokenizer/read_town.rs b/core/src/tokenizer/read_town.rs index 4789b60..517bb36 100644 --- a/core/src/tokenizer/read_town.rs +++ b/core/src/tokenizer/read_town.rs @@ -96,6 +96,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 11f9e59..459577f 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" @@ -93,3 +93,6 @@ address,prefecture,city,town,rest # 「南桜」と「南櫻」の表記揺れへの対応 滋賀県野洲市南桜1792,滋賀県,野洲市,南櫻,1792 滋賀県野洲市南櫻1792,滋賀県,野洲市,南櫻,1792 +# 「富」と「冨」の表記ゆれへの対応 +兵庫県神崎郡神河町吉冨88番地10号,兵庫県,神崎郡神河町,吉冨,88番地10号 +兵庫県神崎郡神河町吉富88番地10号,兵庫県,神崎郡神河町,吉冨,88番地10号