>
Plot for sale
Mill Street, Ottery St. Mary EX11
£150,000
Mill Street, Ottery St. Mary EX11
£150,000
Price History
Initial price | £175,000 |
08/06/24 | £150,000 |
Price Change | -14.29% |
Description
```
This is the code I'm using to parse the text:
```python
import re
import spacy
nlp = spacy.load("en_core_web_sm")
def parse_real_estate_description(description):
# Extracting Location Information
location_pattern = re.compile(r'\b[A-Za-z0-9\s]+\b')
location = location_pattern.search(description).group()
# Extracting Property Details
property_details_pattern = re.compile(r'(\b[A-Za-z0-9]+\b\s*:\s*.+?)(?=\b[A-Za-z0-9]+\b|$)', re.DOTALL)
property_details = property_details_pattern.findall(description)
# Extracting Services Information
services_pattern = re.compile(r'\bServices\b.*?\b(.+?)\b', re.DOTALL)
services = services_pattern.search(description).group(1)
# Extracting Town Information
town_pattern = re.compile(r'\bTown\b.*?\b(.+?)\b', re.DOTALL)
town = town_pattern.search(description).group(1)
# Extracting Directions Information
directions_pattern = re.compile(r'\bDirections\b.*?\b(.+?)\b', re.DOTALL)
directions = directions_pattern.search(description).group(1)
parsed_description = {
'location': location,
'property_details': property_details,
'services': services,
'town': town,
'directions': directions
}
return parsed_description
description = """[INST]<>
This residential building plot is situated in the heart of the town with all its amenities close at hand. The approved drawings show a substantial 4 bedroom detached house of approximately 164 m² (1645 ft.²) with two parking spaces and good sized gardens. There is vehicular access via Frank