ECHOscore / slang.py
EugeneXiang's picture
Rename slang_parser.py to slang.py
b9bae16 verified
raw
history blame contribute delete
319 Bytes
import re
def detect_slang(text: str) -> str:
"""Simple placeholder: identify slang or technical terms in text"""
# Customize with real patterns
slang_patterns = re.compile(r"\b(LOL|BTW|FYI)\b", re.IGNORECASE)
matches = slang_patterns.findall(text)
return ", ".join(set(matches)) if matches else ""