Problem Set 4
This is an individual-effort assignment: the code you submit must be written by you; it may not be written by another person nor may it be generated with an algorithm.
Keep all files for this assignment in the
problem_set4
folder and submit them as a zip file namedproblem_set4.zip
.This assignment is scored out of 110 (an extra credit opportunity). There are more than 110 possible points, but the maximum score you can earn on this assignment is 110. Do not get stuck on any one problem, but do complete as many problems as you can.
Pay close attention to the format of output, names of functions, names of files, and names of variables. These errors are common reasons for losing points on problems that otherwise would have been full credit.
This is an individual-effort assignment: the code you submit must be written by you; it may not be written by another person nor may it be generated with an algorithm.
Dear Interlocutor,
In this assignment, you will build a very basic spam filter. Each problem will be a separate step.
- First, download spam_filter.zip.
- There is a folder called
problem_set4
in it: use this folder as yourproblem_set4
folder. - The folder contains three sub-folders:
spam
andham
, which contain the files themselves.alt
, which consists of an alternate set of spam and ham.
- There is a folder called
Your spam filter will read in the spam files and ham files and “learn” from these files how to identify what content is spam and what is not.
Important: Unlike previous assignments, you will put all of your code for this assignment in a single file: spam_filter.py.
Put this in the main problem_set4
folder.
I hope this message finds you well
Problem 0
I understand that this subject is important
Problem 1
I take it very seriously
Problem 2
I know that you are busy and I appreciate your time
Problem 3
Thank you for your attention to this matter
Problem 4
I look forward to your response.