Skip to content

Commit

Permalink
Merge pull request #289 from YuukiToriyama/feature/town-name-spell-va…
Browse files Browse the repository at this point in the history
…riants-in-kyoto/master

京都府の町名の表記ゆれ対応をrelease/v0.1.2にマージ
  • Loading branch information
YuukiToriyama authored Jun 8, 2024
2 parents 2fc98d4 + 1df525b commit 3b19e1c
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
8 changes: 8 additions & 0 deletions core/src/parser/adapter/orthographical_variant_adapter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ pub trait OrthographicalVariants {
const: Variant;
const: Variant;
const: Variant;
const: Variant;
const: Variant;
const: Variant;
const: Variant;
const: Variant;
}

Expand All @@ -34,6 +38,10 @@ impl OrthographicalVariants for Variant {
const: Variant = &["舘", "館"];
const: Variant = &["脊", "背"];
const: Variant = &["渕", "淵"];
const: Variant = &["己", "巳"];
const: Variant = &["槇", "槙"];
const: Variant = &["治", "冶"];
const: Variant = &["佛", "仏"];
const: Variant = &["澤", "沢"];
}

Expand Down
4 changes: 4 additions & 0 deletions core/src/parser/read_town.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ fn find_town(input: &String, city: &City) -> Option<(String, String)> {
Variant::舘,
Variant::脊,
Variant::渕,
Variant::己,
Variant::槇,
Variant::治,
Variant::佛,
Variant::澤,
],
};
Expand Down
14 changes: 13 additions & 1 deletion tests/test_data/異字体旧字体への対応.csv
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,18 @@ address,prefecture,city,town,rest
# 「三渕沢」と「三淵沢」の表記ゆれへの対応
新潟県魚沼市三渕沢879,新潟県,魚沼市,三渕沢,879
新潟県魚沼市三淵沢879,新潟県,魚沼市,三渕沢,879
# 「辰巳」と「辰己」の表記ゆれへの対応
京都府京都市伏見区醍醐辰己町4-1,京都府,京都市伏見区,醍醐辰己町,4-1
京都府京都市伏見区醍醐辰巳町4-1,京都府,京都市伏見区,醍醐辰己町,4-1
# 「槇島町」と「槙島町」の表記ゆれへの対応
京都府宇治市槇島町千足80,京都府,宇治市,槇島町,千足80
京都府宇治市槙島町千足80,京都府,宇治市,槇島町,千足80
# 「鍛治屋町」と「鍛冶屋町」の表記ゆれへの対応
京都府綾部市鍛治屋町岡ノ段26,京都府,綾部市,鍛治屋町,岡ノ段26
京都府綾部市鍛冶屋町岡ノ段26,京都府,綾部市,鍛治屋町,岡ノ段26
# 「佛性寺」と「仏性寺」の表記ゆれへの対応
京都府福知山市大江町佛性寺909,京都府,福知山市,大江町佛性寺,909
京都府福知山市大江町仏性寺909,京都府,福知山市,大江町佛性寺,909
# 「棚沢」と「棚澤」の表記ゆれへの対応
東京都西多摩郡奥多摩町棚澤446,東京都,西多摩郡奥多摩町,棚澤,446
東京都西多摩郡奥多摩町棚沢446,東京都,西多摩郡奥多摩町,棚澤,446
東京都西多摩郡奥多摩町棚沢446,東京都,西多摩郡奥多摩町,棚澤,446

0 comments on commit 3b19e1c

Please sign in to comment.