Answer stability round 1 and product-owner round 1: the Swedish address paragraph warns of a street under a neighbouring postort, the street row names the centre point, phone-exchange's rule gets its own sentence, and a level is a path prefix

This commit is contained in:
2026-10-07 01:55:08 +02:00
committed by Lillem4n
parent 0e65a202cd
commit b71d8a2ee5
5 changed files with 16 additions and 11 deletions
+2 -2
View File
@@ -136,8 +136,8 @@ class Nearest:
def street_delivery(name, codes):
"""The codes delivered to a street. Outside ONE_POSITION's cities, the digit after the postort's own prefix is 0 or 1
for boxes and 8 for reply mail; inside them, a second digit 0 marks boxes. The postort's own prefix is three digits
where one three-digit prefix starts at least half its codes, else two.
for boxes and 8 for reply mail, that prefix being three digits where one three-digit prefix starts at least half
the postort's codes, else two; inside them, a second digit 0 marks boxes.
Per docs/research/research-geo-se.md, Postal codes → Structure."""
if name in ONE_POSITION:
return [c for c in codes if c[1] != "0"]