| def rewrite_hook(text): | |
| """ | |
| Simulates GPT-style hook optimization | |
| """ | |
| if not text: | |
| return "You won’t believe this..." | |
| return f"Wait—{text.strip().capitalize()}" | |
| def strategy_score(words): | |
| """ | |
| Combines virality + structure + hook strength | |
| """ | |
| base_score = len(words) | |
| text = " ".join([w["text"] for w in words]).lower() | |
| # Hook boost | |
| if any(k in text for k in ["you", "stop", "wait", "imagine"]): | |
| base_score += 30 | |
| # Emotional intensity | |
| if "!" in text: | |
| base_score += 15 | |
| return min(100, base_score) |