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

Modification of the postal code dictionary script. #1063

Merged
merged 2 commits into from
Sep 24, 2024
Merged
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
12 changes: 7 additions & 5 deletions src/dictionary/gen_zip_code_seed.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,14 @@ def ReadJigyosyoEntry(zip_code, level1, level2, level3, name):
def ParseTownName(level3):
"""Parse town name."""
# Skip some exceptional cases
# 871-0099 中津市の次に番地がくる場合 (大分県中津市)
# 409-0142 小菅村の次に1~663番地がくる場合 (山梨県北都留郡小菅村)
# 409-0211 小菅村の次に664番地以降がくる場合 (山梨県北都留郡小菅村)
# 901-3601 渡名喜村一円 (沖縄県島尻郡渡名喜村)
# 中津市の次に番地がくる場合 : 871-0099 大分県中津市
# 小菅村の次に1~663番地がくる場合 : 409-0142 山梨県北都留郡小菅村
# 小菅村の次に664番地以降がくる場合 : 409-0211 山梨県北都留郡小菅村
# 渡名喜村一円 : 901-3601 沖縄県島尻郡渡名喜村
# 琴平町の次に427番地以降がくる場合(川西) : 766-0001 香川県仲多度郡琴平町
# 琴平町の次に1~426番地がくる場合(川東) : 766-0002 香川県仲多度郡琴平町
if (level3.find(u'以下に掲載がない場合') != -1 or
level3.endswith(u'がくる場合') or
level3.find(u'がくる場合') != -1 or
level3.endswith(u'村一円')):
return ['']

Expand Down