a spam filter to distinguish between spam and ham emails effectively