|
| fast_single.nlp = spacy.load("en_core_web_sm") |
|
| fast_single.stopWords = spacy.lang.en.stop_words.STOP_WORDS |
|
| fast_single.dictionary = json.load(dic) |
|
int | fast_single.dic_size = 3000 |
|
string | fast_single.SPAM_DIR = "/var/mail/folder/spam" |
|
| fast_single.ml_model = pickle.load(open('spamfilter.sav', 'rb')) |
|
| fast_single.logfile_location = sys.argv[1] |
|
| fast_single.logfile = open(logfile_location, "r") |
|
| fast_single.logfile_ino = os.fstat(logfile.fileno()).st_ino |
|
| fast_single.fil = open("spamfilter.log", "a") |
|
| fast_single.mail = logfile.readline() |
|
| fast_single.startTime = datetime.now() |
|
def | fast_single.result = predict(mail) |
|
| fast_single.endTime = datetime.now() |
|
| fast_single.processTime = endTime - startTime |
|
| fast_single.new = open(logfile_location, "r") |
|
Continuous Single Mail Processing Code.
This code loads the modules, continuously reads address of mails from log file and processes them.
- Author
- Sudhanshu Dubey
- Version
- 1.0
- Date
- 3/7/2019 \params logfile_location The location of log file.
- Bug:
- No known bugs