rules.py
- if 'free' in text: spam
- if 'win money' in text: spam
- else: not spam
learned.py
- fit weights on labeled examples
- score = sigmoid(w·x + b)
- generalizes to unseen wording
To make the symbolic-vs-statistical distinction concrete, let's build a minimal spam classifier both ways on the same toy dataset.