multiple translations

This commit is contained in:
Khalim Conn-Kowlessar 2023-09-11 12:35:48 +01:00
parent cf97c14956
commit 6deaafa637
10 changed files with 117 additions and 10 deletions

View file

@ -23,7 +23,13 @@ class FloorAttributes(Definitions):
"solet, inswleiddio cyfyngedig (rhagdybiaeth)": "solid, limited insulation (assumed)",
"solet, inswleiddio cyfyngedig": "solid, limited insulation",
"crog, wedigçöi inswleiddio (rhagdybiaeth)": "suspended, insulated (assumed)",
"crog, wedigçöi inswleiddio": "suspended, insulated"
"crog, wedigçöi inswleiddio": "suspended, insulated",
"igçör awyr y tu allan, dim inswleiddio (rhagdybiaeth)": "to external air, no insulation (assumed)",
"igçör awyr y tu allan, dim inswleiddio": "to external air, no insulation",
"i ofod heb ei wresogi, wedigçöi inswleiddio (rhagdybiaeth)": "to unheated space, insulated (assumed)",
"i ofod heb ei wresogi, wedigçöi inswleiddio": "to unheated space, insulated",
"solet, wedigçöi inswleiddio (rhagdybiaeth)": "solid, insulated (assumed)",
"solet, wedigçöi inswleiddio": "solid, insulated",
}
def __init__(self, description: str):

View file

@ -101,7 +101,10 @@ class HotWaterAttributes(Definitions):
"twymwr tanddwr, an-frig": "electric immersion, off-peak",
"ogçör brif system, gydag ynnigçör haul": "from main system, plus solar",
"twymwr tanddwr, tarriff safonol": "electric immersion, standard tariff",
"trydan ar unwaith yn y fan lle maegçön cael ei ddefnyddio": 'electric instantaneous at point of use'
"trydan ar unwaith yn y fan lle maegçön cael ei ddefnyddio": 'electric instantaneous at point of use',
"o gynllun cymunedol": "community scheme",
"o'r brif system": "from main system",
"trydan ar unwaith yn y fan lle mae'n cael ei ddefnyddio": 'electric instantaneous at point of use'
}
def __init__(self, description: str):

View file

@ -32,7 +32,10 @@ class MainHeatAttributes(Definitions):
"bwyler a gwres dan y llawr, olew": "boiler and underfloor heating, oil",
'bwyler a rheiddiaduron, lpg': 'boiler and radiators, lpg',
"gwresogyddion ystafell, trydan": "room heaters, electric",
"pwmp gwres sygçön tarddu yn yr awyr, dan y llawr, trydan": "air source heat pump, underfloor heating, electric"
"pwmp gwres sygçön tarddu yn yr awyr, dan y llawr, trydan": "air source heat pump, underfloor heating, "
"electric",
"cynllun cymunedol": "community scheme",
"bwyler a gwres dan y llawr, nwy prif gyflenwad": "boiler and underfloor heating, mains gas"
}
REMAP = {

View file

@ -67,6 +67,10 @@ class MainheatControlAttributes(Definitions):
'at least two room thermostats'
]
RATE_CONTROL_KEYWORDS = [
'single rate heating',
]
# Sufficiently similar descriptions to be remapped
TO_REMAP = {
"celect control": 'celect-type control',
@ -81,6 +85,11 @@ class MainheatControlAttributes(Definitions):
"rhaglennydd a thermostatau ar y cyfarpar": "programmer, room thermostat",
"rheolyddion i wresogyddion storio sygçön cadw llawer o wres": "controls for high heat retention storage "
"heaters",
"t+ól un gyfradd, rhaglennydd a thermostat ystafell": "single rate heating, programmer and room thermostat",
"rhaglennydd ac o leiaf ddau thermostat ystafell": "programmer and at least two room thermostats",
"thermostat ystafell yn unig": "room thermostat only",
"dim rheolaeth amser na rheolaeth thermostatig ar dymheredd yr ystafell": "no time or thermostatic control of "
"room temperature"
}
def __init__(self, description: str):
@ -107,7 +116,8 @@ class MainheatControlAttributes(Definitions):
self.DHW_CONTROL_KEYWORDS,
self.COMMUNITY_HEATING_KEYWORDS,
self.TRVS_KEYWORDS,
self.NO_CONTROL_SYSTEM_KEYWORDS
self.NO_CONTROL_SYSTEM_KEYWORDS,
self.RATE_CONTROL_KEYWORDS
]
):
raise ValueError('Invalid description')
@ -127,7 +137,8 @@ class MainheatControlAttributes(Definitions):
"community_heating": False,
"multiple_room_thermostats": False,
"auxiliary_systems": False,
"trvs": False
"trvs": False,
"rate_contro": False
}
return result
@ -142,7 +153,8 @@ class MainheatControlAttributes(Definitions):
phrase in self.description for phrase in self.MULTIPLE_ROOM_THERMOSTATS_PHRASES
),
"auxiliary_systems": find_keyword(self.description, self.AUXILIARY_SYSTEM_KEYWORDS),
"trvs": find_keyword(self.description, self.TRVS_KEYWORDS)
"trvs": find_keyword(self.description, self.TRVS_KEYWORDS),
"rate_control": find_keyword(self.description, self.RATE_CONTROL_KEYWORDS),
}
return result

