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

番地の前までの住所が漢数字で終わっているケースに対応 #145

Closed
wants to merge 3 commits into from

Conversation

kamataryo
Copy link
Contributor

No description provided.

keichan34
keichan34 previously approved these changes Jan 21, 2022
Copy link
Member

@keichan34 keichan34 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

なるほど。
エッジケースはもうちょっとあるような気がしますが(例えば 一二三123三二一 とか?笑)これで大丈夫ですかね。。もうちょっとテストがほしいかも

@kamataryo
Copy link
Contributor Author

そうですね。もうちょっと足してみます 👍

@kamataryo
Copy link
Contributor Author

ちょっと試してみたのですが、カバー範囲を広げようとすると番地号の正規表現の箇所全部の修正が必要でかなり複雑になりそうです。
一方で、別途 Geolonia 内部で集めた数千万件の住所データの中でNJAが失敗するケースは 広島県府中市栗柄町名字八五十 だけだとわかりましたので、エラーハンドリングして番地の正規化を行わない、という修正でもいいのかなと思いました。

その場合の話ですが、正規化レベル3だけど番地の正規化が失敗している状態で、レベルに該当の情報を含めることができない状態です。normalization_detail のようなプロパティを追加して番地が正規化されていない情報を戻り値に追加するのがいいと思いましたが、どう思われますか? @keichan34

@keichan34
Copy link
Member

なるほど。
各レベルでtry/catchでラップして、もし例外が起こったらそこで処理を止めて、normalization levelをそのまま返すのはどう思います?

@kamataryo
Copy link
Contributor Author

kamataryo commented Jan 21, 2022

各レベルの処理は切り分けてリファクタリングしたいですね。
ただ、単に処理を止めるだけだとレベル3に「番地号の正規化ができた」と「番地号の正規化ができなかった」が混在する状態になってしまうのかなと。できれば レベルを1つずらして、

  • 正規化レベル4: 番地まで正規化できた

を追加するのがいいのかもですが、全てのレベル3が4にずれてしまって変更が大きすぎるのでできないですね。

@kamataryo
Copy link
Contributor Author

イシューだけ残して #144 ペンディングにします。

@kamataryo kamataryo closed this Jan 24, 2022
@kamataryo kamataryo deleted the 144-crash-with-kanji-number branch January 25, 2022 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants