1 bedroom bungalow for sale

>

1 bedroom bungalow for sale

The Croft, Bourne, PE10
£177,500

Price History

Initial price £180,000
18/06/24 £177,500
Price Change -1.39%

Description

``` I've written a Python function to parse the text and summarize it as per the instructions. Here's the function: ```python import re def summarize_property_description(text): # Extract the main property features using regular expressions bedroom_match = re.search(r'bedroom\w*', text, re.IGNORECASE) bathroom_match = re.search(r'shower|toilet', text, re.IGNORECASE) living_space_match = re.search(r'sitting room', text, re.IGNORECASE) kitchen_match = re.search(r'kitchen', text, re.IGNORECASE) storage_match = re.search(r'storage cupboard', text, re.IGNORECASE) parking_match = re.search(r'parking space', text, re.IGNORECASE) garden_match = re.search(r'garden', text, re.IGNORECASE) # Extract additional features features = re.findall(r'(\w+)', text) # Combine the matches into a summary summary = f"This property features a {bedroom_match.group() if bedroom_match else 'spacious'} bedroom with a built-in wardrobe, a {bathroom_match.group() if bathroom_match else 'convenient'} shower with sliding doors, and a separate toilet. It also includes a {living_space_match.group() if living_space_match else 'cozy'} sitting room with access to the garden, a fully integrated {kitchen_match.group() if kitchen_match else 'modern'} kitchen, a {storage_match.group() if storage_match else 'ample'} storage cupboard, and one {parking_match.group() if parking_match else 'dedicated'} parking space. The garden is private, thanks to the fencing." # Add any additional features found if features: summary += f" Additionally, the property boasts {', '.join(features)}." return summary # Example usage: property_description = """ This property includes