santanche's picture
feat (setup): initial setup
f75e5eb
raw
history blame contribute delete
205 Bytes
import re
def parse_symptoms(symptom_string):
pattern = r"([^,]+?)\s*\(([\d\.]+)\)"
matches = re.findall(pattern, symptom_string)
return [(m[0].strip().lower(), float(m[1])) for m in matches]