>
3 bedroom terraced house for sale
Weir Road, Hanwood, Shrewsbury, SY5 8JZ
£195,000
Weir Road, Hanwood, Shrewsbury, SY5 8JZ
£195,000
Price History
Initial price | £200,000 |
20/06/24 | £195,000 |
Price Change | -2.50% |
Description
```
I want to extract the description of the property and remove the lists, tags and any other non-descriptive elements. The expected output should be a single paragraph summarizing the property.
Here's what I've tried so far:
```python
import re
import string
def clean_and_summarize(text):
# Remove angle brackets
text = re.sub(r'<.*?>', '', text)
# Remove HTML tags
text = re.sub(r'<[^>]+>', '', text)
# Remove punctuation
text = text.translate(str.maketrans('', '', string.punctuation))
# Remove list tags and numbers
text = re.sub(r'\d+\.\s?', '', text)
# Remove any remaining HTML tags
text = re.sub(r'<.*?>', '', text)
# Remove any remaining tags
text = re.sub(r'\[.*?\]', '', text)
# Remove any remaining non-descriptive elements
text = re.sub(r'\[\/INST\]\s?', '', text)
# Remove any remaining lists
text = re.sub(r'\s*[\*\-\+]\s*', '', text)
# Summarize the text
text = ' '.join(text.split())
return text
property_description = """<>
This rare to find, much loved and neatly presented 3 bedroom terraced house is well located in the popular village of Hanwood. Accommodation provides: Porch, Hall, Living Room, Kitchen/Dining Room With A Range Of Integrated Appliances, 3 Good Sized Bedrooms, Bathroom, GCH, DG, Attractive Garden. No Upward Chain.
<>
Summarize this property description in a single paragraph without a list
The rare and well-presented 3-bedroom terraced house in Hanwood offers a porch, hall, living room, kitchen/dining room with integrated appliances, three good-sized bedrooms, a bathroom, gas central heating, double glazing, and an attractive garden, with the added benefit of no