Skip to content

Commit

Permalink
Merge branch 'release/v0.1.12' into release/v0.1.12-rc.1
Browse files Browse the repository at this point in the history
  • Loading branch information
YuukiToriyama authored Aug 30, 2024
2 parents 2c1ce4a + 83f4e63 commit 240dd98
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ members = [
resolver = "2"

[workspace.package]
version = "0.1.12-rc.1"
version = "0.1.12"
edition = "2021"
description = "A Rust Library to parse japanese addresses."
repository = "https://github.com/YuukiToriyama/japanese-address-parser"
Expand Down
4 changes: 4 additions & 0 deletions core/src/parser/adapter/orthographical_variant_adapter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ pub trait OrthographicalVariants {
const: Variant;
const: Variant;
const: Variant;
const: Variant;
const: Variant;
const: Variant;
}

impl OrthographicalVariants for Variant {
Expand All @@ -53,7 +55,9 @@ impl OrthographicalVariants for Variant {
const: Variant = &["梼", "檮"];
const: Variant = &["葛󠄀", "葛"];
const: Variant = &["蛍", "螢"];
const: Variant = &["與", "与"];
const: Variant = &["瀧", "滝"];
const: Variant = &["濱", "浜"];
}

pub struct OrthographicalVariantAdapter {
Expand Down
2 changes: 2 additions & 0 deletions core/src/tokenizer/read_town.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,9 @@ fn find_town(input: &str, candidates: &Vec<String>) -> Option<(String, String)>
Variant::穂,
Variant::梼,
Variant::蛍,
Variant::與,
Variant::瀧,
Variant::濱,
],
};
if let Some(result) = adapter.apply(input, candidate) {
Expand Down
6 changes: 6 additions & 0 deletions tests/test_data/異字体旧字体への対応.csv
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,12 @@ address,prefecture,city,town,rest
# 「螢池」と「蛍池」の表記ゆれへの対応
大阪府豊中市螢池東町一丁目5番1号,大阪府,豊中市,螢池東町一丁目,5番1号
大阪府豊中市蛍池東町一丁目5番1号,大阪府,豊中市,螢池東町一丁目,5番1号
# 「伊與喜」と「伊与喜」の表記ゆれへの対応
高知県幡多郡黒潮町伊与喜699-1,高知県,幡多郡黒潮町,伊與喜,699-1
高知県幡多郡黒潮町伊與喜699-1,高知県,幡多郡黒潮町,伊與喜,699-1
# 「瀧本」と「滝本」の表記ゆれへの対応
和歌山県新宮市熊野川町滝本417-1,和歌山県,新宮市,熊野川町瀧本,417-1
和歌山県新宮市熊野川町瀧本417-1,和歌山県,新宮市,熊野川町瀧本,417-1
# 「濱ノ瀬」と「浜ノ瀬」の表記ゆれへの対応
和歌山県日高郡美浜町大字濱ノ瀬356番3,和歌山県,日高郡美浜町,大字濱ノ瀬,356番3
和歌山県日高郡美浜町大字浜ノ瀬356番3,和歌山県,日高郡美浜町,大字濱ノ瀬,356番3

0 comments on commit 240dd98

Please sign in to comment.