initial commit
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
"""
|
||||
Text processing utilities for sentiment and news analysis.
|
||||
"""
|
||||
|
||||
import re
|
||||
|
||||
|
||||
def clean_text(text: str) -> str:
|
||||
"""Clean and normalize text."""
|
||||
text = re.sub(r"http\S+", "", text)
|
||||
text = re.sub(r"[^\w\s]", "", text)
|
||||
return text.strip().lower()
|
||||
Reference in New Issue
Block a user