View file

@ -15,13 +15,17 @@ class RoofAttributes(Definitions):
"ar oleddf, wedigçöi inswleiddio": "pitched, insulated",
"ar oleddf, inswleiddio cyfyngedig (rhagdybiaeth)": "pitched, limited insulation (assumed)",
"ar oleddf, inswleiddio cyfyngedig": "pitched, limited insulation",
"ar oleddf, wedigçöi inswleiddio wrth y trawstiau": 'pitched, insulated at rafters',
"yn wastad, inswleiddio cyfyngedig (rhagdybiaeth)": "flat, limited insulation (assumed)",
"yn wastad, inswleiddio cyfyngedig": "flat, limited insulation",
"yn wastad, dim inswleiddio (rhagdybiaeth)": "flat, no insulation (assumed)",
"yn wastad, dim inswleiddio": "flat, no insulation",
"yn wastad, wedigçöi inswleiddio (rhagdybiaeth)": "flat, insulated (assumed)",
"yn wastad, wedigçöi inswleiddio": "flat, insulated",
"(eiddo arall uwchben)": "(another dwelling above)",
"(annedd arall uwchben)": "(another dwelling above)",
"ystafell(oedd) to, wedigçöi hinswleiddio": "roof room(s), insulated",
}
def __init__(self, description: str):

View file

@ -353,4 +353,14 @@ clean_floor_cases = [
{'original_description': 'Crog, wediGÇÖi inswleiddio (rhagdybiaeth)', 'thermal_transmittance': None,
'thermal_transmittance_unit': None, 'is_assumed': True, 'is_to_unheated_space': False, 'is_to_external_air': False,
'is_suspended': True, 'is_solid': False, 'insulation_thickness': 'average', "another_property_below": False},
{'original_description': 'IGÇÖr awyr y tu allan, dim inswleiddio (rhagdybiaeth)', 'thermal_transmittance': None,
'thermal_transmittance_unit': None, 'is_assumed': True, 'is_to_unheated_space': False, 'is_to_external_air': True,
'is_suspended': False, 'is_solid': False, 'insulation_thickness': 'none', "another_property_below": False},
{'original_description': 'I ofod heb ei wresogi, wediGÇÖi inswleiddio (rhagdybiaeth)',
'thermal_transmittance': None,
'thermal_transmittance_unit': None, 'is_assumed': True, 'is_to_unheated_space': True, 'is_to_external_air': False,
'is_suspended': False, 'is_solid': False, 'insulation_thickness': 'average', "another_property_below": False},
{'original_description': 'Solet, wediGÇÖi inswleiddio (rhagdybiaeth)', 'thermal_transmittance': None,
'thermal_transmittance_unit': None, 'is_assumed': True, 'is_to_unheated_space': False, 'is_to_external_air': False,
'is_suspended': False, 'is_solid': True, 'insulation_thickness': 'average', "another_property_below": False},
]

View file

@ -160,4 +160,17 @@ hotwater_cases = [
'system_type': None, 'thermostat_characteristics': None, 'heating_scope': None, 'energy_recovery': None,
'tariff_type': None, 'extra_features': None, 'chp_systems': None, 'distribution_system': None,
'no_system_present': None, 'assumed': False, "appliance": None},
{'original_description': 'O gynllun cymunedol', 'heater_type': None, 'system_type': 'community scheme',
'thermostat_characteristics': None, 'heating_scope': None, 'energy_recovery': None, 'tariff_type': None,
'extra_features': None, 'chp_systems': None, 'distribution_system': None, 'no_system_present': None,
'assumed': False, "appliance": None},
{'original_description': "O'r brif system", 'heater_type': None, 'system_type': 'from main system',
'thermostat_characteristics': None, 'heating_scope': None, 'energy_recovery': None, 'tariff_type': None,
'extra_features': None, 'chp_systems': None, 'distribution_system': None, 'no_system_present': None,
'assumed': False, "appliance": None},
{'original_description': "Trydan ar unwaith yn y fan lle mae'n cael ei ddefnyddio",
'heater_type': 'electric instantaneous',
'system_type': None, 'thermostat_characteristics': None, 'heating_scope': None, 'energy_recovery': None,
'tariff_type': None, 'extra_features': None, 'chp_systems': None, 'distribution_system': None,
'no_system_present': None, 'assumed': False, "appliance": None},
]

