mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
Handling windows cleaning edge case
This commit is contained in:
parent
e0f0042086
commit
a27d664a2f
1 changed files with 7 additions and 1 deletions
|
|
@ -33,12 +33,18 @@ class WindowAttributes(Definitions):
|
|||
"gwydrau lluosog ym mhobman": "multiple glazing throughout",
|
||||
}
|
||||
|
||||
# These are observed data anomalies that we want to ignore
|
||||
NO_DATA_CASES = [
|
||||
"SAP05:Windows",
|
||||
"Solid, no insulation (assumed)", # A description typically associated with floors, not windows
|
||||
]
|
||||
|
||||
def __init__(self, description: str):
|
||||
self.description: str = clean_description(description.lower())
|
||||
|
||||
# In the case of an empty description, we want to return a dictionary with all values set to False
|
||||
# and indicate there was no data
|
||||
self.nodata = not description or description in self.DATA_ANOMALY_MATCHES or description == "SAP05:Windows"
|
||||
self.nodata = not description or description in self.DATA_ANOMALY_MATCHES or description in self.NO_DATA_CASES
|
||||
|
||||
translation = self.WELSH_TEXT.get(self.description)
|
||||
if translation:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue