Skip to content

Commit

Permalink
Merge pull request #539 from YuukiToriyama/feature/notation-distortio…
Browse files Browse the repository at this point in the history
…n/tenwa

「鷏和」の表記ゆれに対応
  • Loading branch information
YuukiToriyama authored Nov 16, 2024
2 parents 87aff2f + 493fe89 commit fe0fa53
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/src/adapter/orthographical_variant_adapter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ pub enum OrthographicalVariant {
,
,
,
,
}

impl OrthographicalVariant {
Expand Down Expand Up @@ -65,6 +66,7 @@ impl OrthographicalVariant {
OrthographicalVariant::曾 => &['曾', '曽'],
OrthographicalVariant::國 => &['國', '国'],
OrthographicalVariant::鉋 => &['鉋', '飽'],
OrthographicalVariant::鷆 => &['鷆', '鷏'],
}
}

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 @@ -92,6 +92,7 @@ fn find_town(input: &str, candidates: &Vec<String>) -> Option<(String, String)>
OrthographicalVariant::,
OrthographicalVariant::,
OrthographicalVariant::,
OrthographicalVariant::,
],
};
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 @@ -87,3 +87,6 @@ address,prefecture,city,town,rest
# 「神代國衙」と「神代国衙」の表記揺れへの対応
兵庫県南あわじ市神代國衙1680,兵庫県,南あわじ市,神代國衙,1680
兵庫県南あわじ市神代国衙1680,兵庫県,南あわじ市,神代國衙,1680
# 「鷏和」と「鷆和」の表記揺れへの対応
兵庫県赤穂市鷏和422,兵庫県,赤穂市,鷏和,422
兵庫県赤穂市鷆和422,兵庫県,赤穂市,鷏和,422

0 comments on commit fe0fa53

Please sign in to comment.