Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

木月祇園町の表記ゆれをrelease/v0.1.15にマージ #423

Merged
merged 3 commits into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions core/src/parser/adapter/orthographical_variant_adapter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ pub trait OrthographicalVariants {
const 與: Variant;
const 瀧: Variant;
const 濱: Variant;
const 祗: Variant;
}

impl OrthographicalVariants for Variant {
Expand Down Expand Up @@ -56,6 +57,7 @@ impl OrthographicalVariants for Variant {
const 與: Variant = &["與", "与"];
const 瀧: Variant = &["瀧", "滝"];
const 濱: Variant = &["濱", "浜"];
const 祗: Variant = &["祗", "祇"];
}

pub struct OrthographicalVariantAdapter {
Expand Down
1 change: 1 addition & 0 deletions core/src/tokenizer/read_town.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ fn find_town(input: &str, candidates: &Vec<String>) -> Option<(String, String)>
Variant::與,
Variant::瀧,
Variant::濱,
Variant::祗,
],
};
if let Some(result) = adapter.apply(input, candidate) {
Expand Down
3 changes: 3 additions & 0 deletions tests/test_data/異字体旧字体への対応.csv
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ address,prefecture,city,town,rest
# 「濱ノ瀬」と「浜ノ瀬」の表記ゆれへの対応
和歌山県日高郡美浜町大字濱ノ瀬356番3,和歌山県,日高郡美浜町,大字濱ノ瀬,356番3
和歌山県日高郡美浜町大字浜ノ瀬356番3,和歌山県,日高郡美浜町,大字濱ノ瀬,356番3
# 「木月祗園町」と「木月祇園町」の表記ゆれへの対応
神奈川県川崎市中原区木月祗園町17-1,神奈川県,川崎市中原区,木月祗園町,17-1
神奈川県川崎市中原区木月祇園町17-1,神奈川県,川崎市中原区,木月祗園町,17-1
# 「竃」と「竈」の表記ゆれへの対応
静岡県御殿場市竈1032,静岡県,御殿場市,竈,1032
静岡県御殿場市竃1032,静岡県,御殿場市,竈,1032
Loading