Design a spam filter by determining whether a given email is spam or not