mirror of
https://github.com/mii443/mozc.git
synced 2025-08-22 16:15:46 +00:00
Remove redundant entries.
* Examples + 大分県中津市中津市の次に番地がくる場合 → 大分県中津市 + 沖縄県島尻郡渡名喜村渡名喜村一円 → 沖縄県島尻郡渡名喜村 #typingquality PiperOrigin-RevId: 541516707
This commit is contained in:
@ -124,7 +124,14 @@ def ReadJigyosyoEntry(zip_code, level1, level2, level3, name):
|
|||||||
|
|
||||||
def ParseTownName(level3):
|
def ParseTownName(level3):
|
||||||
"""Parse town name."""
|
"""Parse town name."""
|
||||||
if level3.find(u'以下に掲載がない場合') != -1:
|
# Skip some exceptional cases
|
||||||
|
# 871-0099 中津市の次に番地がくる場合 (大分県中津市)
|
||||||
|
# 409-0142 小菅村の次に1~663番地がくる場合 (山梨県北都留郡小菅村)
|
||||||
|
# 409-0211 小菅村の次に664番地以降がくる場合 (山梨県北都留郡小菅村)
|
||||||
|
# 901-3601 渡名喜村一円 (沖縄県島尻郡渡名喜村)
|
||||||
|
if (level3.find(u'以下に掲載がない場合') != -1 or
|
||||||
|
level3.endswith(u'がくる場合') or
|
||||||
|
level3.endswith(u'村一円')):
|
||||||
return ['']
|
return ['']
|
||||||
|
|
||||||
assert CanParseAddress(level3), ('failed to be merged %s'
|
assert CanParseAddress(level3), ('failed to be merged %s'
|
||||||
|
Reference in New Issue
Block a user