View file

@ -1250,4 +1250,28 @@ mainheat_cases = [
'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': 'Cynllun cymunedol', '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': True,
'has_ground_source_heat_pump': False, 'has_no_system_present': False, 'has_portable_electric_heaters': False,
'has_water_source_heat_pump': False, 'has_electric': False, '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': 'Bwyler a gwres dan y llawr, nwy prif gyflenwad', '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': True,
'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': False, 'has_no_system_present': False,
'has_portable_electric_heaters': False, 'has_water_source_heat_pump': False, 'has_electric': False,
'has_mains_gas': True, '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},
]

View file

@ -157,8 +157,32 @@ mainheat_control_cases = [
'thermostatic_control': None,
'charging_system': 'high heat retention storage heaters', 'switch_system': None, 'no_control': None,
'dhw_control': None, 'community_heating': None, 'multiple_room_thermostats': False, 'auxiliary_systems': None,
'trvs': None}, {'original_description': 'Flat rate charging, TRVs', 'thermostatic_control': None,
'charging_system': 'flat rate charging', 'switch_system': None, 'no_control': None,
'dhw_control': None, 'community_heating': None, 'multiple_room_thermostats': False,
'auxiliary_systems': None, 'trvs': 'trvs'},
'trvs': None},
{'original_description': 'Flat rate charging, TRVs', 'thermostatic_control': None,
'charging_system': 'flat rate charging', 'switch_system': None, 'no_control': None,
'dhw_control': None, 'community_heating': None, 'multiple_room_thermostats': False,
'auxiliary_systems': None, 'trvs': 'trvs'},
{'original_description': 'Single rate heating, programmer and room thermostat',
'thermostatic_control': 'room thermostat', 'charging_system': None,
'switch_system': 'programmer',
'no_control': None, 'dhw_control': None, 'community_heating': None, 'multiple_room_thermostats': False,
'auxiliary_systems': None, 'trvs': None, 'rate_control': 'single rate heating'},
{'original_description': 'T+ól un gyfradd, rhaglennydd a thermostat ystafell',
'thermostatic_control': 'room thermostat', 'charging_system': None,
'switch_system': 'programmer',
'no_control': None, 'dhw_control': None, 'community_heating': None, 'multiple_room_thermostats': False,
'auxiliary_systems': None, 'trvs': None, 'rate_control': 'single rate heating'},
{'original_description': 'Rhaglennydd ac o leiaf ddau thermostat ystafell',
'thermostatic_control': 'room thermostats',
'charging_system': None, 'switch_system': 'programmer', 'no_control': None, 'dhw_control': None,
'community_heating': None, 'multiple_room_thermostats': True, 'auxiliary_systems': None, 'trvs': None},
{'original_description': 'Thermostat ystafell yn unig', 'thermostatic_control': 'room thermostat',
'charging_system': None,
'switch_system': None, 'no_control': None, 'dhw_control': None, 'community_heating': None,
'multiple_room_thermostats': False, 'auxiliary_systems': None, 'trvs': None},
{'original_description': 'Dim rheolaeth amser na rheolaeth thermostatig ar dymheredd yr ystafell',
'thermostatic_control': None,
'charging_system': None, 'switch_system': None, 'no_control': 'no time or thermostatic control',
'dhw_control': None, 'community_heating': None, 'multiple_room_thermostats': False, 'auxiliary_systems': None,
'trvs': None},
]

View file

@ -374,4 +374,12 @@ 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': "Ar oleddf, wediGÇÖi inswleiddio wrth y trawstiau", 'thermal_transmittance': None,
'thermal_transmittance_unit': None, 'is_pitched': True, 'is_roof_room': False, 'is_loft': False, 'is_flat': False,
'is_thatched': False, 'is_at_rafters': True, 'is_assumed': False, 'has_dwelling_above': False, 'is_valid': True,
'insulation_thickness': 'average'},
{'original_description': 'Yn wastad, wediGÇÖi inswleiddio (rhagdybiaeth)', 'thermal_transmittance': None,
'thermal_transmittance_unit': None, 'is_pitched': False, 'is_roof_room': False, 'is_loft': False, 'is_flat': True,
'is_thatched': False, 'is_at_rafters': False, 'is_assumed': True, 'has_dwelling_above': False, 'is_valid': True,
'insulation_thickness': 'average'},
]