diff --git a/backend/condition/parsing/records/peabody/peabody_asset_condition.py b/backend/condition/parsing/records/peabody/peabody_asset_condition.py index 5451d570..71fa1e9d 100644 --- a/backend/condition/parsing/records/peabody/peabody_asset_condition.py +++ b/backend/condition/parsing/records/peabody/peabody_asset_condition.py @@ -1,3 +1,5 @@ +import re + from dataclasses import dataclass from datetime import datetime from typing import Optional @@ -23,4 +25,15 @@ class PeabodyAssetCondition: @property def is_block_level(self) -> bool: - raise NotImplementedError \ No newline at end of file + if not self.full_address: + return False + + address = self.full_address.upper() + + block_level_patterns = [ + r"\bBLOCK\b", # "BLOCK MILNE HOUSE" + r"\bFLATS\b", # "FLATS A-D ..." + r"\b\d+[A-Z]?-\d+[A-Z]?\b", # "1-80", "9A-9H" + ] + + return any(re.search(pattern, address) for pattern in block_level_patterns) \ No newline at end of file