Skip to content

Commit

Permalink
Merge pull request #431 from YuukiToriyama/feature/ozone
Browse files Browse the repository at this point in the history
小曾根の表記ゆれをrelease/v0.1.16にマージ
  • Loading branch information
YuukiToriyama authored Sep 25, 2024
2 parents f7f1297 + 63830c6 commit c0b1d5e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
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 @@ -30,6 +30,7 @@ pub trait OrthographicalVariants {
const: Variant;
const: Variant;
const: Variant;
const: Variant;
}

impl OrthographicalVariants for Variant {
Expand Down Expand Up @@ -60,6 +61,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 @@ -113,6 +113,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 @@ -81,3 +81,6 @@ address,prefecture,city,town,rest
# 「竃」と「竈」の表記ゆれへの対応
静岡県御殿場市竈1032,静岡県,御殿場市,竈,1032
静岡県御殿場市竃1032,静岡県,御殿場市,竈,1032
# 「小曾根」と「小曽根」の表記ゆれへの対応
埼玉県熊谷市小曽根1220,埼玉県,熊谷市,小曽根,1220
埼玉県熊谷市小曾根1220,埼玉県,熊谷市,小曽根,1220

0 comments on commit c0b1d5e

Please sign in to comment.