Skip to content

A small python package for reading and parsing the Enron email corpus

License

Notifications You must be signed in to change notification settings

zerocogtech/enron_reader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

enron_reader

Installation

pip3 install enron_reader

Prerequisites

For using this package, you must have the Enron email corpus locally. If you don't, either download and extract it using the link provided here, or run

download_enron /path/to/download/enron

in your terminal after installing this package.

Then, you should have a folder named 'maildir' in that directory. It should contain a directory for each user (Enron employee)

Usage example

from enron_reader import EnronReader
reader = EnronReader("/path/to/enron/root")

print(reader.get_user_ids())

mailbox = reader.get_mailbox_for_user("keiser-k")

main_folders = mailbox.root_folder.subfolders
some_message = main_folders[0].messages[0]

print(some_message.subject)

About

A small python package for reading and parsing the Enron email corpus

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages