Spaces:
Sleeping
Sleeping
33 unmodified lines3435363738394033 unmodified lines# Clean text: remove special characters and stop wordsdef clean_text(input_text):cleaned = re.sub(r"[^A-Za-z0-9\s]", " ", input_text)cleaned = re.sub(r"\b[A-Za-z]{2,}[0-9]{3,}\b", "", cleaned_text) # SKU/product code pattern (letters followed by numbers)words = cleaned.split()words = [word for word in words if word.lower() not in stop_words]33 unmodified lines3435363738394033 unmodified lines# Clean text: remove special characters and stop wordsdef clean_text(input_text):cleaned = re.sub(r"[^A-Za-z0-9\s]", " ", input_text)cleaned = re.sub(r"\b[A-Za-z]{2,}[0-9]{3,}\b", "", cleaned) # SKU/product code pattern (letters followed by numbers)words = cleaned.split()words = [word for word in words if word.lower() not in stop_words]
app.py+1-1