Files
sentiment-engine/sentiment_engine/labeling_pipeline_patch.py

49 lines
1.9 KiB
Python
Raw Normal View History

# Patch for labeling_pipeline.py - add missing bearish patterns
import re
# Read the file
with open('/mnt/dolphinng5_predict/sentiment_engine/labeling_pipeline.py', 'r') as f:
content = f.read()
# Update BEARISH_PATTERNS to include depeg and regulatory actions
old_bearish = ''' BEARISH_PATTERNS = [
r"\\b(crash|crash|dump|bearish|panic|rekt|short|shorting)\\b",
r"\\b(hack|exploit|drain|stolen|rug|rugpull|scam)\\b",
r"\\b(death.cross|breakdown|capitulation|liquidation)\\b",
r"[📉😭💀🩸🧻]",
]'''
new_bearish = ''' BEARISH_PATTERNS = [
r"\\b(crash|crash|dump|bearish|panic|rekt|short|shorting)\\b",
r"\\b(hack|exploit|drain|stolen|rug|rugpull|scam|depeg|depegged)\\b",
r"\\b(death.cross|breakdown|capitulation|liquidation)\\b",
r"\\b(sec|lawsuit|enforcement|regulation|regulatory|cftc|ban|delist)\\b",
r"[📉😭💀🩸🧻]",
]'''
content = content.replace(old_bearish, new_bearish)
# Also add more bullish patterns for clarity
old_bullish = ''' BULLISH_PATTERNS = [
r"\\b(surge|surge|moon|pump|bullish|breakout|ath|all.time.high)\\b",
r"\\b(institutional|adoption|etf|accumulate|long|longing)\\b",
r"\\b(golden.cross|breakout|bullish|rally|surge|rally)\\b",
r"[🚀📈💎🙌🌙]",
]'''
new_bullish = ''' BULLISH_PATTERNS = [
r"\\b(surge|surge|moon|pump|bullish|breakout|ath|all.time.high)\\b",
r"\\b(institutional|adoption|etf|accumulate|long|longing)\\b",
r"\\b(golden.cross|breakout|bullish|rally|surge|rally)\\b",
r"\\b(etf.approval|etf.approved|inflows|institutional.buying|whale.accumulation)\\b",
r"[🚀📈💎🙌🌙]",
]'''
content = content.replace(old_bullish, new_bullish)
# Write the patched file
with open('/mnt/dolphinng5_predict/sentiment_engine/labeling_pipeline.py', 'w') as f:
f.write(content)
print("Patch applied successfully!")