mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
multiple translations
This commit is contained in:
parent
e7873d0993
commit
4d421af78b
12 changed files with 90 additions and 8 deletions
|
|
@ -32,9 +32,6 @@ def app():
|
|||
:return:
|
||||
"""
|
||||
|
||||
# Begin by setting up an empty cleaner
|
||||
cleaner = EpcClean([])
|
||||
|
||||
epc_directories = [entry for entry in EPC_DIRECTORY.iterdir() if entry.is_dir()]
|
||||
for directory in tqdm(epc_directories):
|
||||
data = pd.read_csv(directory / "certificates.csv", low_memory=False)
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ class FloorAttributes(Definitions):
|
|||
# Step 2: Generalized translation with placeholder
|
||||
if uvalue_match:
|
||||
uvalue = uvalue_match.group(1)
|
||||
self.description = f"average thermal transmittance {uvalue} W/m-¦K"
|
||||
self.description = f"average thermal transmittance {uvalue} w/m-¦K"
|
||||
|
||||
else:
|
||||
translation = self.WELSH_TEXT.get(self.description)
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ class HotWaterAttributes(Definitions):
|
|||
'heat pump', # A general category for heat pumps, regardless of the energy source
|
||||
'solid fuel boiler', # burns solid materials to generate heat for water heating and/or space heating
|
||||
'solid fuel range cooker',
|
||||
'room heaters', # Generic/unspecified category
|
||||
]
|
||||
|
||||
# SYSTEM_TYPES refer to the larger system within which the heater operates.
|
||||
|
|
|
|||
|
|
@ -31,6 +31,9 @@ class MainFuelAttributes(Definitions):
|
|||
'coal',
|
||||
'b30d',
|
||||
'bioethanol',
|
||||
'solid fuel',
|
||||
'manufactured smokeless fuel',
|
||||
"lng" # Liquified natural gas
|
||||
]
|
||||
|
||||
COMPLEX_FUEL_KEYWORDS = [
|
||||
|
|
|
|||
|
|
@ -44,7 +44,12 @@ class MainHeatAttributes(Definitions):
|
|||
"gwresogyddion ystafell, glo carreg": "room heaters, coal",
|
||||
"pwmp gwres sygçön tarddu yn yr awyr, rheiddiaduron, trydan": "air source heat pump, radiators, electric",
|
||||
"gwresogyddion ystafell, nwy prif gyflenwad": "room heaters, mains gas",
|
||||
"bwyler a rheiddiaduron, dau danwydd mwynau a choed": "boiler and radiators, dual fuel mineral and wood"
|
||||
"bwyler a rheiddiaduron, dau danwydd mwynau a choed": "boiler and radiators, dual fuel mineral and wood",
|
||||
"pwmp gwres sygçön tarddu yn y ddaear, dan y llawr, trydan": "ground source heat pump, underfloor, electric",
|
||||
"gwresogi dan y llawr trydan": "electric underfloor heating",
|
||||
# This descripton is slightly unclear & was repeated
|
||||
"st+¦r wresogyddion trydan, st+¦r wresogyddion trydan": "room heaters, electric",
|
||||
"pwmp gwres sygçön tarddu yn y ddaear, rheiddiaduron, trydan": "ground source heat pump, radiators, electric",
|
||||
}
|
||||
|
||||
REMAP = {
|
||||
|
|
|
|||
|
|
@ -99,7 +99,8 @@ class MainheatControlAttributes(Definitions):
|
|||
"room thermostat "
|
||||
"only",
|
||||
"dim": "none",
|
||||
"dim rheolaeth thermostatig ar dymheredd yr ystafell": "no thermostatic control of room temperature"
|
||||
"dim rheolaeth thermostatig ar dymheredd yr ystafell": "no thermostatic control of room temperature",
|
||||
"thermostatau ar y cyfarpar": "appliance thermostats",
|
||||
}
|
||||
|
||||
def __init__(self, description: str):
|
||||
|
|
|
|||
|
|
@ -28,7 +28,9 @@ class RoofAttributes(Definitions):
|
|||
"ystafell(oedd) to, wedigçöi hinswleiddio (rhagdybiaeth)": "roof room(s), insulated (assumed)",
|
||||
"ystafell(oedd) to, inswleiddio cyfyngedig (rhagdybiaeth)": "roof room(s), limited insulation (assumed)",
|
||||
"ystafell(oedd) to, inswleiddio cyfyngedig": "roof room(s), limited insulation",
|
||||
"ystafell(oedd) to, nenfwd wedigçöi inswleiddio": "roof room(s), ceiling insulated"
|
||||
"ystafell(oedd) to, nenfwd wedigçöi inswleiddio": "roof room(s), ceiling insulated",
|
||||
"ystafell(oedd) to, dim inswleiddio (rhagdybiaeth)": "roof room(s), no insulation (assumed)",
|
||||
"ystafell(oedd) to, dim inswleiddio": "roof room(s), no insulation",
|
||||
}
|
||||
|
||||
def __init__(self, description: str):
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ def app():
|
|||
# TODO [x] : If SAP hasn't changed, we don't include the record
|
||||
# TODO [x]: If SAP gets worse, it genuinely looks like in the vast majority of cases that the building looks
|
||||
# worse in the newer epc, so we can switch the orders
|
||||
# TODO [] : Have a look at temporal features
|
||||
# TODO [x] : Have a look at temporal features
|
||||
# TODO [x] : Floor area will impact the EPC so instead of averaging, we should have a starting and ending value.
|
||||
# TODO [x]: Same as floor area for floor height
|
||||
# TODO []: If fundamental building fabric changes, we should proabably discard the record
|
||||
|
|
|
|||
|
|
@ -73,5 +73,11 @@ mainfuel_cases = [
|
|||
'fuel_type': 'b30d',
|
||||
'tariff_type': None, 'is_community': True,
|
||||
'no_individual_heating_or_community_network': False, 'complex_fuel_type': None},
|
||||
{'original_description': 'Solid fuel: manufactured smokeless fuel', 'fuel_type': 'manufactured smokeless fuel',
|
||||
'tariff_type': None,
|
||||
'is_community': False,
|
||||
'no_individual_heating_or_community_network': False, 'complex_fuel_type': None},
|
||||
{'original_description': "LNG", 'fuel_type': 'lng', 'tariff_type': None, 'is_community': False,
|
||||
'no_individual_heating_or_community_network': False, 'complex_fuel_type': None}
|
||||
|
||||
]
|
||||
|
|
|
|||
|
|
@ -1470,4 +1470,64 @@ mainheat_cases = [
|
|||
'has_electricaire': False, 'has_assumed_for_most_rooms': False, 'has_underfloor_heating': False,
|
||||
"has_electric_heat_pumps": False,
|
||||
"has_micro-cogeneration": False},
|
||||
{'original_description': 'Pwmp gwres syGÇÖn tarddu yn y ddaear, dan y llawr, trydan', 'has_radiators': False,
|
||||
'has_fan_coil_units': False, 'has_pipes_in_screed_above_insulation': False,
|
||||
'has_pipes_in_insulated_timber_floor': False, 'has_pipes_in_concrete_slab': False, 'has_boiler': False,
|
||||
'has_air_source_heat_pump': False, 'has_room_heaters': False, 'has_electric_storage_heaters': False,
|
||||
'has_warm_air': False, 'has_electric_underfloor_heating': False, 'has_electric_ceiling_heating': False,
|
||||
'has_community_scheme': False, 'has_ground_source_heat_pump': True, 'has_no_system_present': False,
|
||||
'has_portable_electric_heaters': False, 'has_water_source_heat_pump': False, 'has_electric': True,
|
||||
'has_mains_gas': False, 'has_wood_logs': False, 'has_LPG': False, 'has_coal': False, 'has_oil': False,
|
||||
'has_wood_pellets': False, 'has_anthracite': False, 'has_dual_fuel_mineral_and_wood': False,
|
||||
'has_smokeless_fuel': False, 'has_lpg': False, 'has_assumed': False, 'has_electricaire': False,
|
||||
'has_assumed_for_most_rooms': False, 'has_underfloor_heating': True, "has_electric_heat_pumps": False,
|
||||
"has_micro-cogeneration": False},
|
||||
{'original_description': 'Gwresogi dan y llawr trydan', 'has_radiators': False, 'has_fan_coil_units': False,
|
||||
'has_pipes_in_screed_above_insulation': False, 'has_pipes_in_insulated_timber_floor': False,
|
||||
'has_pipes_in_concrete_slab': False, 'has_boiler': False, 'has_air_source_heat_pump': False,
|
||||
'has_room_heaters': False, 'has_electric_storage_heaters': False, 'has_warm_air': False,
|
||||
'has_electric_underfloor_heating': True, 'has_electric_ceiling_heating': False, 'has_community_scheme': False,
|
||||
'has_ground_source_heat_pump': False, 'has_no_system_present': False, 'has_portable_electric_heaters': False,
|
||||
'has_water_source_heat_pump': False, 'has_electric': True, 'has_mains_gas': False, 'has_wood_logs': False,
|
||||
'has_LPG': False, 'has_coal': False, 'has_oil': False, 'has_wood_pellets': False, 'has_anthracite': False,
|
||||
'has_dual_fuel_mineral_and_wood': False, 'has_smokeless_fuel': False, 'has_lpg': False, 'has_assumed': False,
|
||||
'has_electricaire': False, 'has_assumed_for_most_rooms': False, 'has_underfloor_heating': True,
|
||||
"has_electric_heat_pumps": False,
|
||||
"has_micro-cogeneration": False},
|
||||
{'original_description': 'Room heaters, electric', 'has_radiators': False,
|
||||
'has_fan_coil_units': False, 'has_pipes_in_screed_above_insulation': False,
|
||||
'has_pipes_in_insulated_timber_floor': False, 'has_pipes_in_concrete_slab': False, 'has_boiler': False,
|
||||
'has_air_source_heat_pump': False, 'has_room_heaters': True, 'has_electric_storage_heaters': False,
|
||||
'has_warm_air': False, 'has_electric_underfloor_heating': False, 'has_electric_ceiling_heating': False,
|
||||
'has_community_scheme': False, 'has_ground_source_heat_pump': False, 'has_no_system_present': False,
|
||||
'has_portable_electric_heaters': False, 'has_water_source_heat_pump': False, 'has_electric': True,
|
||||
'has_mains_gas': False, 'has_wood_logs': False, 'has_LPG': False, 'has_coal': False, 'has_oil': False,
|
||||
'has_wood_pellets': False, 'has_anthracite': False, 'has_dual_fuel_mineral_and_wood': False,
|
||||
'has_smokeless_fuel': False, 'has_lpg': False, 'has_assumed': False, 'has_electricaire': False,
|
||||
'has_assumed_for_most_rooms': False, 'has_underfloor_heating': False, "has_electric_heat_pumps": False,
|
||||
"has_micro-cogeneration": False},
|
||||
{'original_description': 'St+¦r wresogyddion trydan, St+¦r wresogyddion trydan', 'has_radiators': False,
|
||||
'has_fan_coil_units': False, 'has_pipes_in_screed_above_insulation': False,
|
||||
'has_pipes_in_insulated_timber_floor': False, 'has_pipes_in_concrete_slab': False, 'has_boiler': False,
|
||||
'has_air_source_heat_pump': False, 'has_room_heaters': True, 'has_electric_storage_heaters': False,
|
||||
'has_warm_air': False, 'has_electric_underfloor_heating': False, 'has_electric_ceiling_heating': False,
|
||||
'has_community_scheme': False, 'has_ground_source_heat_pump': False, 'has_no_system_present': False,
|
||||
'has_portable_electric_heaters': False, 'has_water_source_heat_pump': False, 'has_electric': True,
|
||||
'has_mains_gas': False, 'has_wood_logs': False, 'has_LPG': False, 'has_coal': False, 'has_oil': False,
|
||||
'has_wood_pellets': False, 'has_anthracite': False, 'has_dual_fuel_mineral_and_wood': False,
|
||||
'has_smokeless_fuel': False, 'has_lpg': False, 'has_assumed': False, 'has_electricaire': False,
|
||||
'has_assumed_for_most_rooms': False, 'has_underfloor_heating': False, "has_electric_heat_pumps": False,
|
||||
"has_micro-cogeneration": False},
|
||||
{'original_description': 'Pwmp gwres syGÇÖn tarddu yn y ddaear, rheiddiaduron, trydan', 'has_radiators': True,
|
||||
'has_fan_coil_units': False, 'has_pipes_in_screed_above_insulation': False,
|
||||
'has_pipes_in_insulated_timber_floor': False, 'has_pipes_in_concrete_slab': False, 'has_boiler': False,
|
||||
'has_air_source_heat_pump': False, 'has_room_heaters': False, 'has_electric_storage_heaters': False,
|
||||
'has_warm_air': False, 'has_electric_underfloor_heating': False, 'has_electric_ceiling_heating': False,
|
||||
'has_community_scheme': False, 'has_ground_source_heat_pump': True, 'has_no_system_present': False,
|
||||
'has_portable_electric_heaters': False, 'has_water_source_heat_pump': False, 'has_electric': True,
|
||||
'has_mains_gas': False, 'has_wood_logs': False, 'has_LPG': False, 'has_coal': False, 'has_oil': False,
|
||||
'has_wood_pellets': False, 'has_anthracite': False, 'has_dual_fuel_mineral_and_wood': False,
|
||||
'has_smokeless_fuel': False, 'has_lpg': False, 'has_assumed': False, 'has_electricaire': False,
|
||||
'has_assumed_for_most_rooms': False, 'has_underfloor_heating': False, "has_electric_heat_pumps": False,
|
||||
"has_micro-cogeneration": False},
|
||||
]
|
||||
|
|
|
|||
|
|
@ -201,4 +201,7 @@ mainheat_control_cases = [
|
|||
{'original_description': 'Dim rheolaeth thermostatig ar dymheredd yr ystafell', 'thermostatic_control': None,
|
||||
'charging_system': None, 'switch_system': None, 'no_control': 'no thermostatic control', 'dhw_control': None,
|
||||
'community_heating': None, 'multiple_room_thermostats': False, 'auxiliary_systems': None, 'trvs': None},
|
||||
{'original_description': 'Thermostatau ar y cyfarpar', 'thermostatic_control': 'appliance thermostats',
|
||||
'charging_system': None, 'switch_system': None, 'no_control': None, 'dhw_control': None, 'community_heating': None,
|
||||
'multiple_room_thermostats': False, 'auxiliary_systems': None, 'trvs': None},
|
||||
]
|
||||
|
|
|
|||
|
|
@ -390,4 +390,8 @@ clean_roof_test_cases = [
|
|||
'thermal_transmittance_unit': None, 'is_pitched': False, 'is_roof_room': True, 'is_loft': False, 'is_flat': False,
|
||||
'is_thatched': False, 'is_at_rafters': False, 'is_assumed': False, 'has_dwelling_above': False, 'is_valid': True,
|
||||
'insulation_thickness': 'average'},
|
||||
{'original_description': 'Ystafell(oedd) to, dim inswleiddio (rhagdybiaeth)', 'thermal_transmittance': None,
|
||||
'thermal_transmittance_unit': None, 'is_pitched': False, 'is_roof_room': True, 'is_loft': False, 'is_flat': False,
|
||||
'is_thatched': False, 'is_at_rafters': False, 'is_assumed': True, 'has_dwelling_above': False, 'is_valid': True,
|
||||
'insulation_thickness': 'none'},
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue